Monitoring the Siebel application II

Now and then you have those programs or scripts which do, due to bad behaviour, consume a considerable part of the systems processing capacity. Those scripts or programs can influence the user experience of the business application on that system and therefore, from the eye of the end-user, put the application in a bad light.

The script mon_runaways.sh does monitor for those kind of processes, and give you an early warning when bad program or script behaviour is plausible. It is, although i gladly would like, not possible to detect a runaway process with 100% accuracy because a program cannot detect if high cpu utilization by a program is expected behavior. The detection script therefore has some internal variables which can be used to fine tune the monitor.

SCHEDPRIO Threshold to indicate possible suspect processes. Processes with an scheduling priority higher than the threshold are marked as suspect processes. Lowering the value will increase the possibility a process will be marked as suspect process.
SAMPTIME Sample time in seconds. Specifies the interval between the snapshots of the process list, which are used to calculate the cumulative CPU time.
MAXCPUPERC Threshold to mark processes as runaway. Variable specifies the max. cumulative CPU time as an percentage of the sample time.


Syntax: ./mon_runaway

Returns: 2 lines:

1st line a value of type integer:
-1 Monitor faillure
0 No runaway processes detected
1 Runaway process detected

2nd line a compound string: ( only if first line returns value “1” )
A list of possible runaway processes in the format “{pid}({cpusg}%) {pid}({cpusg}%) …”.
Where {pid} represents the processid and {cpusg} the cpu utilization during the measuring interval.
Example; “13239(87%) 98424(99%) 1291(100%)”


The script can be downloaded from the downloads page.


blog comments powered by Disqus