cc/td/doc/product/rtrmgmt/info_ctr/1.0
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Process Control

Process Control

This chapter provides details on the concepts and tools associated with the Cisco Info Center Process Control system. It includes the following sections:

Introduction

The Cisco Info Center Process Control system allows you to configure remote UNIX processes. The system is designed to simplify the configuration and management of Cisco Info Center components such as Cisco Info Servers, Cisco Info Mediators and Cisco Info Gateways. The Process Control system contains the following elements:

The Process Control agents cooperate automatically and have memory for their configuration. Process Control agents start remote processes and are capable of keeping those processes running. Processes can be defined to be dependent on the starting of a previous process or have timed threshold dependencies. When a managed host is restarted, the Process Control agent restarts local components automatically.

The command line utilities are provided to:

Process Control is also responsible for the execution of Cisco Info Center automation system external effects. Automation does not execute programs; however, it sends a request to a Process Control agent which forwards the request to the Process Control agent running on the specified host. That Process Control agent then executes the requested program.

Process Agents

Any Cisco Info Center participating host must be configured with the Process Control agent daemon. Once this is in place, you can connect the host into the Process Control system. Figure 2-1 shows a basic Cisco Info Center configuration comprising three hosts running Process Control agents.


Figure 2-1: Basic Cisco Info Center Configuration


Processes

Processes are programs that are executed by a Process Control agent. Processes can also be configured to be dependent on each other.

There are two types of processes that can be managed, which are shown in Table 2-1.


Table 2-1: Types of Processes
Process Type Description

pa aware process

A process that uses the Process Control API and is part of the configuration and managed by Process Control. This type of process allows the full functionality of the Process Control system to be utilized, such as process dependencies.

not pa aware process

A process that does not use the Process Control API and is not aware of the Process Control system.

Services

The main functions of the Process Control system are to configure and manage local and remote processes and to provide a level of automatic management of those processes. To make the management of groups of processes easier, the concept of a service is used. Once a service is correctly configured, it is managed by Process Control.

A service is made up of several processes, which are executed by Process Control agents. A service may be configured to start up automatically when the Process Control agent starts or to wait until the service is started manually. There are two grades of service: master and non-master. These grades are used when services are automatically started. A master service has its processes started before a non-master service.

There can be any number of Process Control agents. Agents can manage any number of Cisco Info Center processes.

Process Control System Configuration

There are a number of issues that you must consider before implementation of Process Control. The steps you take also vary when you are already using a previous version of Cisco Info Center Process Control. The factors described here assume that you are performing a new Process Control configuration. Before you begin, you should consider the following:

Once you have determined the complete Cisco Info Center configuration requirements, continue to follow the information described in this section.

Co-existence with Previous Versions of Process Control

This version of Process Control can co-exist with previous versions of Process Control. There are no known technical issues to indicate that the systems will conflict, however, there is no integration provided between different versions.

For the Complete Configuration

Create User Groups

The Process Control system uses UNIX user names and passwords to grant access to the Process Control system. To control who can log in, any user who needs access to the Process Control system should be made a member of a group called ncoadmin. When this group does not exist, create it and add Process Control users to this group. When you run NIS, NIS+ or some other global information service, this process has to be performed by the administrator of that service.

For Each Process Control Host

Assign a Name

Assign a unique server name to the Process Control agent for each host. The name should end with _PA to identify the server as a Process Control server. For example, when you are installing the Process Control agent on a host named jfksys1, the Process Control agent is named JFKSYS1_PA. By default, the first Process Control agent installed in a configuration is named NCO_PA.

Add Host Names to the Interfaces File

For each host add an entry to the Cisco Info Center interfaces file using the Server Editor window. See the Cisco Info Center Installation and Configuration guide for information on how to add the entry.

Next, distribute the updated interfaces files to all hosts in the configuration. See the Cisco Info Center Installation and Configuration guide for information on how to generate interfaces files for Solaris2 platforms.

Once the interfaces information is in place, all Process Control agents can connect and operate as expected.

Start the Process Control Agent

The Process Control agent can be started manually at the command line with the command:

host% $OMNIHOME/bin/nco_pad -name <nameofpa>

Where <nameofpa> is the name of the Process Control agent.

Permanent Installations

The nco_pad command can be installed in the system startup scripts allowing the Process Control agent to start whenever the host boots up.

Solaris 2.x

The start-up script below should be installed as S81nco_pad in the /etc/init.d directory. This is an example script. For production use, the -name parameter must be changed.

############################################################################ Process Control - Automatic start-up file.
###########################################################################case "$1" in
'start')
(echo 'starting Cisco Info Center Process Agent Server:') >
/dev/console
if [-x $OMNIHOME/bin/nco_pad];
then
$OMNIHOME/bin/nco_pad -name NCO_PAD -debug 2 -newlog
fi
;;
'stop')
(echo stopping Cisco Info Center Process Agent Server:') > /dev/console
	PAD_PID=\Q/bin/ps -ef |grep -v grep|grep nco_pad | awk '{print $2}'\Q
	if [ ${PAD_PID:-0} -ne 0 ]; then
		$OMNIHOME/bin/nco_pa_shutdown -server NCO_PA -user 
		root -password <PASSWORD> 				-option STOP
fi
;;
*)
echo "usage: \Qbasename $0\Q {start|stop}"
;;
esac

Process Control Service and Process Configuration

Process Control stores system configuration information in the $OMNIHOME/etc/nco_pa.conf file:

This file is referenced at start-up time to establish the configuration information.

The file is made up of a number of records each of which contain various attributes and associated values.

You should edit this file directly to add any new processes or modify configuration information. You should maintain Process Control configuration information to ensure host configuration information stays synchronized among all of the agents in the configuration.

Define Processes

Firstly, you must define the list of processes in the configuration file. Process definitions have the following format:

nco_process `Cisco Info Server'
{
Command `$OMNIHOME/bin/nco_objserv -name NCOMS -pa DARKSTAR_PA' run as 0
Host=darkstar'
Managed=True
RestartMsg=`The Cisco Info Server has been restarted'
AlertMsg=`The Cisco Info Server has gone down'
RetryCount=0
ProcessType=PaPA_AWARE
}
 

nco_process `Cisco Info Server' defines the name of the process. This example is for Cisco Info Server. Note, the names for the processes have to be unique within the complete Process Control network.

Command is the command string that starts the process as it would be entered on the command line. Note that you should use the full path for the command. For example, to configure an Cisco Info Server named NCOMS, specify:

host% `$OMNIHOME/bin/nco_objserv -name NCOMS -pa DARKSTAR' run as 0

The run as option allows the definition of which user to run the process under. Typically this is set to root (UID 0). Note, information about the command line options for the Cisco Info Server is available in Chapter 1, "Cisco Info Server".

Host is the name of the host on which the process should be executed. Process Control automatically resolves the name of the Process Control agent when required.

Managed allows the selection between Yes (process is automatically restarted when it exits) and No (process is not automatically restarted when it exits).

RestartMsg contains the message to be sent to syslog when the process is restarted. For example:

The Cisco Info Server has been restarted.
 

AlertMsg contains the message to be sent to syslog when the process exits. For example:

The Cisco Info Server has gone down.
 

RetryCount specifies the number of restart attempts to be made when the process exits. When this is set to 0, the process attempts to start indefinitely.

ProcessType allows the selection between PaPA_AWARE, for PA aware processes, and PaNOT_PA_AWARE, for processes that are not PA aware.

Define Services

To group together the functional elements of the system, you need to define the services. A service lists a group of processes that need to be running together to provide that service. The processes should have already been defined in the list of processes. Service definitions have the following format:

nco_service `Omnibus'
{
ServiceType=Master
ServiceStart=Non-Auto
process `Cisco Info Server' NONE
process `Proxy' `Cisco Info Server'
process `Mediator' `Proxy'
process `Mediator-1' `Cisco Info Server'
process `Sleep' 5
}
 

nco_service `Omnibus' defines the name of the service, for example, Omnibus. Note, the names for the services have to be unique within the complete Process Control network.

ServiceType defines whether this service should be started before all other services and handled as the master service upon which other services depend. This can be set as either Master or Non-Master.

ServiceStart allows the selection between Auto, to start the service as soon as nco_pa has started, and Non-Auto, where the service needs to be started manually with the nco_start command.

process defines a PA aware process that needs to be run as part of the service.

Specify Process Dependencies

The process attribute allows you to define the process that should be run as part of the service. You can, however, add dependencies on each of the processes within the service. The format of the process attribute is as follows:

process <processname> <dependency>

Where <processname> is the name of the process defined in the list of processes and <dependency> can be either:

In the example service above, Omnibus is the process the Cisco Info Server starts first because it has no dependencies. Five seconds after the Cisco Info Server is running, the process Sleep starts. Once the Cisco Info Server is running successfully, Proxy and Mediator-1 start. When the proxy Cisco Info Server is running, the process Mediator starts.

Define Agent Hosts

To specify the available hosts to contact, you need to define the agent host names. Host definitions have the following format:

nco_routing
{
host `darkstar' `DARKSTAR_PA'
host `penelope' `PENELOPE_PA'
host `moose' `MOOSE_PA'
host `ferrari' `FERRARI_PA'
}
 

host defines the name of the host, for example, darkstar, and the name of the process agent to be used in the Process Control system, for example, DARKSTAR_PA.

An Example Configuration File

The following example shows the settings for a simple configuration file.

#NCO_PA3
#
# Process Agent Daemon Configuration File 1.1
#
 
#
# List of processes
#
nco_process `Cisco Info Server'
{
    Command `$OMNIHOME/bin/nco_objserv -name NCOMS -pa DARKSTAR_PA' run as 0 Host=`darkstar' Managed=True RestartMsg=`The Cisco Info Server has been restarted' AlertMsg=`The Cisco Info Server has gone down' RetryCount=0 ProcessType=PaPA_AWARE
}
 
nco_process `Proxy'
{
    Command `$OMNIHOME/bin/nco_proxyserv -name SCNCOMS -server NCOMS -debug' run as 0 Host=`darkstar' Managed=True RestartMsg=` ' AlertMsg=` ' RetryCount=0 ProcessType=PaPA_AWARE
}
 
nco_process `Mediator'
{
    Command `$OMNIHOME/probes/solaris2/nco_p_simnet -server NCOMS' run as 0 Host=`darkstar' Managed=True RestartMsg=` ` AlertMsg=` ` RetryCount=0 ProcessType=PaNOT_PA_AWARE
}
 
nco_process `Mediator-1'
{
    Command `$OMNIHOME/probes/solaris2/nco_p_simnet -server NCOMS' run as 0 Host=`darkstar' Managed=True RestartMsg=` ` AlertMsg=` ` RetryCount=0 ProcessType=PaNOT_PA_AWARE
}
 
nco_process `Sleep'
{
    Command `/usr/bin/sleep 500' run as 60003 Host=`darkstar' Managed=True RestartMsg=`STARTED' AlertMsg=`STOPPED' RetryCount=0 ProcessType=PaNOT_PA_AWARE
}
nco_process `Sleep-1'
{
    Command `/usr/bin/sleep 500' run as 305 Host=`penelope' Managed=True RestartMsg=` ` AlertMsg=` ` RetryCount=0 ProcessType=PaNOT_PA_AWARE
}
 
nco_process `Sleep-2'
{
    Command `/usr/bin/sleep 500' run as 305 Host=`penelope' Managed=True RestartMsg=` ` AlertMsg=` ` RetryCount=0 ProcessType=PaNOT_PA_AWARE
}
 
nco_process `Sleep-3'
{
 
    Command `/usr/bin/sleep 500' run as 305 Host=`ferrari' Managed=True RestartMsg=` ` AlertMsg=` ` RetryCount=0 ProcessType=PaNOT_PA_AWARE
}
 
nco_process `Master Object Server'
{
    Command `$OMNIHOME/bin/nco_objserv' run as 0 Host=`darkstar' Managed=True RestartMsg=`Master Object Server running as ${EUID} has been restored on ${HOST}.' AlertMsg=`Master Object Server running as ${EUID} has died on ${HOST}.' RetryCount=0 ProcessType=PaPA_AWARE
}
 
 
#
# List of Services
#
nco_service `Omnibus'
{
    ServiceType=Master ServiceStart=Non-Auto process `Cisco Info Server' NONE process `Proxy' `Cisco Info Server' process `Mediator' `Proxy' process `Mediator-1' `Cisco Info Server' process `Sleep' 5
}
 
nco_service `Penelope Service'
{
    ServiceType=Non-Master ServiceStart=Non-Auto process `Sleep-1' 5 process `Sleep-2' 10 process `Sleep-3' 15
}
 
nco_service `Core'
{
    ServiceType=Master ServiceStart=Auto process `Master Object Server' NONE
}
# ROUTING TABLE
#
nco_routing
{
    host `darkstar' `DARKSTAR_PA' host `penelope' `PENELOPE_PA' host `moose' `MOOSE_PA' host `ferrari' `FERRARI_PA'
}

Alert/Restart Syslog Messages

When an alert or restart message is generated by nco_pad, it is passed to the syslog system. Cisco Info Center has a syslog Cisco Info Mediator available which can monitor these messages and convert them into Cisco Info Server alerts. See the Cisco Info Center Mediator and Gateway Reference guide for more information. The alert and restore messages are sent to syslog as warnings.

A typical message is formatted as:

<HOSTNAME> : ALERT_MSG : <MSG>

or:

<HOSTNAME> : RESTORE_MSG : <MSG>

Where <HOSTNAME> is the name of the host which has reported the problem, ALERT_MSG or RESTORE_MSG describes which kind of message it is and <MSG> is the text defined in the configuration file for that process or host.

Convert a Process Control Configuration

You can convert a configuration file from a previous version into the new format using the nco_pa_convert command.

To convert a configuration file, specify the following command:

$OMNIHOME/bin/nco_pa_convert -configfile <old.conf> -outfile <new.conf>

Where <old.conf> is the name of the configuration file from a previous version of Process Control, and <new.conf> is a name for the converted file.

Alternatively, you can upload a configuration file from a previous version and then specify a Process Control agent to load.

Process Control Management

The Process Control system provides various functions to manage and change the configuration.

The following sections describe the management functions available from the command line. Each of the commands issues a prompt for your UNIX password.

Service Status

Description

Retrieves the status of any service in the configuration. The command returns a list of defined processes, the status of each process and the UNIX process identifier.

Syntax

nco_pa_status -server <string> -user <string> -password <string> -help -version

Command Line Parameters


Table 2-2: Service Status Command Line Parameters
Option Parameter Description

-server

<string>

Name of Process Control agent to contact.

-user

<string>

User name to issue command as.

-password

<string>

User name password.

-help

Displays Help on the command line options and exits.

-version

Displays software version information and exits.

Start a Service or Process

Description

Starts a service or process at any location in the configuration. You can only specify a single service or process. When the service or process has already been started, the command is ignored.

Syntax

nco_pa_start -server <string> -user <string> -password <string> -service <string>
-process <string> -help -version

Command Line Parameters


Table 2-3: Service/Process Start Command Line Parameters
Option Parameter Description

-server

<string>

Name of Process Control agent to contact.

-user

<string>

User name to issue command as.

-password

<string>

User name password.

-service

<string>

Name of the service to start.

-process

<string>

Name of the process to start

-help

Displays Help on the command line options and exits.

-version

Displays software version information and exits.

Stop a Service or Process

Description

Stops a service or process at any location in the configuration. You can only specify a single service or process. When the service or process has already been stopped, the command is ignored.

Syntax

nco_pa_stop -server <string> -user <string> -password<string> -service <string>
-process <string> -help -version

Command Line Parameters


Table 2-4: Service/Process Stop Command Line Parameters
Option Parameter Description

-server

<string>

Name of Process Control agent to contact.

-user

<string>

User name to issue command as.

-password

<string>

User name password.

-service

<string>

Name of the service to start.

-process

<string>

Name of the process to start

-help

Displays Help on the command line options and exits.

-version

Displays software version information and exits.

Shutdown a Process Control Agent

Description

Shuts down a complete Process Control agent and stops associated services and processes.

Syntax

nco_pa_shutdown -server <string> -user <string> -password <string>
-option <string> -help -version

Command Line Parameters


Table 2-5: Shutdown Process Control Command Line Parameters
Option Parameter Description

-server

<string>

Name of Process Control agent to contact.

-user

<string>

User name to issue command as.

-password

<string>

User name password.

-help

Displays Help on the command line options and exits.

-option

<string>

Specifies how the shutdown is completed. Can be STOP to shutdown the Process Control agent completely, or LEAVE to leave the managed processes running after the shutdown.

-version

Displays software version information and exits.

Process Control Agent Daemon Command Line Options

This section describes the command line syntax and options available for the Process Control agent daemon.

Syntax

nco_pad -name <string> -configfile <string> -noconfig -logfile <string> -newlog
-nodaemon -apicheck -trace -noauto -retrytime
<string> -stacksize <numeric>
-help -version

Command Line Parameters


Table 2-6: Process Control Agent Daemon Command Line Parameters
Option Parameter Description

-name

<string>

Use the string as the name of the server for this Process Control agent. When not specified, defaults to NCO_PA for the process controller name.

-configfile

<string>

Use string as the configuration file rather than $OMNIHOME/etc/nco_pa.conf (the default).

-noconfig

Do not read the configuration file. Forces Process Control to start with no configuration information.

-logfile

<string>

Use string as the log file rather than $OMNIHOME/log/paname.log (the default, where paname is the name of the Process Control agent specified with -name).

-newlog

Start a new log file. Without this option, Process Control appends to the end of any existing log file. With this option, the log is cleared first.

-nodaemon

By default, Process Control forks into the background to run as a daemon process. With the -nodaemon option, the process runs in foreground.

-apicheck

Enables Sybase API checking.

-trace

Enables the net library tracing.

-noauto

Does not start the automatic start services.

-retrytime

<string>

Failed process start retry time out.

-stacksize

<numeric>

The size of the thread stack.

-help

Displays Help information on the Process Control agent and exits.

-version

Displays version information on the Process Control agent and exits.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Thu Mar 18 11:23:58 PST 1999
Copyright 1989-1999©Cisco Systems Inc.