Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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%.


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.

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: – 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. – 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.