Previous Topic: PRIVPROTOCOL Statement—Specify the SNMP v3 Privacy ProtocolNext Topic: PROCESS Statement—Specify the Process Status to Monitor (SAP Jobs)


PROCESS Statement—Specify the Process to be Monitored (Process Monitoring Jobs)

The PROCESS statement specifies the name of the process to be monitored.

Supported Job Type

This statement is required for the Process Monitoring job type.

Syntax

This statement has the following format:

PROCESS process_name
process_name

Specifies the name of the process to be monitored.

Limits: Up to 256 characters; case-sensitive

UNIX: Specify a PID or process name.

Windows: Specify a full path or process name.

i5/OS:

Specify the following format:

jobnumber/username/jobname
jobnumber

Specifies the six-digit job number or *ALL.

username

Specifies the user ID the job runs under. The value can be a generic name or *ALL.

Limits: Up to 10 characters

jobname

Specifies the job name on the i5/OS system. The value can be a generic name or *ALL.

Limits: Up to 10 characters

Notes:

i5/OS Notes:

Example: Monitor the Agent Process on UNIX Using a Process Name

This example monitors the cybAgent process on a UNIX computer. The job checks the process status immediately and completes successfully if the process is running.

AGENT UNIXAGENT
PROCESS cybAgent
STATUS RUNNING NOW

Example: Monitor the Agent Process on UNIX Using a PID

Suppose that the UNIXAGENT computer runs multiple agents. To monitor a specific agent process, specify the PID of that agent process. The job checks the process status immediately and completes successfully if the process is running. If the process is not running, the job fails.

AGENT UNIXAGENT
PROCESS 2568
STATUS RUNNING NOW

Example: Monitor the Agent Process on Windows

This example monitors the cybAgent.exe process on a Windows computer. The job checks the process status immediately and completes successfully if the process is running. If the process is not running, the job fails.

AGENT WINAGENT
PROCESS cybAgent.exe
STATUS RUNNING NOW

Example: Monitor the Agent Process on Windows Using a Full Path

Suppose that the WINAGENT computer runs multiple agents. To monitor the cybAgent.exe process, the full path to that process is specified. The job checks the process status immediately and completes successfully if the process is running. If the process is not running, the job fails. The text string is enclosed in single quotes because it contains a space.

AGENT WINAGENT
PROCESS 'c:\Program files\agentdir\cybAgent.exe'
STATUS RUNNING NOW

Example: Monitor the Agent Process on i5/OS

This example monitors the CYBAGENT process on an i5/OS computer. The job checks the process status immediately and completes successfully if the process is running. If the process is not running, the job fails.

PROCESS 123456/CYBESPU/CYBAGENT
STATUS RUNNING NOW

Example: Monitor i5/OS Processes That Have Similar Names

This example monitors all processes running on an i5/OS computer under the JDOE user profile and whose names start with CALC. When all of these processes stop running, the job completes successfully.

AGENT I5AG
PROCESS *ALL/JDOE/CALC*
STATUS STOPPED WAIT