help | logout
topcount

topcount

Name

topcount -- Reports the processes with the most instances.

Description

Although the procinfo module may be used to monitor specific processes on the system, at times it may be more desirable to learn of the processes using the most resources on the system. The three "top" modules report on the processes with the most number of instances, most CPU usage, and most memory usage. The actual number of processes to report is configurable.

On Linux, process information is collected through files in the "/proc" directory. Specifically, "/proc/meminfo", "/proc/uptime", "/proc/x/cmdline", and "/proc/x/stat" are used, where in the last two "x" represents the PIDs of processes on the machine.

On the Solaris OS, information is gathered through "/proc/x/psinfo" and "/proc/x/lwp", where "x" represents the PIDs of processes on the machine.

Windows 2000/XP/2003 uses the Performance Data Helper to gather all process information. Process information in Windows 9x/NT is gathered with the toolhelp functions.

Configuration

Configuration of topcount is very simple. There is only one variable which may be set: top. This tells topcount how many processes to return. The number may be anywhere from 1 to 10, and if not specified a default value of 5 will be used. For example:

config
{
	top = 3
}
		

This tells topcount to report the top 3 processes with the most number of instances. It does this by grouping together processes with the exact same name.

Thresholds

One threshold may be set for topcount with the name "count". This will take the result with the most number of instances, and compare it against the value given in the threshold. Any of the basic logical operators are allowed (==, !=, <, >, <=, >=). For example:

# Example threshold for topcount
thresh1.threshold = TopCount.count > 50
		

So if any process name has more than 50 instances, the preceeding threshold will become crossed.

History Data

Each time topcount checks data, it will save the top users along with their counts. This data, using the RSP History Viewer or RSP Web tools, can be used to show trends in process counts over time.