Spooler Programmer's Guide
Spooler Procedure Calls
Spooler Programmer’s Guide—522287-002
4-52
Obtaining the Spooler Statistics and Status
Obtaining the Status of a Collector (Command Code 4)
To obtain the status of a collector, set the command-code parameter of
SPOOLERSTATUS2 to 4 and pass either a 64-word status buffer to
SPOOLERSTATUS or a 128-word status buffer to SPOOLERSTATUS2. The following
STRUCT shows the fields of the buffer:
STRUCT collector;
BEGIN
STRING name [0:5]; ! collector process name, in
! local form, blank-filled
INT state, ! collector state:
! 1 = Active
! 2 = Dormant
! 3 = Procerror
! 4 = Drain
reserved, ! reserved for use by HP
last^error; ! last error recorded on collector
STRUCT program^file; ! file name of collector
BEGIN ! program
INT volume [0:3], ! $volume, blank-filled
subvolume [0:3], ! subvolume, blank-filled
filename [0:3]; ! file name, blank-filled
END;
INT cpus, ! CPUs executing the
! collector program
! cpus.<0:7> = primary
! cpus.<8:15> = backup
priority; ! execution priority of
! the collector process
STRUCT data^file; ! file name of collector
BEGIN ! output file
INT volume [0:3], ! $volume, blank-filled
subvolume [0:3], ! subvolume, blank-filled
filename [0:3]; ! file name, blank-filled
END;
INT unit^size, ! number of blocks reserved
! for when it needs more
! disk space
units^allocated, ! number of blocks already
! allocated
total^units; ! total number of units
! available in data file
INT pagesize; ! default page size
END;
If you want the status of all collectors in the spooler subsystem, fill the
collector.name field with blanks and enter a 1 as the SPOOLERSTATUS2 scan-
type parameter. The first call will return the status of the device whose name comes
first alphabetically. Continue calling SPOOLERSTATUS2 until it returns error %14006
(end of entries).
If you want the status of a particular collector, fill the collector.name field with the
name of the collector whose status you want (blank-fill the right side of the field). Then
call SPOOLERSTATUS2 with the scan-type parameter set to 0.