A Slice-Based Top for PlanetLab
Another "Co" tool from the CoDeeN project

Is It?

CoTop provides a top-like monitoring tool for PlanetLab. What this means is that instead of seeing processes and their properties, you see information about slices. This approach provides a means of seeing what slices are consuming resources on each node, without requiring access to information about all processes.

How Does
It Work?

CoTop is intended to be very similar to the standard top. When you run it, you'll see a summary of the system at the top, followed by a number of rows. On each row, you will see the summary for one slice on the node. These rows are sorted by CPU consumption by default, but the sort key can be changed by pressing numbers in the range of '2'-'0' (all numbers except '1'). Information about slices is gathered using slicestat sensor.


Follow these steps to install CoTop on your own slice:

  1. Download cotop-0.9b.tar.bz2, which contains the necessary files and an installer
  2. Expand the file by running
    bunzip2 cotop-0.9b.tar.bz2
    followed by
    tar xvf cotop-0.9b.tar
    You should now have a directory called cotop-0.9b
  3. Inside that directory, you will find a file called 'install'. This installer copies the necessary files to /usr/lib and /usr/local/bin. Please note that it will replace any existing libproc, as well as any existing cotop. To install, just type
    everything will then be put in the right place
  4. You are now ready to use CoTop. Simply type
    and you should see it run


CoTop is a fairly simple program to use. When you run it via 'cotop', you will see a screen that looks like

The top portion of the screen shows the standard measurements reported by top. The bottom portion shows slices and their properties. These fields are taken from slicestat, and are as follows:

The values are updated roughly every five seconds as the program runs. By default, they are sorted in decreasing order of %CPU. However, you can change the sort order by typing numbers from '2' to '9' and '0'. The TX1 column is sort field 2, the %CPU is 9, and %MEM is 0. The value '1' is used for SMP machines.

Other useful commands are similar to top - typing 's' allows you to change the delay, and typing '#' allows you to change the number of tasks shown. Typing 'q' exits the program.

& Bugs

CoTop is basically a fairly quick-and-dirty hack of top from the psproc tools. It's labeled as version 0.9 beta, simply because it sounded like a good idea. The summary data shown at the top doesn't exactly match what slicestat reports, but again, this doesn't seem too bad. The other known problems are related to displaying. The screen sort of expects 80 columns, and won't fail as gracefully as top if the width is narrower. The slice data is also not really integrated into the rest of the program. If you're a power user of top who likes to configure which columns are visible, you'll find that the configuration screen has no effect on the slice data.

If something really bothers you to the point that you think others would benefit from it, drop us a line, or take a stab at the change yourself with the sources.


KyoungSoo Park and Vivek Pai, with input from lots of others. We may collectively be contacted at princeton_codeen at

We would like to thank Brent Chun for his slicestat sensor, which he has graciously modified to improve the interoperability with CoTop. We would also like to thank Albert Calahan for his psproc tools.