Conky: A Poweful Yet Simple System Monitor
Conky is a simple yet very powerful system monitor that can directly write the output to the X server root window. It generally uses very less resources compared to other system monitor programs and hence it is ideally suited for light weight desktop environments such as OpenBox (my preferred desktop environment). Take a look at my customized conky monitor

One of the great things about conky is that one can easily customize it (as always with a lot of other Linux applications). The documentation is very clear and easy to understand. Take a look it to play with conky.
The configuration and customization for conky is stored in a file called .conkyrc in $HOME which is very well commented. The first part of the file deals with the basic configuration and the second part (after the keyword TEXT) deals with the actual display information itself. The second part of my .conkyrc is explained below (and attached image corresponds to this configuration).
The following code displays the system information such as the processor information, kernel information etc. including the dynamic cpu frequency scaling available in most common mobile processors. The list of all available configuration variables and system variables are available in the online documentation.
${color Red}$alignc Aravind's Laptop${color lightgrey}
$sysname $kernel $alignr $machine
Intel Core 2 Duo T7500
$alignr Core 1 running @ ${freq_g cup1}GHz
$alignr Core 2 running @ ${freq_g cup2}GHz
Uptime $alignr $uptime
Current Time $alignr ${color yellow}$time${color lightgrey}
$stippled_hr
The following displays the real-time processor information, memory information etc. The cpu usage and cpu history for both the cores can be obtained separately.
${color Red}$alignc Processor Information
${color lightgrey}Core 1 Usage:${color #5000a0} ${cpu cpu1}% ${cpubar cpu1}
${color lightgrey}Core 2 Usage:${color #5000d0} ${cpu cpu2}% ${cpubar cpu2}
${color lightgrey}Core 1 Usage History
${color black}${cpugraph cpu1 000000 5000a0}
${color lightgrey}Core 2 Usage History
${color black}${cpugraph cpu2 000000 5000a0}
${color lightgrey}$stippled_hr
${color red}$alignc Memory Information
${color lightgrey}RAM Usage:$color $mem/$memmax - $memperc% $membar
${color lightgrey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar}
$color$stippled_hr
Battery Information
${color red}$alignc Battery Information
${color lightgrey} Currently: $battery
${color lightgrey}$stippled_hr
Networking Information
${color red}$alignc Networking Information
${color lightgrey} Down:${color #8844ee} ${downspeed eth0} k/s${color lightgrey} ${offset 100}Up:${color #22ccff} ${upspeed eth0} k/s
${color lightgrey} Total Download:${color #8844ee} ${totaldown eth0} ${color lightgrey}${offset 10} Total Upload:${color #22ccff} ${totalup eth0}
${color black}${downspeedgraph eth0 32,150 ff0000 0000ff} $alignr${color black}${upspeedgraph eth0 32,150 0000ff ff0000}
${color lightgrey}$stippled_hr
File System Information
${color red}$alignc File System Information
${color lightgrey}/home $alignc Total: ${fs_size /home} Used: ${fs_used /home} $alignr Available: ${fs_free_perc /home}%
${fs_bar /home}
${color lightgrey}/ $alignc Total: ${fs_size /} Used: ${fs_used /} $alignr Available: ${fs_free_perc /}%
${fs_bar /}
${color lightgrey}$stippled_hr
Process Information
${color red}$alignc Process Information
${color}Name PID CPU% MEM%
${color #ddaa00} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color}Mem usage
${color #ddaa00} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color lightgrey} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color lightgrey} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${color lightgrey}$stippled_hr
Weather information is obtained by executing a scrip file weather.sh (see attachment).
${color red}$alignc Weather Information
${color}${execi 1800 /home/aravind/Installation/conkyweather/weather.sh}
This clearly shows how powerful and customizable conky can be. One can execute any script file and display the output directly onto the X server root.
Last but not least, whenever the configuration file is modified conky needs to reload the new config file. The easiest way to do it is killall -SIGUSR1 conky.
| Attachment | Size |
|---|---|
| weather.sh | 1.45 KB |
Recent blog posts
- Finally! Automatic Inline Spell Checking is Implemented in Kile
- Happy New Year
- A nice read: "Confessions of an online poker player"
- Building a set of inexpensive golf clubs
- MATLAB code relicensed under BSD license
- Jon Stewart vs Jim Cramer
- How to Install and Run BitPim in Fedora 10 x86_64
- Tiltviewer: 3D Flash Gallery Viewer
- Migrated to a new web host
- Disabling the annoying system beeps in Fedora 10

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.


