Job Management Partner 1/Software Distribution Administrator's Guide Volume 2
This section explains the dcmstsw command that monitors the job execution status. You can execute this command on the managing server for JP1/Software Distribution Manager and JP1/Software Distribution Client (relay system).
In the managing server, this command monitors the execution status of the job that is specified in a parameter file or in a command line, and starts an external program when a specified execution status is reached.
dcmstsw.exe [monitoring-interval] [monitoring-condition] /i parameter-filename [/LC {ON|OFF}]
You can also use command arguments to specify the template used for exporting and outputting file format instead of specifying these parameters in a parameter file. The table below shows the correspondence between the contents of a parameter file and the command arguments.
Table 4-20 Correspondence between parameter file contents and arguments (dcmstsw command)
Parameter file specification contents | Description | Specification | Command argument | |
---|---|---|---|---|
Tag | Parameter | |||
JOB_ATTRIBUTE | job_generator | Job name | X | -- |
jobno | Job number | R | /jn value | |
job_folder | Job folder path | O#1 | /l value | |
unsuspended | Whether a distribution being suspended exists | X | -- | |
USER_PROGRAM_INSTALLATION_CONDITIONS | external_program_executed_before_installation | External program executed before installation (collection) | X | -- |
external_program_executed_after_installation | External program executed after installation (collection) | X | -- | |
external_program_error_handler | External program error handler | X | -- | |
external_program_handler | External program handler | R | /ep value | |
exit | Notification method for the results of an external program | X | -- | |
action | Disposition of processing error | X | -- | |
wait | Monitoring method | X | -- | |
timeout | Maximum execution limit | O#2 | /wt value | |
wait_code | Wait code | O#3 | /wc value |
The following is the command format to be used when an argument only is specified without using a parameter file:
dcmstsw.exe [monitoring-interval] [monitoring-condition] /jn job-number [/l job-folder-path] /ep external-program-handler [/wt maximum-execution-limit] [/wc wait-code] [/LC {ON|OFF}]
The following explains the return codes that the dcmstsw command may return:
Code | Meaning | Action |
---|---|---|
0 | Normal termination. | None. |
1 | Unable to open parameter file, or invalid file format. | Check the parameter file specification or coding format. |
2 | Invalid value in command argument. | Check the settings for the command argument. |
3 | Error during connection to managing server, or an execution status was specified in a basic database environment or in JP1/Software Distribution Client (relay system). | Check the version of the managing server. If an execution status is specified in the monitoring code, check to see if the managing server is JP1/Software Distribution Manager. |
4 | Specified external program not found. | Check the path for the external program. |
5 | Maximum execution limit exceeded; job not terminated. | Check the job execution status. |
12 | Other errors occurred. | Check the event log. Possible causes of error include a system error, invalid command argument syntax, and denied processing. |
If JP1/Base is linked to manage JP1/Software Distribution users, see 1.3.3 Setting for executing commands.
The following is an example of executing an external program C:\aaa.exe when all jobs executed in the local managing server have terminated normally, with a command monitoring interval of 5 minutes and a maximum execution limit of 1 hour.
Specify the job number that was output to the result output file for the dcmjexe command in a parameter file as follows:
If the result output file for the dcmjexe command is saved, the file can be specified as a parameter file.
** dcmstsw Parameter File Sample JOB_ATTRIBUTE{ job_generator= invoice-file-0001-collection jobno= JB02100720481602 job_folder= \batch-definition }
If the result output file from execution of the dcmjexe command is saved in the file C:\DMbat\para\.txt, specify the dcmstsw command as follows:
dcmstsw.exe 300 ALL /i C:\DMbat\para.txt /ep C:\aaa.exe /wt 3600 /wc NORMAL
All Rights Reserved. Copyright (C) 2009, 2013, Hitachi, Ltd.
Copyright, patent, trademark, and other intellectual property rights related to the "TMEng.dll" file are owned exclusively by Trend Micro Incorporated.