Get to Know Conky

While Ubuntu/Gnome/Compiz offer various widgets to monitor computer activity, I think they tend too much to offer a strong visual effect rather than actual useful, structured, information about what’s going on in your computer. Sometimes, it doesn’t really matter. Sometimes you want to know more.

One tool that’s not the mega-eye-candy but is very configurable and actually useful is Conky, a “free, light-weight system monitor for X, that displays any information on your desktop.”

Conky is a fork from Torsmo, and as such took a different road. Both Conky and Torsmo are rather complete, but I think Conky offers more functionalities than Torsmo, but the killer argument is that Conky made its way into Ubuntu’s standard repositories while Torsmo did not (maybe because of licensing issues? One is GPL3, the other is BSD). The development on Torsmo may or mayn’t be ongoing; the last update is 2009/07 (at the time of writing). Conky is quite alive: the latest release is from Oct 2010.

Conky lets you design your information pane so that it shows what you want to see in the order you want. For example, on one box I have this conky configuration file (in ~/.conkyrc, a simple text-only file not unlike other .somethingrc):

It shows up-time, CPU usage, per CPU, speedstep/powernow! state for each core, amount of ram, etc., etc. The whole file can be downloaded from the links at the end of the post, but the interesting part is:

${color lightgrey}$nodename Uptime:$color $uptime ${color lightgrey} ${time}
${color lightgrey}CPU Usage:${color #5000a0} ${cpu}% 
${color gray}${cpugraph 008000 ff0000}
${color gray}CPU0: ${freq_g cpu1} GHz ${cpubar cpu1 10}
${color gray}CPU1: ${freq_g cpu2} GHz ${cpubar cpu2 10}
${color gray}CPU2: ${freq_g cpu3} GHz ${cpubar cpu3 10}
${color gray}CPU3: ${freq_g cpu4} GHz ${cpubar cpu4 10}

${color lightgrey}RAM Usage:$color $mem/$memmax - $memperc% $membar
${color lightgrey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar}
${color lightgrey}Processes:$color $processes  ${color grey}Running:$color $running_processes
${color white}Networking:
Down:${color gray} ${downspeed eth0} k/s${color white} total: ${color gray}${totaldown eth0}
${color gray}${downspeedgraph eth0 10 ff0000 0000ff} 
Up:${color gray} ${upspeed eth0} k/s ${color white} total: ${color gray}${totalup eth0}
${color gray}${upspeedgraph eth0 10 0000ff ff0000}
${color lightgrey}File systems:
 /      $color${fs_used /}/${fs_size /} ${fs_bar /}
 /home/ $color${fs_used /home/}/${fs_size /home/} ${fs_bar /home/}

As you see, Conky’s “language” is rather simple. The documentation is a quick read, and divided into two main categories, variables and file settings. “Variables” include rather active objects such as CPU graphs that shows an usage history or CPU Gauges that shows the instantaneous CPU usage as a speedometer-like thingie. “File settings” control things such as the default font, whether or not to use shadows, window border width, etc.

The thing is probably to keep things simple, even if you want to show detailed information about the state of the system monitored. However, others have created many different configurations, from the very simple to the kind-of-baroque.

* *

Sometimes it’s the accumulation of simple things that makes a tool really work despite its apparent crudeness. One of those nice, simple, touches is that the window shows the name of the host on which Conky runs, making it quite amenable to watch machines across ssh/lan.

* *

The “sven” .conkyrc is here.

The “mithrandir” .conkyrc is here.

One Response to Get to Know Conky

  1. […] and other system monitors. A good while ago, I wrote a piece on conky, a simple but highly configurable system monitor. It’s kind of […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: