I am not able to terminate the process from STAX monitor , is there any command line to terminate the same, or let me know any other possible way for it.
In order to be able to terminate a process running in a STAX job, you may need to specify a different stop option when starting the process.
Section "8.13 Process Service" in the STAF User's Guide at http://staf.sourceforge.net/current/STAFUG.htm#HDRPROCSRV describes the STOPUSING option when starting a process (which corresponds to the <stopusing>'SIGKILLALL'</stopusing> process sub-element in a STAX job) as follows:
STOPUSING allows you to specify the method by which this process will be STOPed, if not overridden on the STOP command. See section 8.13.3, "STOP" in the STAF User's Guide for more information.
The following methods can be used to stop a process:
SIGKILLALL - This unconditionally stops the process and all of its child processes. On Unix systems, this sends a SIGKILL signal to the process and all of its child processes. On Windows XP and later systems, this uses the taskkill command with the force (/f) and tree (/t) options. On Windows 2000 and earlier systems, this sends a WM_CLOSE message to the application (see below for more information on WM_CLOSE). This is particularly useful for stopping console applications which spawn numerous child processes. This is the default.
SIGKILL - This unconditionally stops the process. On Unix systems, this sends a SIGKILL signal to the process. On Windows, this calls TerminateProcess().
SIGTERM - On Unix systems, this sends a SIGTERM signal to the process. On Windows systems, this sends a CTRL-Break event to the process (note, the process must have been STARTed with the SAMECONSOLE option for this to work).
SIGTERMALL - On Unix systems, this sends a SIGTERM signal to the process and all of its child processes. This is not supported on Windows systems.
SIGINT - On Unix systems, this sends a SIGINT signal to the process. On Windows systems, this sends a CTRL-C event to the process (note, the process must have been STARTed with the SAMECONSOLE option for this to work).
SIGINTALL - On Unix systems, this sends a SIGINT signal to the process and all of its child processes. This is not supported on Windows systems.
WM_CLOSE - On Windows systems, this unconditionally stops the process and all of its child processes by sending a WM_CLOSE message to the application. This will not work on console applications started using the SAMECONSOLE option. This is not supported on Unix systems.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The STAX TERMINATE JOB <Job ID> command can be used to terminate a STAX job. The JOB option specifies the ID of the job to terminate. If the BLOCK option is not specified, then the "main" block in the job (which, by default, encompasses the entire job) is terminated which means all processes and STAF commands currently running are terminated. For example:
Hi
Tried running command line to terminate the process or job in stax monitor but no luck, commandline used is
staf local stax terminate job jobid
--Vipul
Last edit: vipul.sharma 2014-06-18
In order to be able to terminate a process running in a STAX job, you may need to specify a different stop option when starting the process.
Section "8.13 Process Service" in the STAF User's Guide at http://staf.sourceforge.net/current/STAFUG.htm#HDRPROCSRV describes the STOPUSING option when starting a process (which corresponds to the <stopusing>'SIGKILLALL'</stopusing> process sub-element in a STAX job) as follows:
STOPUSING allows you to specify the method by which this process will be STOPed, if not overridden on the STOP command. See section 8.13.3, "STOP" in the STAF User's Guide for more information.
The following methods can be used to stop a process:
SIGKILLALL - This unconditionally stops the process and all of its child processes. On Unix systems, this sends a SIGKILL signal to the process and all of its child processes. On Windows XP and later systems, this uses the taskkill command with the force (/f) and tree (/t) options. On Windows 2000 and earlier systems, this sends a WM_CLOSE message to the application (see below for more information on WM_CLOSE). This is particularly useful for stopping console applications which spawn numerous child processes. This is the default.
SIGKILL - This unconditionally stops the process. On Unix systems, this sends a SIGKILL signal to the process. On Windows, this calls TerminateProcess().
SIGTERM - On Unix systems, this sends a SIGTERM signal to the process. On Windows systems, this sends a CTRL-Break event to the process (note, the process must have been STARTed with the SAMECONSOLE option for this to work).
SIGTERMALL - On Unix systems, this sends a SIGTERM signal to the process and all of its child processes. This is not supported on Windows systems.
SIGINT - On Unix systems, this sends a SIGINT signal to the process. On Windows systems, this sends a CTRL-C event to the process (note, the process must have been STARTed with the SAMECONSOLE option for this to work).
SIGINTALL - On Unix systems, this sends a SIGINT signal to the process and all of its child processes. This is not supported on Windows systems.
WM_CLOSE - On Windows systems, this unconditionally stops the process and all of its child processes by sending a WM_CLOSE message to the application. This will not work on console applications started using the SAMECONSOLE option. This is not supported on Unix systems.
Hi
I need a command to terminate the job in STAX monitor, by process in STAX monitor i mean job only.
I didn't find any command that take jobid as input parameter
Thanks
Vipul
The STAX TERMINATE JOB <Job ID> command can be used to terminate a STAX job. The JOB option specifies the ID of the job to terminate. If the BLOCK option is not specified, then the "main" block in the job (which, by default, encompasses the entire job) is terminated which means all processes and STAF commands currently running are terminated. For example:
The STAX TERMINATE request is discussed in section "Request Syntax", sub-section "TERMINATE", in the STAX User Guide at http://staf.sourceforge.net/current/STAX/staxug.html#Header_Terminate.
I tried running terminate command too, but it is not able to terminate the job.