I am an administrator on a Virtual Private Server being rented from a host-provider. (I am running Ubuntu. They are running Virtuozzo.)
I get that, although I have some guaranteed resources (like RAM and disk-space), I am sharing some other resources, such as CPU.
Recently, the performance of my VPS became intolerably slow. I complained and they killed another VPS which was loading the node. My VPS got a spring back in its step.
I am expecting that similar problems will happen again, despite their vague assurances. I would like to set up a task to alert me when the machine is running slowly, so I can take action.
The trouble is, I don't know what to monitor! The CPU usage appears low, because in my virtual world, everything is being well-behaved.
Given I am running in a restricted little virtual world, how can I monitor when my available CPU is being sucked away by invisible other clients?
I would suggest that you write a benchmark that tests the things you care about, like CPU and I/O. Run it periodically (cron) and report when it doesn't complete in the time you need it to complete. Or check out if you can avoid writing a benchmark that increases the load and instead monitor something like the amount of time it takes for the server to complete page requests etc.