Overview

   cpumon is a daemon that perodically checks CPU utilization and sends messages if the utilization exceeds a threshold value. It can alarm via multiple methods such as the command line, syslog and ITO.

Running cpumon

   cpumon will start differently depending on options in the config file. If it is configured to print to stdout our stderr then it will run in the foreground. If it is configured to send messages to syslog or ITO then it will automatically background. (cpumon needs to run as root to properly background.)
   cpumon only accepts one parameter from a (mutually exclusive) list of parameters. These are:
    
-rReload the config file of the currently running process.
-kKill the currently running process.
-vDisplay the version information and quit.
<config-file>Specify the config file (Default is /etc/cpumon.conf).
   If cpumon is to be run in the background then it should be run as root so that it can write its pid file.

The Config File

   The config file is a typical Unix config file in that it has options configured one per line with the option name on the left and the value on the right, seperated by the "=" sign. Comments are denoted by a "#" sign. Lines without an equality ("=" sign) are ignored.
   The options are:
    
CHECK_INTERVALThis is the time between checks in seconds. A lower value is more responsive, but is more sensitive to short spikes of high CPU utilization. The default value is 60 seconds.
ALARM_THRESHOLDIf the average CPU utilization exceeds this value over any test interval then an alarm will be sent. The default value is 85.
NOTIFY_HOWThis setting tells how cpumon will both run and then notify. The possibe values are: syslog, remote_syslog, stderr, stdout, and ito. If stdout or stderr is chosen then cpumon will run in the foreground, otherwise it will background. The default value is stdout.
SYSLOG_SERVERThis is a manditory option if the remote_syslog option is used. This is the remote syslog server that you are logging to. (Make sure that the remote server has been started with the -r option so that it will listen externally.)
MY_HOSTNAMEThis is an optional parameter that is used for ITO messaging. The default is the return value from gethostname() system call. If this is set, then the supplied value will override the one returned from the system.
ITO_APPIf ito is chosen as the NOTIFY_HOW value then this can override the default app value of "cpumon".
ITO_OBJECTIf ito is chosen as the NOTIFY_HOW value then this can override the default object value of "CPU".
ITO_GROUPThis is a mandatory option if ito is chosen as the NOTIFY_HOW value. It is the group that the message belongs to. It has no default value and if cpumon is configured to send messages to ITO, and this is not set then cpumon will not run (at all).
CONSISTENT_MESSAGESet this to true to insure that the message sent will always be the same. This feature is useful when sending to the ITO console or a syslog, otherwise the message will have unique data in it that may varry from alarm to alarm.