rda-python-metrics 1.0.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rda-python-metrics might be problematic. Click here for more details.

Files changed (47) hide show
  1. rda_python_metrics/PgIPInfo.py +188 -0
  2. rda_python_metrics/PgView.py +782 -0
  3. rda_python_metrics/__init__.py +1 -0
  4. rda_python_metrics/fillawsusage.py +282 -0
  5. rda_python_metrics/fillawsusage.usg +17 -0
  6. rda_python_metrics/fillcodusage.py +247 -0
  7. rda_python_metrics/fillcodusage.usg +21 -0
  8. rda_python_metrics/fillcountry.py +79 -0
  9. rda_python_metrics/fillendtime.py +93 -0
  10. rda_python_metrics/fillglobususage.py +287 -0
  11. rda_python_metrics/fillglobususage.usg +17 -0
  12. rda_python_metrics/fillipinfo.py +185 -0
  13. rda_python_metrics/fillipinfo.usg +18 -0
  14. rda_python_metrics/filloneorder.py +155 -0
  15. rda_python_metrics/filloneorder.usg +41 -0
  16. rda_python_metrics/fillrdadb.py +151 -0
  17. rda_python_metrics/fillrdadb.usg +32 -0
  18. rda_python_metrics/filltdsusage.py +289 -0
  19. rda_python_metrics/filltdsusage.usg +17 -0
  20. rda_python_metrics/filluser.py +216 -0
  21. rda_python_metrics/filluser.usg +16 -0
  22. rda_python_metrics/logarch.py +359 -0
  23. rda_python_metrics/logarch.usg +27 -0
  24. rda_python_metrics/pgperson.py +72 -0
  25. rda_python_metrics/pgusername.py +50 -0
  26. rda_python_metrics/viewallusage.py +350 -0
  27. rda_python_metrics/viewallusage.usg +198 -0
  28. rda_python_metrics/viewcheckusage.py +289 -0
  29. rda_python_metrics/viewcheckusage.usg +185 -0
  30. rda_python_metrics/viewcodusage.py +314 -0
  31. rda_python_metrics/viewcodusage.usg +184 -0
  32. rda_python_metrics/viewordusage.py +340 -0
  33. rda_python_metrics/viewordusage.usg +224 -0
  34. rda_python_metrics/viewrqstusage.py +362 -0
  35. rda_python_metrics/viewrqstusage.usg +217 -0
  36. rda_python_metrics/viewtdsusage.py +323 -0
  37. rda_python_metrics/viewtdsusage.usg +191 -0
  38. rda_python_metrics/viewwebfile.py +294 -0
  39. rda_python_metrics/viewwebfile.usg +212 -0
  40. rda_python_metrics/viewwebusage.py +371 -0
  41. rda_python_metrics/viewwebusage.usg +211 -0
  42. rda_python_metrics-1.0.4.dist-info/METADATA +18 -0
  43. rda_python_metrics-1.0.4.dist-info/RECORD +47 -0
  44. rda_python_metrics-1.0.4.dist-info/WHEEL +5 -0
  45. rda_python_metrics-1.0.4.dist-info/entry_points.txt +22 -0
  46. rda_python_metrics-1.0.4.dist-info/licenses/LICENSE +21 -0
  47. rda_python_metrics-1.0.4.dist-info/top_level.txt +1 -0
@@ -0,0 +1,289 @@
1
+ #!/usr/bin/env python3
2
+ #
3
+ ###############################################################################
4
+ #
5
+ # Title : viewcheckusage
6
+ # Author : Zaihua Ji, zji@ucar.edu
7
+ # Date : 03/15/2022
8
+ # 2025-03-27 transferred to package rda_python_metrics from
9
+ # https://github.com/NCAR/rda-database.git
10
+ # Purpose : python program to view historical information of command activities
11
+ # controlled by utility prgoram dscheck.
12
+ #
13
+ # Github : https://github.com/NCAR/rda-python-metrics.git
14
+ #
15
+ ###############################################################################
16
+ #
17
+ import os
18
+ import re
19
+ import sys
20
+ from rda_python_common import PgLOG
21
+ from rda_python_common import PgUtil
22
+ from rda_python_common import PgDBI
23
+ from . import PgView
24
+
25
+ VUSG = {
26
+ 'SNMS' : "ABCDEFGHIJKLMNPQRSTUVWZ", # all available short field names in %FLDS
27
+ 'OPTS' : 'aABcCdDhHilLmnOqrsStTwyz', # all available options, used for %params
28
+ 'NOPT' : 'abwz', # stand alone option without inputs
29
+ 'ACND' : 'cdhilLmnsSty', # available array condition options
30
+ 'RCND' : 'BDqrT', # available range condition options
31
+ 'CNDS' : 'aBcdDhilmnqrsStTy', # condition options, ACND, RCND and 'a'
32
+ 'HCND' : '', # condition options for having clause
33
+ 'ECND' : 'my', # condition options need evaluating
34
+ 'SFLD' : 'CDHNSTW', # string fields, to be quoted in condition
35
+ 'UFLD' : 'NW', # string fields must be in upper case
36
+ 'LFLD' : 'ST', # string fields must be in lower case
37
+ }
38
+
39
+ # keys %FLDS - short field names
40
+ # column 0 - column title showing in usage view
41
+ # column 1 - field name in format as shown in select clauses
42
+ # column 2 - field name shown in where condition query string
43
+ # column 3 - table name that the field belongs to
44
+ # column 4 - output field length, the longer one of data size and comlun title, determine
45
+ # dynamically if it is 0. Negative values indicate right justification
46
+ # column 5 - precision for floating point value if positive and show total value if not zero
47
+ # column 6 - field flag to indicate it is a group, distinct or sum field
48
+ FLDS = {
49
+ # SHRTNM COLUMNNANE FIELDNAME CNDNAME TBLNAM Size Prc Grp/Sum
50
+ 'A' : ['ARGV', "argv", 'argv', 'dschkhist', 0, 0, 'G'],
51
+ 'C' : ['COMMAND', "command", 'command', 'dschkhist', 0, 0, 'G'],
52
+ 'D' : ['DATE', "date", 'date', 'dschkhist', 10, 0, 'G'],
53
+ 'E' : ['ERRMSG', "errmsg", 'errmsg', 'dschkhist', 0, 0, 'G'],
54
+ 'H' : ['HOSTNAME', "hostname", 'hostname', 'dschkhist', 0, 0, 'G'],
55
+ 'I' : ['CHKIDX', "cindex", 'cindex', 'dschkhist', 0, 0, 'G'],
56
+ 'K' : ['TIME', "time", 'time', 'dschkhist', 8, 0, 'G'],
57
+ 'L' : ['BATCHID', "bid", 'bid', 'dschkhist', 0, 0, 'G'],
58
+ 'M' : ['MONTH', PgDBI.fmtym("date"), 'date', 'dschkhist', 7, 0, 'G'],
59
+ 'G' : ['TRIED', "tcount", 'tcount', 'dschkhist', 0, 0, 'G'],
60
+ 'P' : ['DATAPROC', "size", 'size', 'dschkhist', -14, -1, 'G'],
61
+ 'Q' : ['QUETIME', "quetime", 'quetime', 'dschkhist', 0, 0, 'G'],
62
+ 'R' : ['RUNTIME', "ttltime", 'ttltime', 'dschkhist', 0, 0, 'G'],
63
+ 'S' : ['SPECIALIST', "specialist", 'specialist', 'dschkhist', 9, 0, 'G'],
64
+ 'T' : ['DATASET', "dsid", 'dsid', 'dschkhist', 0, 0, 'G'],
65
+ 'N' : ['AN', "action", 'action', 'dschkhist', 2, 0, 'G'],
66
+ 'W' : ['STATUS', "status", 'status', 'dschkhist', 5, 0, 'G'],
67
+ 'Y' : ['YEAR', PgDBI.fmtyr("date"), 'date', 'dschkhist', 4, 0, 'G'],
68
+ 'B' : ['MBYTESDATA', "round(sum(size)/1000000, 4)", 'B', 'dschkhist', -14, 3, 'S'],
69
+ 'U' : ['HREXEC', "round(sum(ttltime)/3600, 3)", 'U', 'dschkhist', -7, 2, 'S'],
70
+ 'V' : ['HRQUEUE', "round(sum(quetime)/3600, 3)", 'V', 'dschkhist', -7, 2, 'S'],
71
+ 'J' : ['#FILEPROC', "count(dcount)", 'J', 'dschkhist', -9, -1, 'S'],
72
+ 'F' : ['FILECOUNT', "count(fcount)", 'F', 'dschkhist', -9, -1, 'S'],
73
+ 'Z' : ['#CHECKS', "count(cindex)", 'Z', 'dschkhist', -8, -1, 'S'],
74
+ 'X' : ['INDEX', "", 'X', '', -6, 0, ' ']
75
+ }
76
+
77
+ # keys %EXPAND - short field names allow zero usage
78
+ # column 0 - expand ID for group of fields
79
+ # column 1 - field name shown in where condition query string
80
+ # column 2 - field name in format as shown in select clauses
81
+ # column 3 - table name that the field belongs to
82
+ EXPAND = {
83
+ # SHRTNM EXPID CNDSTR FIELDNAME TBLNAM
84
+ 'D' : ["TIME", "dDmy"],
85
+ 'M' : ["TIME", "dDmy"],
86
+ 'Y' : ["TIME", "dDmy"],
87
+
88
+ 'C' : ["CHECK", "csS", "command", "dschkhist"],
89
+ 'S' : ["CHECK", "csS", "status", "dschkhist"],
90
+ 'W' : ["CHECK", "csS", "specialist", "dschkhist"],
91
+ }
92
+
93
+ # valid options for %params, a hash array of command line parameters
94
+ # a -- 1 to view all usage info available
95
+ # A -- number or records to return
96
+ # b -- array of batch ids
97
+ # B -- batch id range range, array of 1 or 2 batch ids
98
+ # c -- array of specified commands
99
+ # C -- a string of short field names for viewing usages
100
+ # d -- array of specified dates
101
+ # D -- dates range, array of 1 or 2 dates in format of YYYY-MM-DD
102
+ # h -- array of specified hostnames
103
+ # H -- a string of report title to replace the default one
104
+ # i -- array of check indices
105
+ # L -- column delimiter for output
106
+ # m -- array of specified months
107
+ # n -- array of specified action names
108
+ # O -- a string of short field names for sorting on
109
+ # q -- queued time range, array of 1 or 2 queued time in seconds
110
+ # r -- run time range, array of 1 or 2 run time in seconds
111
+ # s -- array of specified status
112
+ # S -- array of login names of specialists who own the requests
113
+ # t -- array of specified dataset names
114
+ # T -- dataset range, array of 1 or 2 dataset names
115
+ # w -- generate view without totals
116
+ # y -- array of specified years
117
+ # z -- generate view including entries with zero usage
118
+ params = {}
119
+ # relationship between parameter options and short field names, A option is not
120
+ # related to a field name if it is not in keys %SNS
121
+ SNS = {
122
+ 'b' : 'L', 'B' : 'L', 'c' : 'C', 'd' : 'D', 'D' : 'D', 'h' : 'H', 'i' : 'I', 'm' : 'M', 'n' : 'N',
123
+ 'q' : 'Q', 'r' : 'R', 'q' : 'Q', 's' : 'W', 'S' : 'S', 't' : 'T', 'T' : 'T', 'y' : 'Y'
124
+ }
125
+
126
+ tablenames = fieldnames = condition = ''
127
+ sfields = []
128
+ gfields = []
129
+ dfields = []
130
+ pgname = 'viewcheckusage'
131
+
132
+ #
133
+ # main function to run this program
134
+ #
135
+ def main():
136
+
137
+ PgDBI.view_dbinfo()
138
+ argv = sys.argv[1:]
139
+ inputs = []
140
+ option = 'C'
141
+
142
+ for arg in argv:
143
+ if re.match(r'^-.*$', arg):
144
+ curopt = arg[1:2]
145
+ if curopt and VUSG['OPTS'].find(curopt) > -1:
146
+ if VUSG['NOPT'].find(option) > -1:
147
+ params[option] = 1
148
+ elif inputs:
149
+ params[option]= inputs # record input array
150
+ inputs = [] # empty input array
151
+ option = curopt # start a new option
152
+ else:
153
+ PgLOG.pglog(arg + ": Unknown Option", PgLOG.LGWNEX)
154
+ else:
155
+ val = arg
156
+ if val != '!' and option in SNS:
157
+ sfld = SNS[option]
158
+ if VUSG['SFLD'].find(sfld) > -1:
159
+ if VUSG['UFLD'].find(sfld) > -1:
160
+ val = arg.upper() # in case not in upper case
161
+ elif VUSG['LFLD'].find(sfld) > -1:
162
+ val = arg.lower() # in case not in lower case
163
+ if option == 'c':
164
+ val = PgView.get_country_name(val)
165
+ elif option == 't' or option == 'T':
166
+ val = PgUtil.format_dataset_id(val) # add 'ds' if only numbers
167
+ val = "'{}'".format(val)
168
+ inputs.append(val)
169
+
170
+ # record the last option
171
+ if VUSG['NOPT'].find(option) > -1:
172
+ params[option] = 1
173
+ elif inputs:
174
+ params[option] = inputs # record input array
175
+
176
+ if not params:
177
+ PgLOG.show_usage(pgname)
178
+ else:
179
+ check_enough_options()
180
+
181
+ usgtable = 'dschkhist'
182
+ build_query_strings(usgtable) # build tablenames, fieldnames, and condtions
183
+ records = PgDBI.pgmget(tablenames, fieldnames, condition, PgLOG.UCLWEX)
184
+ if not records: PgLOG.pglog("No Usage Found For Given Conditions", PgLOG.LGWNEX)
185
+ totals = None if 'w' in params else {}
186
+ if dfields or totals != None:
187
+ records = PgView.compact_hash_groups(records, gfields, sfields, dfields, totals)
188
+ if 'z' in params: records = expand_records(records)
189
+ ostr = params['O'][0] if 'O' in params else params['C'][0]
190
+ records = PgView.order_records(records, ostr.replace('X', ''))
191
+ PgView.simple_output(params, FLDS, records, totals)
192
+
193
+ PgLOG.pgexit(0)
194
+
195
+ #
196
+ # check if enough information entered on command line for generate view/report, exit if not
197
+ #
198
+ def check_enough_options():
199
+
200
+ flds = params['C'][0] if 'C' in params else 'X'
201
+ if flds == 'X': PgLOG.pglog("{}: MISS short field names '{}'".format(pgname, VUSG['SNMS']), PgLOG.LGWNEX)
202
+
203
+ for sn in flds:
204
+ if sn == 'X': continue # do not process INDEX field
205
+ if VUSG['SNMS'].find(sn) == -1:
206
+ PgLOG.pglog("{}: Field sn must be in short field names: {}X".format(pgname, VUSG['SNMS']), PgLOG.LGWNEX)
207
+
208
+ if 'z' not in params or sn in EXPAND: continue
209
+ fld = FLDS[sn]
210
+ if fld[6] != 'G': continue
211
+ PgLOG.pglog("{}: cannot show zero usage for unexpandable field {} - {}".format(pgname, sn, fld[0]), PgLOG.LGWNEX)
212
+
213
+
214
+ for arg in params:
215
+ if arg in VUSG['CNDS']: return
216
+
217
+ PgLOG.pglog("{}: miss condition options '{}'".format(pgname, VUSG['CNDS']), PgLOG.LGWNEX)
218
+
219
+ #
220
+ # process parameter options to build all query strings
221
+ # global variables are used directly and nothing passes in and returns back
222
+ #
223
+ def build_query_strings(usgtable):
224
+
225
+ global condition, fieldnames, tablenames
226
+ joins = having = ordernames = groupnames = ''
227
+ tablenames = usgtable
228
+ cols = params['C'][0]
229
+
230
+ if 'U' in params: # reset units for file and read sizes
231
+ if cols.find('B') > -1: FLDS['B'] = PgView.set_data_unit(FLDS['B'], params['U'][0], "sum(size)")
232
+ if cols.find('P') > -1: FLDS['P'] = PgView.set_data_unit(FLDS['P'], params['U'][0], "size")
233
+
234
+ for opt in params:
235
+ if opt == 'O' or VUSG['NOPT'].find(opt) > -1: continue
236
+ if opt == 'C': # build field, table and group names
237
+ for sn in cols:
238
+ if sn == 'X': continue # do not process INDEX field
239
+ fld = FLDS[sn]
240
+ if fieldnames: fieldnames += ', '
241
+ fieldnames += "{} {}".format(fld[1], sn) # add to field name string
242
+ (tablenames, joins) = PgView.join_query_tables(fld[3], tablenames, joins, usgtable)
243
+ if fld[6] == 'S':
244
+ sfields.append(sn)
245
+ else:
246
+ if groupnames: groupnames += ', '
247
+ groupnames += sn # add to group name string
248
+ if fld[6] == 'D':
249
+ dfields.append(sn)
250
+ else:
251
+ gfields.append(sn)
252
+ elif opt == 'O':
253
+ continue # order records later
254
+ elif VUSG['CNDS'].find(opt) > -1:
255
+ sn = SNS[opt]
256
+ fld = FLDS[sn]
257
+ # build having and where conditon strings
258
+ cnd = PgView.get_view_condition(opt, sn, fld, params, VUSG)
259
+ if cnd:
260
+ if VUSG['HCND'].find(opt) > -1:
261
+ if having: having += ' AND '
262
+ having += cnd
263
+ else:
264
+ if condition: condition += ' AND '
265
+ condition += cnd
266
+ (tablenames, joins) = PgView.join_query_tables(fld[3], tablenames, joins, usgtable)
267
+
268
+ # append joins, group by, order by, and having strings to condition string
269
+ if joins:
270
+ if condition:
271
+ condition = "{} AND {}".format(joins, condition)
272
+ else:
273
+ condition = joins
274
+ if groupnames and sfields: condition += " GROUP BY " + groupnames
275
+ if having: condition += " HAVING " + having
276
+
277
+ def expand_records(records):
278
+
279
+ recs = PgView.expand_query("TIME", records, params, EXPAND)
280
+
281
+ trecs = PgView.expand_query("CHECK", records, params, EXPAND, VUSG, SNS, FLDS)
282
+ recs = PgUtil.crosshash(recs, trecs)
283
+
284
+ return PgUtil.joinhash(records, recs, 0, 1)
285
+
286
+ #
287
+ # call main() to start program
288
+ #
289
+ if __name__ == "__main__": main()
@@ -0,0 +1,185 @@
1
+
2
+ View historical usage information of delayed mode command processes controlled by
3
+ 'dscheck'.
4
+
5
+ Usage: viewcheckusage [-C] ColumnNames [-O OrderColumnNames] [-a] \
6
+ [-A RowLimit] [-b BATCHIDs] [-B MinBATCHID [MaxBATCHID]] \
7
+ [-c CommandNames] [-d CheckDates] \
8
+ [-D StartCheckDate [EndcheckDate]] [-h HostNames] \
9
+ [-i CheckIndices] [-m MonthList] [-n ActionNames] \
10
+ [-q MinQueuedSeconds [MaxQueuedSeconds]] \
11
+ [-r MinRunSeconds [MaxRunSeconds]] [-s CheckStatusList] \
12
+ [-S SpecialistLoginNames] [-t DatasetList] \
13
+ [-T MinDataset [MaxDataset]] [-y YearList] \
14
+ [-H Title] [-L Delimiter] [-U SizeUnit] [-w] [-z] \
15
+ [> OutputFileName] [| lp -d PrinterName]
16
+
17
+ Specify [-C] ColumnNames, refer to Option -C section for detail
18
+ description, and choose at least one of the condition options, -a, -b, -B,
19
+ -c, -d, -D, -h, -i, -m, -n, -q, -e, -s, -S, -t, -T, and -y, to run this
20
+ application.
21
+
22
+ For all condition options, except option -a, an '!' sign can be added
23
+ between an option flag and its option values to get an excluding
24
+ condition. For example, choose '-c \! CommandNames' to gather check
25
+ usage for command names other than the ones given in CommandNames.
26
+ Refer to the example given at the end of this help document for how to
27
+ select excluding condition.
28
+
29
+ String condition options, -c, -n, -s, -S and -t, allow wildcard inputs.
30
+ '%' matches any number of characters and '_' matches any one character.
31
+ Refer to the example given at the end of this help document for how to
32
+ use wildcard for string condition options.
33
+
34
+ Output of this application is defaulted to page format with a page
35
+ header on each page. A page header includes main title, sub titles and
36
+ column titles according to which column names and options are selected,
37
+ as well as page number and report date. If the output is used directly
38
+ for input of other applications, add option -w to remove page header
39
+ and show only the column titles and the check usage information.
40
+
41
+
42
+ Column Options:
43
+ - Option -C, the ColumnNames must be present to run this application.
44
+ The flag -C can be omitted if it is the first parameter option on
45
+ the command line. The ColumnNames is a string that includes column
46
+ names listed below:
47
+
48
+ COLUMN - COLUMN - COLUMN
49
+ NAME - TITLE - DESCRIPTION
50
+ GroupColumns:
51
+ A*- ARGV - command argument variable string
52
+ C*- COMMNAD - command name, such as 'dsarch'
53
+ D*- DATE - check date, format as YYYY-MM-DD, for example 2004-04-25
54
+ E*- ERRMSG - error message if a check was processed unsuccessfully
55
+ G*- TRIED - number of tries for command 'dsarch', 1 otherwise
56
+ H - HOSTNAME - host name(s) the check can or cannot be processed on
57
+ I*- CHKIDX - check index
58
+ K*- TiME - check time, format as HH:MM:SS
59
+ L*- BATCHID - batch id if a batch job
60
+ M*- MONTH - format as YYYY-MM, for example 2004-04
61
+ N*- AN - action name for command, i.e. BR for dsrqst
62
+ P*- DATAPROC - how much of data processed for the check
63
+ Q*- QUETIME - number of seconds waited in queue if batch job
64
+ R - RUNTIME - number of seconds total run time (queue time included)
65
+ S - SPECIALIST - specialist name as owner of the check
66
+ T*- DATASET - format as dsnnn.n, for example d540001
67
+ W*- STATUS - check status, D-Done, F-Finished, E-Exit, I-Interrupted
68
+ Y*- YEAR - format as YYYY, for example 2004
69
+
70
+ * - field names can processed with zero usages
71
+ SummaryColumns:
72
+ B - MBYTESDATA - data sizes, in MB, by given GroupColumns
73
+ U - HREXEC - hours for execution by given GroupColumns
74
+ V - HRQUEUE - hours for queuing on batch nodes by given GroupColumns
75
+ J - #FILEPROC - number of unique files requested by given GroupColumns
76
+ F - FILECOUNT - number of files to be processed by given GroupColumns
77
+ Z - #CHECKS - number of checks by given GroupColumns
78
+ IndexColumn:
79
+ X - INDEX - index of line, it should be the first column
80
+
81
+ The column names are used to build up string of ColumnNames, while
82
+ their associated column titles are shown in view/report output of
83
+ this application. The display order of the column titles is
84
+ determined by the order of the column names in the ColumnNames
85
+ string. At least one of the group and summary columns must be
86
+ selected, in the ColumnNames string, to generate check usage
87
+ view/report;
88
+
89
+ For example, choose '-C CMB' to display column titles of COMMAND,
90
+ MONTH and MBYTEDATA, in the first, second and third columns
91
+ respectively, for numbers of MBytes of data processed for each
92
+ command in each month;
93
+
94
+ - Option -O, sort check usage information in ascending or descending
95
+ order based on the column names specified in OrderColumnNames
96
+ string. These order column names must be in the selected
97
+ [-C] ColumnNames string. If an order column name is in upper case,
98
+ its associated column is sorted in ascending order, and a lower
99
+ case means sorting in descending order;
100
+
101
+
102
+ Condition Options:
103
+ - Option -a, for all recorded check usage history;
104
+
105
+ - Option -A, gives a row limit for querying;
106
+
107
+ - Option -b, batch IDs for checks are processed on batch nodes;
108
+
109
+ - Option -B, for checks processed on batch nodes between two
110
+ given batch IDs;
111
+
112
+ - Option -c, for checks with given command names;
113
+
114
+ - Option -d, for checks generated on given dates, in format YYYY-MM-DD;
115
+
116
+ - Option -D, for checks generated between two given dates, each date
117
+ is in format YYYY-MM-DD. Omit EndDate for no upper limit;
118
+
119
+ - Option -h, for checks processed on given host names;
120
+
121
+ - Option -i, for checks specified by given check indices;
122
+
123
+ - Option -m, for checks generated in given months, in format YYYY-MM;
124
+
125
+ - Option -n, for checks generated for specified action names;
126
+
127
+ - Option -q, for checks queued for given times in seconds;
128
+
129
+ - Option -r, for checks run for given times in seconds (queue times included);
130
+
131
+ - Option -s, for checks end up with given status;
132
+
133
+ - Option -S, login names of specialists who own the checks;
134
+
135
+ - Option -t, for checks associating to given dataset names;
136
+
137
+ - Option -T, for data files associating to datasets between
138
+ MinDataset and MaxDataset. Omit MaxDataset for no upper limit.
139
+ For example, -T d540000 d550009, for datasets numbers d540000-d550009;
140
+
141
+ - Option -y, for data files read in given years in format YYYY;
142
+
143
+
144
+ Miscellaneous Options:
145
+ - Option -w, view check usage info in simple format without totals
146
+
147
+ - Option -z, include zero usages for specified fields;
148
+
149
+ - Option -L, use given delimiter for output, instead of defaulted spaces;
150
+
151
+ - Option -U, show file or data sizes in given unit SizeUnit [BKMG].
152
+ B - Byte, K - KiloBytes, M - MegaByte, and G - GigaByte;
153
+
154
+ - Option -H, use given report title to replace the default one;
155
+
156
+ - Option > OutputFilename, redirect output into an output file,
157
+ for example, rqstusage.out, instead of viewing on screen directly;
158
+
159
+ - Option | lp -d PrinterName, redirect output to printer of PrinterName.
160
+ Replace PrinterName with lj100 to print through DSS LaserJet printer.
161
+
162
+
163
+ For example:
164
+ To view monthly check usage for each checks generated in year 2012 with columns,
165
+ INDEX(X), COMMAND(C), MONTH(N), #CHECKS(Z), and MBYTEDATA(B); ordered by MONTH as
166
+ ascending and MBYTESDATA(B) as descending; the command line should be:
167
+
168
+ viewcheckusage XCMZB -y 2012 -O Mb
169
+
170
+ For usage of commands start with 'ds' only, out of the check usage gathered
171
+ above, the command line should be:
172
+
173
+ viewcheckusage XCMZB -y 2012 -c ds% -O Mb
174
+
175
+ For usage of commands other than 'dsarch', the command line should be:
176
+
177
+ viewcheckusage XCMZB -y 2012 -c ! dsarch -O Mb
178
+
179
+ To redirect the query output to a file named checkusage.out:
180
+
181
+ viewcheckusage XCMZB -y 2012 -O Mb > checkusage.out
182
+
183
+ Then you can view the file or print it as a report.
184
+
185
+