Stumbled upon this lovely monitor today.

Conky is a free, light-weight system monitor for X, that displays any information on your desktop.

Here is a screenshot of my configuration:


To get the same:

$ sudo apt-get install conky
$ vi .conkyrc

paste the contents of this conky config:

… save the file, download and extract this archive into your home directory (cd ~) and run

$ conky

Please note that I have removed CPUs 2-4 from the config to make it more compatible with single processor systems. Full list of Conky variables.

If you wish to monitor a remote Ubuntu computer and display conky’s output on your desktop:

$ scp .conkyrc scp username@remoteserver:
$ ssh -X username@remoteserver
$ sudo apt-get install conky
$ conky

UPDATE: If your server doesn’t have Xorg installed (which most don’t), you can use {execi} to issue commands over ssh and grep the info you need. The below part of conkyrc is based on a Ubuntu Jaunty server, your distribution may vary in where some of the details are stored.
${voffset 30}
${execi 43200 ssh vds hostname} ${hr 2}
${voffset 2}${font OpenLogos:size=16}u${font}   Kernel:  ${alignr}${execi 43200 ssh vds uname -r}
${execi 43200 ssh vds less /proc/cpuinfo | head -n 5 | tail -n 1 | cut -d @ -f 2 | cut -c 2-} ${alignr}Load: ${execi 60 ssh vds uptime |cut -d , -f 4- | cut -c 17-}
${execibar 60 ssh vds bash ~/}
${execigraph 60 ssh vds bash ~/}
${font StyleBats:size=16}q${font}   Uptime: ${alignr}${execi 60 ssh vds uptime |cut -d , -f 1 | cut -c 2-}
${font StyleBats:size=16}q${font}   Users logged in: ${alignr}${execi 60 ssh vds w | head -n 1 | cut -d \  -f 7- | cut -d \, -f1}

HD ${hr 2}
${execi 600 ssh vds df -h | head -n2 | tail -n1 | cut -c 24-}
${voffset 4}${execibar 600 ssh vds df -h | head -n2 | tail -n1 | cut -c 41-42}

NETWORK ${hr 2}
${voffset 4}${font PizzaDude Bullets:size=14}N${font}   Download: ${alignr}${execi 600 ssh vds ifconfig | head -n 8 | tail -n 1 | cut -d \( -f 2 | cut -d \) -f 1}
${voffset 4}${font PizzaDude Bullets:size=14}T${font}   Upload: ${alignr}${execi 600 ssh vds ifconfig | head -n 8 | tail -n 1 | cut -d \( -f 3 | cut -d \) -f 1}
${voffset 4}${font PizzaDude Bullets:size=14}b${font}   Public IP: ${alignr}${execi 43200 ssh vds ifconfig | head -n 2 | tail -n 1 | cut -c 21- | cut -d \  -f 1}

TOP: ${hr 2}
${voffset 4}${execi 60 ssh vds ps -eo pcpu,pid,user,args | sort -k 1 -r | head -5}

Note that if you run both local and remote conky, you may need to amend conky’s position on the remote server in .conkyrc so they won’t overlap.

To start conky from a remote computer and have it displayed on yours, create this as a .sh script and run:

ssh -X username@remoteserver 'conky'

And finally, if you wish to start conky automatically after your log in, create a bash script with the following and add it into your Ubuntu start up programs:

sleep 20 && conky;

Halting it for 20 seconds prevents compiz from applying border and drop down shadows etc. to conky’s window.

  1. No comments yet.

You must be logged in to post a comment.

  1. No trackbacks yet.