HP OpenVMS Systemsask the wizard |
The Question is: Subprocess statistics at job termination: I'd like my log file from a batch job to reflect resource consumption of parent as well as subprocesses. I can't find the correct set of lexicals to grab what I need. (I can find out info about the parent process, but I can't find a way to grab the subprocess pid.) Any hints? The Answer is :
Try
$ SHOW PROCESS/ACCOUNT subprocess-name
or
$ SHOW PROCESS/ACCOUNT/ID=pid
For example:
$ spawn
%DCL-S-SPAWNED, process WIZARD_1 spawned
%DCL-S-ATTACHED, terminal now attached to process WIZARD_1
$ attach wizard
%DCL-S-RETURNED, control returned to process WIZARD
$ show process/account wizard_1
19-DEC-1998 08:14:18.05 User: WIZARD Process ID: 23000386
Node: KYOSHI Process name:
"WIZARD_1"
Accounting information:
Buffered I/O count: 33 Peak working set size: 1152
Direct I/O count: 1 Peak virtual size: 40944
Page faults: 70 Mounted volumes: 0
Images activated: 1
Elapsed CPU time: 0 00:00:00.12
Connect time: 0 00:00:23.02
$
You could also use the lexical function F$GETJPI, specifying the PID of
the subprocess to gather information. For example:
$ bufio=F$GETJPI("23000386","BUFIO")
$ show sym bufio
BUFIO = 33 Hex = 00000021 Octal = 00000000041
Alternatively, something such as the following:
$ logout/full
Process WIZARD_4 logged out at 21-DEC-1998 12:47:19.32
Accounting information:
Buffered I/O count: 72 Peak working set size: 1616
Direct I/O count: 0 Peak virtual size: 166672
Page faults: 105 Mounted volumes: 0
Charged CPU time: 0 00:00:00.02 Elapsed time: 0 00:00:00.74
%DCL-S-RETURNED, control returned to process WIZARD_0037
$
And, of course, accounting and/or auditing can be used.
|