WEM Process Monitor


WEM Process Monitor
 
 
 
The Process Monitor is a script used for monitoring and maintaining WEM application software processes. It provides the flexibility of being run as a stand-alone program or a fully functional background daemon and is capable of logging to syslog and log file with customizable e-mail notification facilities. The ability to monitor and maintain these processes coupled with the ease and flexibility of this feature’s configuration ensure maximum availability and optimum server performance.
The processes are monitored based on rules defined within a configuration file stored on the server. These rules identify criteria for determining the action to be taken if the conditions are met. (For example, if a process becomes unresponsive, the rule could cause the process to be re-spawned.)
Basic parameters pertaining to the Process Monitor were configured as part of the WEM installation or upgrade process. However, additional parameters are available for fine-tuning its configuration to meet the needs of your network.
This chapter provides information and procedures for modifying the Process Monitor’s operation using the configuration file.
This chapter includes the following topics:
 
Process Monitor Configuration File
 
Processes are monitored based on rules defined within a plain-text configuration file called psmon.cfg located in the /users/ems/server/etc directory (by default).
Rules are defined within the file using the following syntax:
<Process process_id>
   processing-directives directive_variables
</Process>
The following table provides the syntax descriptions.
psmon.cfg Rule Syntax Descriptions
<Process process_id>
processing-directives directive_variables
psmon.cfg Processing Directives
This directive corresponds to the To Email-ID parameter configured during the WEM installation as shown in . During the installation, it is stored as a global declaration, however it may also be used in a Process Scope Directive which has precedence over a global declaration.
This directive corresponds to the Poll Interval parameter configured during the WEM installation as shown in . During the installation, it is stored as a global declaration, however it may also be used in a Process Scope Directive which has precedence over a global declaration.
This directive corresponds to the SMTP Server Name parameter configured during the WEM installation as shown in Figure 1-1. During the installation, it is stored as a global declaration, however it may also be used in a Process Scope Directive which has precedence over a global declaration.
Enables the configuration of the sendmail command used for sending e-mail notifications if a failure occurs with the SMTP connection to the host specified by the SMTPHost Directive.
This directive corresponds to the Number of Retries parameter configured during the WEM installation as shown in Figure 1-1. During the installation, it is stored as a Process Scope Directive for each rule defined for WEM process.
This directive corresponds to the Timeout Interval parameter configured during the WEM installation as shown in Figure 1-1. During the installation, it is stored as a Process Scope Directive for each rule defined for WEM process.
 
Default Rules
During the installation of WEM, the EMS Process Monitor Configuration dialog provides the opportunity to identify which Web Element Manager processes rules will be automatically defined.
EMS Process Monitor Configuration Installation Dialog
The following processes were available for selection:
EMS Server: Monitoring enabled by default
Bulkstat Server: Monitoring disabled by default
Bulkstat Parser: Monitoring enabled by default
Script Server: Monitoring disabled by default
NorthBound Server: Monitoring disabled by default
Notification Service: Monitoring disabled by default
Important: The NorthBound (NB) Server and Notification Service processes are customer-specific and are not operational without the appropriate license. Please contact your local sales representative for additional information.
Important: Two additional WEM processes are pre-configured to be monitored by the Process Monitor: the Postgres database process and the Apache webserver process. These appear in the psmon.cfg file but cannot be altered during the installation process.
The following table identifies the default rules configured for each of the above processes.
Default Rules for WEM Processes
<Process /<ems_dir>/server/bin/server>spawncmd (cd /<ems_dir>/server; /<ems_dir>/server/bin/server)pidfile /<ems_dir>/server/server.pidnumretry 10tmintval 330</Process>
<Process /<ems_dir>/server/bin/bulkstatserver>spawncmd (cd /<ems_dir>/server; /<ems_dir>/server/bin/bulkstatserver)pidfile /<ems_dir>/server/bsserver.pidnumretry 10tmintval 330</Process>
<Process /<ems_dir>/server/bin/bulkstatparser>spawncmd (cd /<ems_dir>/server; /<ems_dir>/server/bin/bulkstatparser)pidfile /<ems_dir>/server/bulkstatparser.pidnumretry 10tmintval 330</Process>
<Process /<ems_dir>/server/bin/scriptsrv>spawncmd (cd /<ems_dir>/server; /<ems_dir>/server/bin/scriptsrv)pidfile /<ems_dir>/server/script.pidnumretry 10tmintval 330</Process>
<Process /<ems_dir>/postgresx.x.x/bin/postmaster -i>spawncmd /<ems_dir>/server/scripts/postgresctl startpidfile /<ems_dir>/postgresx.x.x/data/postmaster.pid</Process>
<Process /<ems_dir>/apache/bin/httpd -f /<ems_dir>/apache/conf/httpd.conf>spawncmd /<ems_dir>/apache/bin/apachectl startpidfile /<ems_dir>/apache/logs/httpd.pid</Process>
 
Verifying the Process Monitor Status
The status of the Process Monitor can be checked at any time by executing either of the following commands:
 
ps -ef | grep psmon
or
./serv monitor
The first command indicates whether or not an active psmon process is running. The second command performs one of the following:
 
Manually Stopping the Process Monitor
 
Upon installation of the WEM, the Process Monitor is started automatically. This section provides instructions for manually disabling it. This can be useful if changes are made to the configuration file.
Follow the instructions below to manually stop the Process Monitor.
Step 1
Step 2
 
cd /<ems_dir>/server
Step 3
 
./serv monitor stop
Step 4
 
ps -ef | grep psmon
If the Process Monitor was successfully stopped, this command finds no active process and returns no result.
 
Manually Starting the Process Monitor
 
Upon installation of the WEM, the Process Monitor is started automatically. However, if the process was stopped, it can be started using the information and instructions in this section.
Step 1
Step 2
 
cd /<ems_dir>/server
Step 3
 
./serv monitor start
Once the Process Monitor is started, a status message is displayed. The process identification number assigned to the psmon process, and the directory in which the created log file is located is also displayed.
 
Running the Process Monitor as a Stand-alone Application
 
As mentioned previously, the Process Monitor can be run as a background deamon (the default operation when enabled during the installation of the WEM) or a stand-alone application.
This section provides information and instructions for running the Process Monitor as a stand-alone application from the command line interface.
To run the Process Monitor from the command line, use the following instructions:
Step 1
Step 2
 
cd /<ems_dir>/server
Step 3
 
./psmon [--conf=filename] [--daemon] [--cron] [--user=user] [--adminemail=emailaddress] [--dryrun] [--help] [--version]
--conf=filename
--adminemail=emailaddress
Depending on the command used, the rules dictated by the configuration file are executed.
 

Cisco Systems Inc.
Tel: 408-526-4000
Fax: 408-527-0883