Within the process agent configuration file, you must define the list of processes that should be run by the process agents.
An example process definition in the $NCHOME/omnibus/etc/nco_pa.conf configuration file is as follows:
nco_process 'ObjectServer'
{
Command '$NCHOME/omnibus/bin/nco_objserv -name NCOMS -pa SFOSYS1_PA' run as 0
Host = 'sfosys1'
Managed = True
RestartMsg = '${NAME} running as ${EUID} has been restored on ${HOST}.'
AlertMsg = '${NAME} running as ${EUID} has died on ${HOST}.'
RetryCount = 0
ProcessType = PaPA_AWARE
}
The following table uses the preceding example to describe the process definition information that is contained in the configuration file.
| Configuration information | Description |
|---|---|
| nco_process 'ObjectServer' | Defines the name of the process. This example
is for an ObjectServer. Note: Process names must be unique
for this process agent. If you use the same process name more than
once, all, except for the first process definition, are ignored, and
a warning message is generated.
|
| Command | The command string that starts the process,
as it would be entered on the command line. Use the full path for
the command. For example, to configure an ObjectServer named NCOMS,
enter: '$NCHOME/omnibus/bin/nco_objserv -name NCOMS -pa SFOSYS1_PA' run as 0 Or enter: '$NCHOME/omnibus/bin/nco_objserv -name NCOMS -pa SFOSYS1_PA' run as 'root' In this
example:
You can set the following additional process attributes
by adding them to the beginning of the command string:
The format for specifying each of these attributes is as follows: Command '[CWD=directory_path]commandpath options' run as user Command '[SETGID=groupID]commandpath options' run as user Command '[UMASK=permission]commandpath options' run as user Note: You must specify
the attributes as shown, in square brackets, without spaces.
Examples (UNIX): Command '[CWD=/opt/netcool/]$NCHOME/omnibus/bin/nco_objserv -name NCOMS2 -pa NCO_PA' run as 1253 Command '[SETGID=ncoadmin]$NCHOME/omnibus/bin/nco_objserv -name NCOMS2 -pa NCO_PA' run as 1253 Command '[UMASK=u=rwx,g=rx,o=rx]$NCHOME/omnibus/bin/nco_objserv -name NCOMS2 -pa NCO_PA' run as 1253 Tip: In
the preceding example with the UMASK setting, write permissions are
assigned to the current user, but removed for all other users. You
can alternatively specify this as [UMASK=022].
Command '[UMASK=077]$NCHOME/omnibus/bin/nco_objserv -name NCOMS2 -pa NCO_PA' run as 1253 You can specify one or more of the attributes within the command string. For example: Command '[CWD=/tmp][SETGID=ncoadmin][UMASK=u=rwx,g=,o=]$NCHOME/omnibus/bin/nco_objserv -name NCOMS2 -pa NCO_PA' run as 1253 Example (Windows): Command '[CWD=C:\temp]%NCHOME%\omnibus\bin\nco_objserv -name NCOMS2 -pa NCO_PA' run as 0 |
| Host | The name of the host on which the process should be run. Process control automatically resolves the name of the process agent when required. |
| Managed | Can have either of these values:
|
| RestartMsg | Contains the message to be sent to the UNIX syslog or the Windows Event Viewer if the process is restarted. For example, The ObjectServer has been restarted. |
| AlertMsg | Contains the message to be sent to the UNIX syslog or the Windows Event Viewer if the process exits. For example, The ObjectServer has gone down. |
| RetryCount | Specifies the number of restart attempts to be made if the process exits in the time specified by the nco_pad -retrytime command-line option. If set to 0, there is no limit to the number of restart attempts. The default is 0. |
| ProcessType | Can have the value PaPA_AWARE for PA aware processes and PaNOT_PA_AWARE for processes that are not PA aware. |
You can include expansion keywords in the RestartMsg and AlertMsg entries in the configuration file. Expansion keywords act as variables and contain information about the process that has restarted.
The expansion keywords are shown in the following table.
| Expansion keyword | Description |
|---|---|
| ${NAME} | The name of the process. |
| ${HOST} | The name of the host running the process. |
| ${EUID} | The effective user ID under which the process is running. |
| ${COMMAND} | The command that defines the process. |
When an alert or restart message is generated by the process agent daemon nco_pad, it is passed to the UNIX syslog or the Windows Event Viewer. Tivoli Netcool/OMNIbus has a Syslog probe that can monitor these messages and convert them into ObjectServer alerts. For more information about the Syslog probe, refer to the probe documentation that is available on the Tivoli® Network Management Information Center at http://publib.boulder.ibm.com/infocenter/tivihelp/v8r1/index.jsp.
The alert and restart messages are sent to the UNIX syslog or the Windows Event Viewer as warnings. The message is formatted as:
HOSTNAME : ALERT_OR_RESTART_MSG : MSG
The HOSTNAME is the name of the host that has reported the problem. ALERT_OR_RESTORE_MSG describes the type of message. MSG is the text that is defined in the configuration file for that process.