rda-python-dscheck 1.0.1__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.
@@ -0,0 +1,737 @@
1
+
2
+ 1 INTRODUCTION
3
+
4
+ Program 'dscheck' is a utility to add, remove, view and process recorded commands
5
+ of other utility programs in Research Data Archive Management System (RDAMS). For
6
+ delayed execution, or called batch process, of utility programs, 'dsarch', 'dsupdt'
7
+ and 'dsrqst', the commands information and the directories where the commands are
8
+ initiated are saved into RDADB as check records. For any other specialist-defined
9
+ commands, they can be also put in delayed mode if the commands are added to
10
+ 'dscheck' control via Action -AC (-AddCheck).
11
+
12
+ The check records are processed automatically via a centralized 'dscheck' daemon,
13
+ although they can be processed manually on command line. During the execution of a
14
+ recorded command, the check record is locked in RDADB to prevent multiple executions
15
+ of the same command. The check records that retain command information are
16
+ automatically purged into check history when the commands are finished.
17
+
18
+ When a recorded command fails due to failures of computer system, storage disk/tape,
19
+ or the Database Management System, the check record is normally purged with status 'E'
20
+ for error, unless check-reprocessing ability is built into the utility program, such
21
+ as 'dsarch'. For a check-reprocessing command, the check record is retained in RDADB
22
+ Until the command is processed successfully or the number of executions reaches the
23
+ try limits allowed. Utility programs 'dsrqst' and 'dsupdt' carry their own failure-
24
+ recovering ability and they do not need check-reprocessing.
25
+
26
+ The purged check records are retained in RDADB. The check history can be viewed via
27
+ utility program 'viewcheckusage'.
28
+
29
+ Program 'dscheck' supports the following major functions:
30
+ - Set daemon control records for individual specialists to configure how many
31
+ concurrent processes of a specified command can be executed on a given host, and
32
+ the host priorities to define the order of which host is picked for processing
33
+ a check. Without the daemon control information, a recorded command will not be
34
+ started automatically.
35
+ - ADD a check record for delayed command execution of any specialist-defined commands
36
+ - View utility command information currently saved in RDADB
37
+ - Email the current status of a specified utility command or a list of commands,
38
+ and include error messages if any, to a specialist
39
+ - Delete recorded command information, because the command is not needed anymore
40
+ - Unlock a given recorded command in case lock information was not cleaned
41
+ properly when the command was failed
42
+ - Interrupt a utility command that is under execution and kill recursively all
43
+ the associated child processes
44
+ - Add the due 'dsrqst' and 'dsupdt' actions into dscheck records
45
+ - Process commands that have been recorded into RDADB or the ones have failed
46
+ previously.
47
+
48
+ The specialist who executes a utility command under 'dscheck' control remains
49
+ the exclusive owner of the check record in RDADB. This prevents the command to be
50
+ processed or deleted accidentally by other specialists.
51
+
52
+ In the following sections, general usages of 'dscheck' are described first; and
53
+ detail descriptions of Action options are given; and finally Mode and Info
54
+ options are explained.
55
+
56
+ 2 GENERAL DSCHECK USAGE
57
+
58
+ dscheck [Action Option] [Mode Options] [Info Options]
59
+ or
60
+ dscheck [-(IF|InputFile)] InputFileNames
61
+
62
+ Quotes [] indicate optional. A pipeline '|' in parentheses as in format (A|B)
63
+ means either A or B can be used. The options applied to 'dscheck' are divided
64
+ into three categories, Action, Mode, and Information (Info for short) options.
65
+ Action options are used to specify what tasks this utility program to execute,
66
+ Mode options are used to modify behaviors of the actions, and the Info options
67
+ are used to pass information, one or multiple values, to run 'dscheck'. An option
68
+ can be given in form of either short name or long name, -DS or -Dataset for
69
+ example. Some options have alias names for convenience; -UnLock, for example,
70
+ is an alias option name for Mode option -UL (-UnLockCheck). Option names can be
71
+ given in either upper or lower cases, while the values following Info options
72
+ are case sensitive.
73
+
74
+ Specify one of the Action options each time to execute 'dscheck'. Based on what
75
+ Action is chosen, some of the Info options are mandatory and others are optional
76
+ and certain Mode options can be applied to alter the behaviors of the Action.
77
+
78
+ All options, except Info option -IF (-InputFile), can be given either on command
79
+ line or in input files. Input file names are presented per Info option -IF and
80
+ can only be provided on command line. Referring to description of Info option -IF
81
+ (-InputFile) for detail on how to present options in input files. One or multiple
82
+ input files, combined with options on command line, are allowed to run 'dscheck'.
83
+ The option name, -IF (-InputFile), itself can be omitted if a single input file is
84
+ given on command line and all other option information are provided inside the
85
+ input file.
86
+
87
+ When information of daemons and checks are retrieved, Info options are used to
88
+ specify conditions for querying information from RDADB. Some special signs can be
89
+ used to further confine the information with special and complicated conditions;
90
+ they are '!', '<', '>' and '<>'. These special signs, if provided on command
91
+ line, must be quoted or escaped to avoid of being interpreted by Unix OS system.
92
+ The '!', or \!, means exclusion to the following value(s) and it must be the
93
+ first item following an Info option name, while '<' or '>' mean greater or less
94
+ than the following value and '<>' means between the following two values.
95
+ Combine '!' and '<', as syntax "'!' '<' OptionValue", to make a condition of
96
+ 'larger than or equal to OptionValue'.
97
+
98
+ Description of an individual option is displayed if 'dscheck' is issued on
99
+ command line as
100
+
101
+ dscheck [Option] -(h|help) [Option]
102
+
103
+ A description is displayed for an option given either before or after -(h|help).
104
+ If no option is specified or 'dscheck' is issued by itself, this whole document
105
+ is displayed per UNIX utility 'more'. A hard copy of this help document can be
106
+ printed from the saved file: ${DSSHOME}/dssdb/prog_usage/dscheck.usg.
107
+
108
+ #The online HTML version of this document is available at
109
+ #http://dss.ucar.edu/internal/docs/dscheck/
110
+
111
+
112
+ 3 ACTION OPTIONS
113
+
114
+ Action options are used to specify what task 'dscheck' executes. No values
115
+ are allowed to follow Action options. Multiple Action options provided
116
+ simultaneously are blocked.
117
+
118
+ Based on the information being manipulated, the actions are divided into three
119
+ categories:
120
+ Daemon Control Actions - create, delete, modify and view daemon control information
121
+ in RDADB, of specified specialist, command and hostname
122
+ Check Actions - add, delete, unlock and view check information of the
123
+ active individual checks
124
+ Check Process Actions - process checks by starting commands on remote hosts as
125
+ configured in daemon controls and purge checks by recording
126
+ the commands and their execution information into check
127
+ history; interrupt the current executing commands by killing
128
+ the current process and its all children; and email status
129
+ of current checks
130
+ Daemon Host Connectivity - check connectivity of daemon hosts for specialists
131
+
132
+ 3.1 Daemon Control Actions
133
+
134
+ A daemon control record for a command, a specialist and a hostname is used to
135
+ configure how many concurrent processes the specified command can be executed
136
+ for the specialist on specified hostname, and the priority the the hostname is
137
+ picked to start the command. A running centralized daemon reads this record
138
+ periodically in case the configuration is changed while the daemon is still
139
+ running, so that specialists can reset the values in daemon control records to
140
+ change the behave of dscheck daemon dynamically without shutting the daemon down.
141
+
142
+ Daemon control information can be created, modified and viewed via Actions
143
+ included in this section:
144
+ Set Daemon Control - create and modify daemon control information for specified
145
+ specialists, commands and hostnames
146
+ Get Daemon Control - retrieve information of existing daemon controls
147
+ Delete Daemon Control - delete one or multiple daemon control records
148
+
149
+ 3.1.1 Set Daemon Control
150
+ -SD or -SetDaemon, creates and modifies daemon control information into
151
+ RDADB for given specialist login names, commands, and hostnames of computers on
152
+ which the check commands are processed. One or multiple records can be set each
153
+ time.
154
+
155
+ dscheck -(SD|SetDaemon) [Mode Option]
156
+ [-(DI|DaemonIndex) controlIndices]
157
+ [-(CM|Command) UtilityProgramNames] # ALL for any command names
158
+ [-(SN|Specialist) DECSSpecialists]
159
+ [-(HN|HostName) HostMachineNames]
160
+ [-(MH|MatchHost) FlagToMatchHostname]
161
+ [-(PL|ProcessLimit) MaxNumberOfProcesses],
162
+ [-(PO|Priority) HostListOrder]
163
+
164
+ Mode option that can be specified for this action include:
165
+ -(ND|NewDaemon) - sets a new daemon control record into RDADB
166
+
167
+ If information of a daemon control exists already in RDADB for a given specialist,
168
+ a command and a hostname, the daemon control record is modified; otherwise, a new
169
+ daemon control record is added if daemon index is 0 and Mode option -ND (-NewDaemon)
170
+ is present. Combination of specialist login name, command name and hostname of
171
+ computer must be unique for for each daemon control record.
172
+
173
+ Specify host name 'SLURM' for putting the command in the SLURM batch control system. If
174
+ a specified command name is not found in the daemon control, the general 'dscheck'
175
+ configuration for command name 'ALL' is used.
176
+
177
+ For example, set daemon control information for schuster, all commands on SLURM hosts,
178
+ for maximum 4 checks can be processed at the same time with priority 1, the smaller
179
+ the number the higher the priority is, via input file daemon.ctl
180
+
181
+ dsrqst SD -ND -IF daemon.ctl
182
+
183
+ <<Content of input file daemon.ctl>>
184
+ DaemonIndex<:>Command<:>Specialist<:>Hostname<:>ProcessLimit<:>Priority<:>
185
+ 0<:>schuster<:>ALL<:>SLURM<:>4<:>1<:>
186
+
187
+
188
+ 3.1.2 Get Daemon Control
189
+ -GD or -GetDaemon, retrieves daemon control information for given commands,
190
+ specialists or hostnames. Daemon control information of specified specialists
191
+ are retrieved if the specialist login names are provided. Without specified
192
+ condition, only the daemon control records set for the specialist who runs
193
+ 'dscheck' are retrieved.
194
+
195
+ dscheck -(GD|GetDaemon) [Mode Option]
196
+ [-(FN|FieldNames) FieldNameString]
197
+ [-(DI|DaemonIndex) controlIndices]
198
+ [-(CM|Command) UtilityProgramNames]
199
+ [-(SN|Specialist) DECSSpecialists]
200
+ [-(HN|HostName) HostMachineName]
201
+ [-(PL|ProcessLimit) MaxNumberOfProcesses]
202
+ [-(PO|Priority) ProcessPriority]
203
+ [-(OF|OutputFile) OutputFileName]
204
+ [-(DB|Debug) DebugModeInfo]
205
+
206
+ Mode option that can be specified for getting check control Action:
207
+ -(FO|FormatOutput) - format the column output with a fix width for all values
208
+ of a given field
209
+
210
+ Use Info option -FN (-FieldNames) to specify what daemon control fields to be
211
+ retrieved. It defaults to all available fields if option -FN is not provided.
212
+
213
+ Valid field names of daemon controls and their corresponding Info option
214
+ names:
215
+
216
+ Names Info Options Descriptions
217
+ I -(DI|DaemonIndex) daemon control index
218
+ C -(CM|Command) command names of utility programs
219
+ H -(HN|Hostname) computer hostname
220
+ M -(MH|MatchHost) Flage to control hostname match
221
+ S -(SN|Specialist) DECS specialist the daemon set for
222
+ P -(PL|ProcessLimit) Max check count to be processed at the same times
223
+ O -(PO|Priority) host priority a specified command to start on
224
+
225
+ Daemon control information can be retrieved for specified specialist per option
226
+ -SN (-Specialist), and/or other conditions. Info option -SN, -CM and -HN accept
227
+ wildcard input of '%' for matching any number of characters.
228
+
229
+ If daemon control index is not given, 'dscheck' gathers only the daemon control
230
+ records owned by the specialist who executes this getting daemon control Action.
231
+ To view daemon control records owned by another specialist, you need specify Info
232
+ option -SN (-Specialist). To view all control records, you simply provide option
233
+ -SN with value of 'ALL'.
234
+
235
+ For example, to get all daemon control information currently set for you
236
+
237
+ dscheck GD
238
+
239
+
240
+ 3.1.3 Delete Daemon Control
241
+ -DL or -Delete (Alias: -RM, -Remove), deletes one or multiple daemon control records
242
+ from RDADB for given daemon control indices.
243
+
244
+ dscheck -(DL|Delete)
245
+ -(DI|DaemonIndex) DaemonControlIndices
246
+ [-(DB|Debug) DebugModeInfo]
247
+
248
+ Use this action to delete daemon control information. Delete a daemon
249
+ control record to remove the daemon specific configuration for a command,
250
+ a specialist and a hostname.
251
+
252
+ 3.2 Check Actions
253
+ Delayed mode command executions for due actions of 'dsupdt' and 'dsrqst' are
254
+ recorded automatically, while other commands, including 'dsarch' and specialist-
255
+ defined ones, can be manually added into 'dscheck'. Command information can be
256
+ added, viewed and manipulated via 'dscheck' actions:
257
+ Add Check - Add a new check record for a specified command
258
+ Get Check - get the command information recorded in check records
259
+ Delete Check - delete check records for no need of processing the commands
260
+ Unlock Check - unlock check records in case that its recorded command is aborted
261
+ without cleaning the lock
262
+
263
+ 3.2.1 Add Check
264
+ -AC or -AddCheck, adds check information for a delayed mode command execution.
265
+
266
+ dscheck -(AC|AddCheck) [Mode Option]
267
+ -(CM|Command) CommandNames
268
+ [-(AV|ArgumentVector) ArgumentVectorString]
269
+ [-(SN|Specialist) SpecialistNames]
270
+ [-(HN|HostName) HostNames]
271
+ [-(DS|Dataset) DatasetIDs]
272
+ [-(AN|ActionName) ActionNames]
273
+ [-(PI|ParentIndex) ParentCheckIndex]
274
+ [-(PQ|PBSQueue) PBSBatchQueue]
275
+ [-(WD|WorkDir) WorkingDirectory]
276
+ [-(MC|MaxCount) MaxTryCount]
277
+ [-(MO|Modules) ModuleList]
278
+ [-(EV|Environments) EnvironmentPairList]
279
+ [-(QS|QsubOptions) PBSBatchOptions]
280
+ [-(OF|OutputFile) OutputFileName]
281
+ [-(DB|Debug) DebugModeInfo]
282
+
283
+ Mode option that can be specified for adding check control Action:
284
+ -(AW|AnyWhere) - sets Working directory empty in check record to start processing
285
+ the check anywhere.
286
+
287
+ Command name is mandatory for adding a new check for delayed mode execution.
288
+ Unless they are specified, the current specialist who adds the command is defaulted
289
+ as the owner of the added check record, and the current path is defaulted as the
290
+ working directory when the command is executed later.
291
+
292
+ Specified addtional PBS batch options via Info option -QS (-QSubOptions) to add a check;
293
+ and specify a parent check index to put the current command on hold until the parent
294
+ check is finished.
295
+
296
+ Commands containing redirections and pipes are not supported for delayed mode.
297
+ A simple shell script can be used to wrap a complicated command.
298
+
299
+ For example, to list file names in the current directory with name containing 'test'
300
+ by catching the standard output into a log and display it on screen
301
+
302
+ <<Content of shell script test1.sh>>
303
+ #!/bin/sh
304
+ (ls -l | grep test) | tee test1.out
305
+
306
+ For example, to list file names in the current directory with name containing 'test'
307
+ by catching the standard output and error into separate log files
308
+
309
+ <<Content of shell script test2.sh>>
310
+ #!/bin/sh
311
+ (ls -l | grep test) 1> test2.out 2>test2.err
312
+
313
+ For example, to add testing command 'test2' into 'dscheck' for delayed mode execution on
314
+ SLURM
315
+
316
+ dsheck AC -CM test2 -HN SLURM
317
+
318
+ The command 'test2' must be executable at the current working directory on SLURM machines.
319
+
320
+
321
+ 3.2.2 Get Check
322
+ -GC or -GetCheck, gets check information recorded in RDADB.
323
+
324
+ dscheck -(GC|GetCheck) [Mode Options]
325
+ [-(FN|FieldNames) FieldNameString]
326
+ [-(CI|CheckIndex) CheckIndices]
327
+ [-(ON|OrderNames) OrderNameString]
328
+ [-(CM|Command) CommandNames]
329
+ [-(AV|ArgumentVector) ArgumentVectorString]
330
+ [-(SN|Specialist) SpecialistNames]
331
+ [-(DS|Dataset) DatasetIDs]
332
+ [-(AN|ActionName) ActionNames]
333
+ [-(CD|CheckDate) CommandDate]
334
+ [-(CT|CheckTime) CommandTime]
335
+ [-(WD|WorkDir) WorkingDirectory]
336
+ [-(PQ|PBSQueue) PBSBatchQueue]
337
+ [-(OF|OutputFile) OutputFileName]
338
+ [-(DB|Debug) DebugModeInfo]
339
+
340
+ Mode options that can be specified for getting check Action:
341
+ -(CS|CheckStatus) - check and show detail information on check status
342
+ -(FO|FormatOutput) - format the column output with a fix width for all values
343
+ of a given field
344
+
345
+ Use Info option -FN (-FieldNames) to specify what check fields to retrieve.
346
+ It defaults to "COVTUFJDNW" if -FN is not given.
347
+
348
+ Valid check field names and their corresponding Info options:
349
+
350
+ Names Info Options Descriptions
351
+ C -(CI|CheckIndex) check index
352
+ O -(CM|Command) original command name
353
+ V -(AV|ArgumentVector) argument line following command, up to 100 chars
354
+ T -(DS|Dataset) dataset ID, the original command run against
355
+ A -(AN|ActionName) action name for a given command
356
+ U -(ST|Status) check status for a recorded command
357
+ B -(DF|DownFlags) Storage system down flags: H-HPSS,D-DRDATA,G-GLADE,O-ObjectStore
358
+ P -(PQ|PBSQueue) PBS batch queue name: rda or htc
359
+ R -(PI|ParentIndex) parent check index the current one to wait on
360
+ F -(FC|FileCount) number of files need to be processed
361
+ J -(DC|DoneCount) number of files are processed already
362
+ K -(TC|TryCount) number of tries the command is executed
363
+ L -(MC|MaxCount) upper limit for number of command tries
364
+ Z -(SZ|DataSize) total tytes of data processed for the command
365
+ D -(CD|CheckDate) date the command is initially recorded
366
+ Y -(CT|CheckTime) time the command is initially recorded
367
+ H -(HN|HostName) host names the command can or cannot run on
368
+ N -(SN|Specialist) specialist login name who starts the command
369
+ W -(WD|WorkDir) working directory where the command is started
370
+ M -(MO|Modules) include modules to load to batch job script
371
+ I -(EV|Environments) include environment vairables to load to batch job script
372
+ Q -(QS|QsubOptions) additional PBS batch options for qsub
373
+ X -(AX|ArgumentExtra) additional argument line beyond 100 characters
374
+ E -(ER|ErrorMessage) error message from failed command
375
+
376
+ Check information can be retrieved for specified check index per option
377
+ -CI (-CheckIndex). Without any condition, the check records owned by the
378
+ current specialist are retrieved.
379
+
380
+
381
+ 3.2.3 Delete Check
382
+ -DL or -Delete, deletes one or multiple 'dscheck' records from RDADB
383
+ for given check indices.
384
+
385
+ dscheck -(DL|Delete)
386
+ -(CI|CheckIndex) CheckIndices
387
+ [-(DB|Debug) DebugModeInfo]
388
+
389
+ Use this action to delete check information. A deleted check record is saved
390
+ into check history for viewing later via utility program 'viewcheckusage'.
391
+
392
+
393
+ 3.2.4 Unlock Check
394
+ -UL or -UnLockCheck, (Alias: -UnLock), unlocks check records that their
395
+ commands aborted abnormally during processes.
396
+
397
+ Process ID and computer hostname are saved in a check record when the recorded
398
+ command is running. If the process aborts abnormally, the PID and hostname may
399
+ sometimes be not cleaned properly. Use this action to clean up the locking
400
+ information to allow the command to be reprocessed or purged.
401
+
402
+ dscheck -(-UL|UnLockCheck)
403
+ -(CI|CheckIndex) CheckIndices
404
+ [-(DB|Debug) DebugModeInfo]
405
+
406
+ It is mandatory to provide a check index to remove lock on a recorded command.
407
+
408
+
409
+ 3.3 Check Process Actions
410
+ Delayed mode command executions recorded in RDADB are automatically started,
411
+ or restarted, by the common 'dscheck' daemon. Running commands can be interrupted
412
+ at any time and the child processed of the interrupted commands are also cleaned up.
413
+ The status of the current check records can be gathered and emailed to a specialist.
414
+
415
+ Here are the actions for process checks:
416
+ Process Check - start a command from its information recorded in 'dscheck'
417
+ Interrupt Check - interrupt a running command for given check record and clean the
418
+ child processes
419
+ Email Check - email a specialist for the status of the current check records
420
+
421
+ 3.3.1 Process Check
422
+ -PC or -ProcessCheck, starts process commands in check records in daemon or
423
+ non-daemon modes. Check indices can be specified if in non-daemon mode.
424
+
425
+ dscheck -(PC|ProcessCheck) [Mode Options]
426
+ [-(CI|CheckIndex) CheckIndices]
427
+ [-(DM|DaemonMode) (start|stop|logon|logoff)]
428
+ [-(LH|LocalHost) [LocalHostname]]
429
+ [-(WI|WaitInterval) WaitIntervalInSeconds]
430
+ [-(MT|MaxrunTime) MaximumRunTimeInSeconds]
431
+ [-(DB|Debug) DebugModeInfo]
432
+
433
+ Mode options that can be specified for processing check Action:
434
+ -(BG|BackGround) - background process to turn off screen display for both
435
+ standard outputs and errors
436
+ -(CP|CheckPending) - Check and kill long pending checks
437
+ -(LO|LogOn) - log detail for daemon mode
438
+ -(NC|NoCommand) - does not issue remote commands if this Mode option is present
439
+ -(WU|WithdsUpdt) - in non-daemon mode, add check records for due 'dsupdt' actions
440
+ configured in update control records
441
+ -(WR|WithdsRqst) - in non-daemon mode, add check records for 'dsrqst' records
442
+ due to be built or purged
443
+
444
+ In daemon mode, 'dscheck' sleeps two minutes (120 seconds as default), unless
445
+ provided differently per option -WI (-WaitInterval), between processing check
446
+ records. Every time it wakes up, 'dscheck' first tries to add the due update
447
+ controls for command 'dsupdt' and add requests due to be built or purged for
448
+ command 'dsrqst', and then starts, or restarts, commands recorded in check
449
+ records on a computer according the priorities configured in the daemon controls.
450
+
451
+ In non-daemon mode, Mode options -WU and -WR must be present for due actions
452
+ of 'dsupdt' and 'dsrqst' to be added to check records. All current standing
453
+ check records, unless check indices are specified, are processed on machines
454
+ according to the configured information in daemon controls.
455
+
456
+ 3.3.2 Interrupt Check
457
+ -IC or -InterruptCheck, interrupts checks that their commands are currently running
458
+ and also kills recursively all the child processes that are running under the
459
+ commands. Locks are cleaned too when the checks are interrupted.
460
+
461
+ dscheck -(-IC|InterruptCheck) [Mode Option]
462
+ -(CI|CheckIndex) CheckIndices
463
+ [-(DB|Debug) DebugModeInfo]
464
+
465
+ Mode option that can be specified for this action:
466
+ -(FI|ForceInterrupt) - it must be present for this action to interrupt a check
467
+ that is under processing.
468
+
469
+ It is mandatory to provide a check index to interrupt its command.
470
+
471
+ 3.3.3 Email Check
472
+ -EC or -EmailCheck, sends an email to a specialist for the current status of all check
473
+ records owned by the specialist, unless more specific conditions are provided.
474
+
475
+ dscheck -(EC|EmailCheck)
476
+ [-(CI|CheckIndex) CheckIndices]
477
+ [-(CM|Command) CommandNames]
478
+ [-(AV|ArgumentVector) ArgumentVectorStrings]
479
+ [-(SN|Specialist) SpecialistNames]
480
+ [-(DS|Dataset) DatasetNames]
481
+ [-(CD|CheckDate) CommandDate]
482
+ [-(CT|CheckTime) CommandTime]
483
+ [-(WD|WorkDir) WorkingDirectory]
484
+ [-(CC|CarbonCopy) Cc'dEmailAddresses]
485
+ [-(DB|Debug) DebugModeInfo]
486
+
487
+ Command error messages are included too if any error messages are recorded in
488
+ the check record.
489
+
490
+ 3.4 Daemon Host Connectivity
491
+ -CH or -CheckHost, checks connectivity of daemon hosts for specialists.
492
+
493
+ dscheck -(CH|CheckHost)
494
+ [-(DI|DaemonIndex) controlIndices]
495
+ [-(CM|Command) UtilityProgramNames]
496
+ [-(SN|Specialist) DECSSpecialists]
497
+ [-(HN|HostName) HostMachineName]
498
+ [-(PL|ProcessLimit) MaxNumberOfProcesses]
499
+ [-(PO|Priority) ProcessPriority]
500
+ [-(DB|Debug) DebugModeInfo]
501
+
502
+ 3.5 Set Batch Options Dynamically
503
+ -SO or -SetOptions (Alias: -SetBatchOptions), processes batch options with
504
+ a leading '!' to build options dynamically.
505
+
506
+ dscheck -(SO|SetOptions)
507
+ [-(HN|HostName) HostNames]
508
+ [-(PL|ProcessLimit) MaxNumberOfProcesses]
509
+ [-(MO|Modules) ModuleList]
510
+ [-(EV|Environments) EnvironmentPairList]
511
+ [-(QS|QsubOptions) PBSBatchOptions]
512
+ [-(DB|Debug) DebugModeInfo]
513
+
514
+
515
+ 4 MODE OPTIONS
516
+
517
+ Use proper Mode options to modify behaviors of Action options. Mode options
518
+ are all optional. No value is allowed to be passed in following any Mode option.
519
+
520
+ -AW or -AnyWhere, for Action -AC (-AddCheck), sets Working directory empty in
521
+ cehck record to start processing the check anywhere.
522
+
523
+ -BG or -BackGround (Alias: -b), background process. When it presents
524
+ screen display is turned off for both standard outputs and errors. -(CP|CheckPending) - Check and kill long pending checks
525
+
526
+ -CP or -CheckPending, if present for Action -PC (-ProcessCheck), check and kill
527
+ long pending checks
528
+
529
+ -CS or -CheckStatus, if present, displays detailed status information of the
530
+ recorded commands, including progress percentage for a running command and
531
+ error message for a failed command.
532
+
533
+ -FI or -ForceInterrupt, if present, force interrupts a check that is still under
534
+ processing; otherwise a warning message will display.
535
+
536
+ -FO or -FormatOutput, if present, formats column output results for get
537
+ actions. A same width, evaluated dynamically, is applied for all values of a
538
+ given field.
539
+
540
+ -LO or -LogOn (Alias: -LoggingOn), turns detail logging on when 'dscheck' starts
541
+ in Daemon mode. The detail logging is off as default if this Mode option is
542
+ not present.
543
+
544
+ -MD or -MyDataset, allows a specialist to manipulate check information of
545
+ a given dataset listed for another specialist.
546
+
547
+ -NC or -NoCommand (Alias: -NoRemoteCommand), does not issue remote commands if
548
+ this Mode option is present for action -PC (-Processcheck).
549
+
550
+ -ND or -NewDaemon, a new daemon control can only be added when this Mode option is
551
+ present and daemon control index is given as 0 when Action -SD (-SetDaemon) of
552
+ 'dscheck' is executed. This Mode option blocks mistakes of adding daemon control
553
+ records unintentionally.
554
+
555
+ -NT or -NoTrim, skips trimming of spaces and comments from input values to
556
+ speed up reading input file(s).
557
+
558
+ -WR or -WithdsRqst, adds requests due to be built or purged of command 'dsrqst'
559
+ for 'dscheck' Action -PC (-ProcessCheck) in non-daemon mode.
560
+
561
+ -WU or -WithdsUpdt, adds due update controls of command 'dsrqst' for 'dscheck'
562
+ Action -PC (-ProcessCheck) in non-daemon mode.
563
+
564
+ 5 INFORMATION OPTIONS
565
+
566
+ Information options are used to pass information, one or multiple values, into
567
+ 'dscheck'. Two types of Info options are used:
568
+ Single-Value Info Options - pass a single value to 'dscheck'
569
+ Multi-Value Info Options - pass one or multiple values to 'dscheck'
570
+
571
+ 5.1 Single-Value Info Options
572
+
573
+ A single-value Info option is used to pass one value into this application.
574
+ One value, and one only, must follow a single-value option; otherwise an
575
+ error message is displayed if no value or more than one value passed in.
576
+
577
+ -DM or -DaemonMode, passes daemon mode values, start, stop, logon or logoff
578
+ to 'dscheck' Action -PC (-ProcessCheck) to start, to stop, to log detail or
579
+ not to log detail, correspondingly.
580
+
581
+ -DV or -Divider (Alias: -Delimiter, -Separator), delimiter for separating
582
+ columns of multi-value Info options in input files. It is default to '<:>'.
583
+
584
+ -ES or -EqualSign, for an equal sign of assigning one value to either a
585
+ single-value option or multi-value option in input files. It is defaulted
586
+ to '<=>'.
587
+
588
+ -FN or -FieldNames, for a string of single letter field names. Values of
589
+ the selected fields are retrieved for check information per actions -GC
590
+ (-GetCheck).
591
+
592
+ -LH or -LocalHost, specify a local hostname to processes checks on the host for
593
+ action -PC(-ProcessCheck). It defaults to '' to use the local host name. Specify
594
+ SLURM or PBS to process batch jobs.
595
+
596
+ -MT or -MaxrunTime, specify the maxmum run time for deamon mode. It defaults to 0
597
+ for unlimit time. For examples, 5000 means seconds, and 1D means 1 day for 86400
598
+ seconds.
599
+
600
+ -OF or -OutputFile, leads an output file name into which the output result
601
+ of this application is dumped. If this option is not given, the result is
602
+ displayed as standard output.
603
+
604
+ -ON or -OrderNames, for a string of single letter field names use to order
605
+ the results of getting check information via action -GC (-GetCheck).
606
+
607
+ -AO or -ActOption, for setting Action and Mode options in input files. It is
608
+ default to '<!>'.
609
+
610
+ -WI or -WaitInterval, defaults to 2 minutes (120 seconds). It is used as a time
611
+ intervals for the 'dscheck' daemon to sleep between processing check records.
612
+
613
+ 5.2 Multi-Value Info Options
614
+
615
+ A multi-value Info option is used to pass multiple values for one Info option
616
+ into 'dscheck'. At lease one value must follow each multi-value option.
617
+
618
+ -AN or -ActionName (Alias: -Action), specifies an action name for given command
619
+ name recorded in check record.
620
+
621
+ -AV or -ArgumentVector, the space delimited argument vector string up to 100
622
+ characters. It is quoted with single quotes '' for a individual argument
623
+ containing spaces.
624
+
625
+ -AX or -ArgumentExtra, the space delimited argument vector string beyond 100
626
+ characters. This field is not empty only if the argument vector string is
627
+ longer than 100 characters.
628
+
629
+ -CC or -CarbonCopy, provides additional one or multiple email addresses on
630
+ command line to send Cc'd email notification of the check status. For
631
+ DECS specialist, login user names themselves are acceptable; otherwise full
632
+ email addresses are required for email domains other than 'ucar.edu'.
633
+
634
+ -CD or -CheckDate, the check date of the recorded command is first processed.
635
+
636
+ -CI or -CechkIndex, check record indices for commands recorded in RDADB. A check
637
+ record is automatically purged if the command is finished.
638
+
639
+ -CM or -Command (Alias: -CommandName), the command name recorded in check record.
640
+
641
+ -CT or -CheckTime, the check time of the recorded command is first processed.
642
+
643
+ -DB or -Debug, turns on debug mode with specified information. This option
644
+ provides up to 3 values, they are Debug Level, debug log file path and debug
645
+ log file name. The debug level is mandatory for this option. It can be a
646
+ single integer value, for example, 1000 means to log debug messages for debug
647
+ levels 1 to 1000; or a range of values, for example, 200-1000 means to log
648
+ debug messages from debug levels 200 to 1000. The default debug file path is
649
+ '$DSSHOME}/dssdb/log' and the default debug file name is 'mydss.dbg'. Provides
650
+ the second and third values for this option to override the default ones
651
+ respectively.
652
+
653
+ -DC or -DoneCount, the number of files that are processed successfully already.
654
+
655
+ -DF or -DownFlags, storage system down flags. The current supported flags are:
656
+ H-HPSS, D-DRDATA, G-GLADE, O-ObjectStore. It can hold multiple flags, up to 5,
657
+ for all down storage systems.
658
+
659
+ -DI or -DaemonIndex, daemon control indices. A daemon control record retains
660
+ configuration information for how many processes on what host and its priority
661
+ can a command be started for specified specialist.
662
+
663
+ -DS or -Dataset, for dataset numbers, or called dataset IDs in form as [a-z]NNNNNN.
664
+
665
+ -ER or -ErrorMessage, error message of a failed check command.
666
+
667
+ -EV or -Environments, (Alias: -Envs), specifies environment variables, in form of
668
+ VarName=VarValue and separated by ',', needed to be set to execute a command as
669
+ a batch job. The environment varaibles will be set in the batch starting script.
670
+
671
+ -FC or -FileCount, the number of files to be processed by a check command.
672
+
673
+ -HN or -HostName, specify the host names the check can or cannot be processed on.
674
+
675
+ -IF or -InputFile, for input file names; one or multiple file names may be
676
+ given on command line. Input files are used to hold all valid options and
677
+ the associated values of Info options that need to be passed in for
678
+ execution of 'dscheck'.
679
+
680
+ In a input file, lines start with sign '#' are considered as comments;
681
+ Option Names can be given either short, long or alias names. Action and Mode
682
+ options are given in format of OptionName<!>. Single value Assignment is
683
+ given in format of OptionName<=>OptionValue. One option is given on each line.
684
+ Different setting sign of Action and Mode options can be provided by Info
685
+ option -AO (-ActOption, default to <!>); and different equal sign of single
686
+ value assignment can be provided by Info option -ES, (-EqualSign, default to
687
+ '<=>'). Multi-value assignments can be given in columns delimited with
688
+ separator specified per option -SP (-Separator, default to '<:>'). It starts
689
+ with a column title line for multi-value option names and the rest holds
690
+ values corresponding to each column titles. The value information stops at
691
+ the end of the file or when a new column name line or another single value
692
+ assignment appears. If the last column is a multi-line value field, an
693
+ additional separator must be appended for each line, including the column
694
+ title line to end lines properly.
695
+
696
+ -MC or -MaxCount, the maximum number of tries for a check command can be processed
697
+ if the command is failed.
698
+
699
+ -MH or -MatchHost (Alias: -MatchHostname), flag to control hostname match.
700
+ 'G' - general match, including emty hostname specified, or exclusive hostnames
701
+ given but the hostname is not in the list, and 'M' - match only the hostname
702
+ specified is identical to the current host.
703
+
704
+ -MO or -Modules, (Alias: -Mods), specifies module names, separated by ',',
705
+ needed to be loaded to execute a command as a batch job. The modules will
706
+ be set in the batch starting script.
707
+
708
+ -PI or -ParentIndex, specifies a parent check index for the current check to
709
+ wait on.
710
+
711
+ -PO or -Priority, specifies the priority of a given host so that the host is
712
+ picked in such an order to start a 'dscheck' process.
713
+
714
+ -PL or -ProcessLimit, specifies how many processes can be started for specified
715
+ command and specialist on a given host; Work for Action -SO (-SetOptions) to limit
716
+ how many concurrent cron processes.
717
+
718
+ -PQ or -PBSQueue, specifies PBS batch queue index the current check to submit to.
719
+
720
+ -QS or -QsubOptions, (Alias: -PBSOptions), specifies options to execute a command
721
+ as a batch job via qsub on PBS nodes. The qsub options must be quoted when prsented
722
+ on command line, such as, -QS '-l walltime=12:00:00'.
723
+
724
+ -SN or -Specialist, the specialist who runs the original command. This Info
725
+ option is working with Action -GC (-GetCheck) only to view check information
726
+ of a specified specialist.
727
+
728
+ -ST or -Status, check command status for a check record. Include command
729
+ progress percentage if under process and error message for a failed command.
730
+
731
+ -SZ or -DataSize, the total bytes of data is processed for the check record.
732
+
733
+ -TC or -TryCount, the number of tries for a check command being processed. It
734
+ is up to the number of tries specified via info option -MC.
735
+
736
+ -WD or -WorkDir (Alias: -WorkDirectory), the working directory where the
737
+ the recorded command is started.