Add new comment

LXC Monitoring

Submitted by lennart on Mon, 07/11/2011 - 23:06

LXC Monitoring collects cpu and memory statistics for several Linux Containers, and creates pretty charts with it. Although it is intended for LXC containers, it can be used to monitor any type of cgroup. Optionally it can be configured to send a daily/weekly/... mail with those charts.

There are 2 python script to do the job. The data poller script will read data from the /cgroup partition at regular intervals and stores the data in an sqlite dbfile. Then 2nd script, create_charts.py, combines the collected data into a nice chart, and send me a mail with them.

Example charts:

Memory: (blue = rss, green = cache, red = swap)

memory example

CPU: (cpu time used per 5 minutes)

cpu example

You can get the scripts through git:

git clone git://github.com/LennartC/LXC-Monitor.git

Or download from the github page.

Follow the README for installation instructions:

Loading

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.