...
- format:
- boolean
- default value:
false
- description:
- If this parameter is set to true, the job itself is aware that it is monitored and generates an a new order for the second job chain with with all parameters of the job and the pid of the connected shell. If the parameter is set to false or is not present the SSH Session Management will not be processed.
cleanupJobchain
- format:
- Stringstring
- default value:
- empty
- description:
- This parameters defines the path to the configuration files of the job chain to use for the cleanup work.
...
- format:
<command> \${pid}
- default value:
/bin/ps -ef | pgrep -P\${pid}
- description:
- The command or script determines the child processes of the given pid. The command or script depends on the OS of the remote host. If the command is not set, the default command for Linux is used.
The${pid}
placeholders will be substituted by the cleanup job. Note that the leading $ character has to be escaped with "\".
- The command or script determines the child processes of the given pid. The command or script depends on the OS of the remote host. If the command is not set, the default command for Linux is used.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<job order="yes" stop_on_error="false" title="Launch commands or executable files by SSH"> <description> <include file="jobs/JobSchedulerSSHJob.xml"/> </description> <params> <param name="host" value="[HOST]"/> <param name="port" value="[SSHPORT]"/> <param name="user" value="[USERNAME]"/> <param name="password" value="[PASSWORD]"/> <param name="auth_method" value="password"/> <param name="command_script_file" value="[PATH_TO_SCRIPTFILE]\test_sleep_90s.sh"/> <param name="runWithWatchdog" value="true"/> <param name="cleanupJobchain" value="kill_jobs/remote_cleanup_test"/> <param name="ssh_job_kill_pid_command" value="kill -9 \${pid}"/> <param name="ssh_job_terminate_pid_command" value="kill -15 \${pid}"/> <param name="ssh_job_get_pid_command" value="echo $$"/> <param name="ssh_job_get_active_processes_command" value="/bin/ps -ef | grep \${pid} | grep \${user} | grep -v grep"/> </params> <script java_class="sos.scheduler.job.SOSSSHJob2JSAdapter" language="java"/> <run_time/> </job> |
Anchor | ||||
---|---|---|---|---|
|
A cleanup job chain with two jobs has to be configured to process the cleanup of the remote processes or the JobScheduler task.
...