Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I just started to get a Nagios warning from our build server, stating that the number of processes has exceeded the limit. Looking at our Munin graphs, I can see that the number of processes has increased steadily from 280 in December to the current value of 430.

I'm wondering how I can go about identifying the causes of the increased number of processes, so that I can restart services or adjust their configuration as necessary.

Server details: CentOS 5.1, the main things running are our Hudson build server which runs under Tomcat, and an Apache httpd server which is mainly just a proxy for Hudson. I've tried restarting httpd and Tomcat, but the number of processes stayed the same. "top" says that only one of the processes is active; the rest are sleeping.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Try this out on a regular basis to see how process counts go up and down for a "certain" named process. It disregards PID and just looks at the end of the line beyond the cpu time.

ps -ef | perl -a -F'\d+:\d+:\d+ ' -n -e 'print @F[1]' -- | sort | uniq -c | sort -n

This works on a RHEL box. You might put it in cron after getting a baseline of what the starting process list looks like.

share|improve this answer
    
Thanks, @fasteddie007 - this will become a valuable alias for me. It immediately identified a big stack of processes that an old installation of Zenoss had left running; killing those reduced my process count by two thirds. –  gareth_bowles Jul 19 '10 at 19:55
    
glad to help out, Zenoss does like to start up a lot of things. It is a handy alias for machines with high numbers of processes. –  fasteddie007 Jul 19 '10 at 20:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.