A year ago a presented a tool to monitor system resource usage on OpenVZ VPS. Since then I have moved from OpenVZ to XEN hosted services and I have added a few more measurements.
The OpenVZ parts still work but will not collect any information unless you run it under an OpenVZ system.
New since last post is another network traffic visualization, remote server ping monitoring, per user cpu and memory usage monitoring. Most important feature though is the automatic detection of users and network interfaces, you no longer need to configure which network card and users to monitor, now they all are recorded.
Network visualization
I am running a TOR node which generates a lot of traffic that usually hides all other traffic. My solution here is a diff plot that visualizes the difference in input and output traffic.

As can be seen around the 19th and 20th the yellow spikes show output traffic when the symmetric traffic is subtracted. The total assymetric output was 3.78 GB.
Another issue that I cannot truly say I have solved is the spikes of transfer that sometimes occur when I transfer large amounts of data between servers. Since the upper bounds in the graph is determined automatically from the data, a short time hig bandwidth transfer will scale the graph so that the normal level traffic is barely noticeable.

My attempt to solve this is by using a logarithmic scale. As this kind of scale does not work with negative numbers I designed another graph with the sum yellow and below the diff overlay. The diff is represented by color where magenta represents the extra output traffic compared to the input, and cyan the other way around.

I don’t like this representation very much for two reasons. One the log scale fail to give a relevant visual representation of this kind of data, the output overlap looks like it is half the traffic of the total traffic, but since we know it is logarithmic we also know that it’s not the fact. Two, it is very hard to notice any irregularities such as spikes in the data transfer.
Remote server ping
The latest contibution is the remote ping monitoring. It is a simple ping rtt(round trip time) monitoring that came from the need to know for how long a server has been unreachable. It is also good to monitor local internet connection quality.
With the current configuration, each measurement is done using three ping requests and the average rtt is recorded.

This feature must be configured in the config.py file, you can use the template file config-dist.py.

User CPU/memory usage
As with the network monitoring the per user memory usage is now also automatic, there is no need to configure which users to monitor – all is monitored.

As an addition we now also monitor the CPU usage per user. If you run on a multicore server 100 equals full utilization of one core.

How to get it
Download it from the git repo:
git clone http://src.endnode.se/git/csm
