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

I have a CentOS server running on a VPS via Virtuozoo containers.

I feel like there are high CPU usage spikes. Is there a way I can log every time CPU usage goes beyond a certain limit lets say 50%.

Thanks

share|improve this question

closed as not constructive by mgorven, Dave M, mdpc, Khaled, Ward Feb 6 '13 at 14:46

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

up vote 1 down vote accepted

Monit can do that:

check system localhost.localdomain.tld
    if loadavg (1min) > 5 for 6 cycles then alert
    if loadavg (5min) > 2 for 3 cycles then alert
    if loadavg (15min) > 2 for 2 cycles then alert
    if memory usage > 90% for 6 cycles then alert
    if cpu usage (user) > 75% for 6 cycles then alert
    if cpu usage (system) > 75% for 6 cycles then alert
    if cpu usage (wait) > 75% for 6 cycles then alert
share|improve this answer

Look into munin and graphite, both are excellent and free tools for system management.

share|improve this answer
    
wouldn't munin just monitor things like apache instead ? –  kritya Feb 5 '13 at 21:24
    
Munin can log all kinds of things. Here's an example: imageshack.us/photo/my-images/46/cpur.png –  Stephan Feb 5 '13 at 21:28
    
is that in the normal configuration ? if no , how do configure it to log CPU ? –  kritya Feb 5 '13 at 21:32
    
Your question is a little out of the scope of this comment. Here's one approach. howtoforge.com/server_monitoring_monit_munin –  Stephan Feb 5 '13 at 21:38
    
If this is an answer, answering the question shouldn't be out of scope. If this is just a comment, it shouldn't be an answer. –  mattdm Feb 5 '13 at 23:28

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