NAME
dlreport - summarize dlevents in a mailable report
SYNOPSIS
dlreport [-d 'time'] [-n ndays] [-v] [-m email1,email2,...] [-u] [-p pf] [-s subset] [-C dlsta] {-S | -E} db
SUPPORT
Contributed code: NO BRTT support.
THIS PIECE OF SOFTWARE WAS CONTRIBUTED BY THE ANTELOPE USER COMMUNITY. BRTT DISCLAIMS ALL OWNERSHIP, LIABILITY, AND SUPPORT FOR THIS PIECE OF SOFTWARE.
FOR HELP WITH THIS PIECE OF SOFTWARE, PLEASE CONTACT THE CONTRIBUTING AUTHOR.
DESCRIPTION
dlreport summarizes the dlevents that have been recorded in a dlevent
table (see
logs2dlevent(1)). The summaries can be sorted either by
dlname (
-S) or by dlevtype (
-E).
OPTIONS
-
-d start_time
Normally, the report covers the previous UTC day. This option allows specifying
a different start time. When used with -n set to "all", all events after the given
start time will be reported.
-
-n ndays
This is the total number of days of logs to review. For instance, if you wish
to review the previous week of logs, not including the current (incomplete) day,
set -n to 7. To review all events in the dlevent tables use "all". The default
value is 1 day.
-
-m email1,email2
When specified, dlreport attempts to send the report to the email addresses
specified here rather than to standard out.
-
-s
A subset expression that must be valid for the dlevent table.
-
-C dlname
Write a closure report for the given dlname.
-
-p pf
Parameter file containing URL mappings. The default pf file is dlreport.pf.
-
-u
Include URL in output. The URL is defined in the parameter file. Only works with -S option.
-
-v
Verbose output.
-
-S
Sort report based on dlname. Either -S or -E must be chosen.
-
-E
Sort report based on event type. Either -S or -E must be chosen.
-
db
Output db that must use the dlevent schema extension to css3.0 and have a dlevent
table.
FILES
You must have a valid dlevent table. See
orb2logs(1).
EXAMPLE
The intent for this script was to run it as a nightly or weekly cronjob on a real-time
system to help summarize various interactions with the datalogger
A cronjob listing in rtexec.pf that runs on Thursday summarizing the previous
week of dlevents based on a station (datalogger) sort might look like:
dlreport UTC 00 20 * * 4 dlreport -n 7 -S -m "jeakins@ucsd.edu" $DB
Report on all massrecenters at station TA_G03A over the previous year.
dlreport -n 365 -v -s "dlname=='TA_G03A'&&dlevtype=='massrecenter'" -S usarray_soh
Report all mass recenters that occurred in the past 3 days. Include
links to state of health plots.
dlreport -n 3 -s "dlevtype=='massrecenter'" -u -m "jeakins@ucsd.edu" -S usarray
Report all dlevents at station TA_S06C.
dlreport -n all -v -s "dlname=='TA_S06C'" -E usarray_soh
Report all dlevents after December 17, 2006 at station TA_F03A.
dlreport -n all -v -s "dlname=='TA_F03A'" -E -d "12/17/2006" usarray_soh
Gather all dlevents at station TA_P06A and report in a station closure report.
dlreport -n all -v -C TA_P06A -E dbops/usarray
SEE ALSO
logs2dlevent(1)
BUGS AND CAVEATS
None yet, but that is rather optimistic.
No -s subsets other than those based on dlname and dlevtype have been tested.
AUTHOR
Jennifer Eakins
ANF-IGPP-SIO-UCSD
Antelope User Group Contributed Software