CGFreak
By Linus Walleij
http://cgfreak.sourceforge.net/
The idea with CGFreak is to visualize and help in auditing and evaluating
the use of Linux' control groups. It inspects the processes on the system
under observation and generate graphical representations of their states.
This includes but is not limited to:
* CPU/Core timesliceing with the CFS
* CPU/Core affinity
* I/O scheduling policies for processes
* ... whatever you can come up with. Memory policies the day the control
groups have that.
I wanted to call this program(s) "Controlfreak" but obviously there is a
trademark problem with that name.
INSTALLATION
------------
First, you need a very recent kernel with all the nice CPU slicing
and CPU affinity control groups.
You will then need some prerequisite python, libcgroup, pycairo and
pygtk2 packages. On a Fedora 11 install you need these:
yum install libcgroup pycairo pygtk2
On some Debian box I think you need these:
apt-get install libcgroup-dev python-cairo python-cairo-dev \
python-gtk2 python-gtk2-dev
Then (as root) set up libcgroup to mount the CPU control group and
the CPU affinity control groups (atleast) in two separate dirs like
this in the file /etc/cgconfig.conf:
mount {
cpuset = /cgroup/cpuset;
cpu = /cgroup/cpu;
}
(These are specified by default since Fedora 13.)
The exact mount point doesn't matter much since we will autodetect
that by asking libcgroup.
Installing the Fedora package libcgroup adds two new services named
- cgconfig
- cgred
None of which are activated by default. If you want to play with
cgfreak you have to go into the menu
System -> Administration -> Services
And from the GUI start or permanently activate these two services.
Then just run it:
./cgfreak.py
BACKGROUND
----------
Learn about control groups in the kernel tree:
Documentation/cgroups/*