Job Management Partner 1/Software Distribution Administrator's Guide Volume 2

[Contents][Glossary][Index][Back][Next]

4.20 dcmstat.exe (getting the job status)

This section explains the dcmstat command, which acquires the execution results from a job. You can execute this command on the managing server for JP1/Software Distribution Manager and JP1/Software Distribution Client (relay system).

Organization of this section
(1) Function
(2) Format
(3) Arguments
(4) Parameters in a parameter file
(5) Return codes
(6) Notes
(7) Example

(1) Function

The managing server system obtains the execution status of the jobs specified in a parameter file. The status of a job can be determined from the return code.

Job status Return code
All jobs terminated normally. 0
Some jobs terminated with an error. 30
Jobs are being executed. 31
Jobs are being executed, and some jobs have terminated with an error. 32
Jobs are being deleted, and some jobs are waiting for completion of the deletion process. 33

This command checks the number of hosts that are in the execution status by specifying the execution status of jobs on a managing server for JP1/Software Distribution Manager. The number of hosts in the specified execution status is equal to 10,000 minus the return code value.

(2) Format

dcmstat.exe [job-status] /i parameter-file-name [/LC {ON|OFF}]

(3) Arguments

(4) Parameters in a parameter file

The table below shows the contents of the parameter file for the dcmstat command. The contents of the parameter file used in this command cannot be specified by using a command argument.

Table 4-19 Contents of the parameter file (dcmstat command)

Parameter file specification contents Description Specification Command argument
Tag Parameter
JOB_ATTRIBUTE job_generator Job name X --
jobno Job number R --
job_folder Job folder path O# --
unsuspended Whether a distribution being suspended exists X --

Legend:
R: required.
O: optional.
X: not required (ignored if specified).
--: Cannot be specified in a command argument.

#
By default, the dcmstat command displays the job status by searching all the folders or files that lie below the root folder.

(5) Return codes

The following explains the return codes that the dcmstat command may return:

Code Meaning Action
0 All jobs completed normally. None.
1 Unable to open parameter file, or invalid file format. Check the specification or coding format for the parameter file.
2 Invalid value specified in parameter file. Check the parameter file value.
3 Error during connection to managing server, or an execution status was specified in either a basic database environment or JP1/Software Distribution Client (relay system). Check the version of the managing server. When specifying an execution status, check to see if the managing server is JP1/Software Distribution Manager.
5 Communication failure between client and managing server system. Check the communications settings in the setup for the managing server.
12 Other errors occurred. Check the event log.
30 Errors in at least some jobs. None.
31 Jobs being executed; no errors detected. None.
32 Jobs being executed; errors detected in some jobs. None.
33 Jobs being deleted; some jobs waiting to complete deletion. None.

If the job status is specified, the total number of hosts +10,000 that are in the specified job status is returned as a return code.

If JP1/Base is linked to manage JP1/Software Distribution users, see 1.3.3 Setting for executing commands.

(6) Notes

(7) Example

The following is an example of determining the job status of the invoice-file-0001-collection job that was executed using the dcmjexe command.

(a) Creating a parameter file

Specify the job number that was output to the output file by the dcmjexe command in the parameter file, as follows:

If the output file from the dcmjexe command has been saved, that file can be specified as a parameter file.

** dcmjexe output -> dcmstat input
 
JOB_ATTRIBUTE{
job_generator= invoice-file-0001-collection
jobno= JB03121113315383
job_folder= \batch-definition
}
(b) Command execution

If the output file from the execution of the dcmjexe command is saved in C:\Dmbat\out.txt, specify the command as follows:

dcmstat.exe /i C:\Dmbat\out.txt

The dcmstat command enables you to check the number of hosts that are in a specific status. For example, to determine the number of hosts that have failed to start and the number of hosts that have received a suspension instruction, you can specify the following:

dcmstat.exe CLT_NOTREADY SUSPENDED /i C:\Dmbat\out.txt