Conky – a light weight system monitor for Ubuntu Linux Systems
Sponsored Link
Install Conky in Ubuntu
sudo apt-get install conky
This will complete the installation
Configuring Conky
Make a configuration file in your home directory (Ex:-/home/ubuntuadmin)
vi /home/ubuntuadmin/.conkyrc
Paste the following code into the file and save / exit
# UBUNTU-CONKY
# A comprehensive conky script, configured for use on
# Ubuntu / Debian Gnome, without the need for any external scripts.
#
# Based on conky-jc and the default .conkyrc.
# INCLUDES:
# -- tail of /var/log/messages
# -- netstat connections to your computer
#
# --- Pengo ([email protected])
#
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# fiddle with window
use_spacer yes
use_xft no
# Update interval in seconds
update_interval 3.0
# Minimum size of text area
# minimum_size 250 5
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
font arial
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
border_margin 9
# border width
border_width 10
# Default colors and also border colors, grey90 == #e5e5e5
default_color grey
own_window_colour brown
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 10
gap_y 10
# stuff after ‘TEXT' will be formatted on screen
TEXT
$color
${color orange}SYSTEM ${hr 2}$color
$nodename $sysname $kernel on $machine
${color orange}CPU ${hr 2}$color
${freq}MHz Load: ${loadavg} Temp: ${acpitemp}
$cpubar
${cpugraph 000000 ffffff}
NAME PID CPU% MEM%
${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color orange}MEMORY / DISK ${hr 2}$color
RAM: $memperc% ${membar 6}$color
Swap: $swapperc% ${swapbar 6}$color
Root: ${fs_free_perc /}% ${fs_bar 6 /}$color
hda1: ${fs_free_perc /media/hda1}% ${fs_bar 6 /media/hda1}$color
hdb3: ${fs_free_perc /media/hdb3}% ${fs_bar 6 /media/hdb3}
${color orange}NETWORK (${addr eth0}) ${hr 2}$color
Down: $color${downspeed eth0} k/s ${alignr}Up: ${upspeed eth0} k/s
${downspeedgraph eth0 25,140 000000 ff0000} ${alignr}${upspeedgraph eth0
25,140 000000 00ff00}$color
Total: ${totaldown eth0} ${alignr}Total: ${totalup eth0}
Inbound: ${tcp_portmon 1 32767 count} Outbound: ${tcp_portmon 32768
61000 count}${alignr}Total: ${tcp_portmon 1 65535 count}
${color orange}LOGGING ${hr 2}$color
${execi 30 tail -n3 /var/log/messages | fold -w50}
${color orange}FORTUNE ${hr 2}$color
${execi 120 fortune -s | fold -w50}
You can also extract the sample file using the following command
zcat /usr/share/doc/conky/examples/conkyrc.sample.gz > ~/.conkyrc
If the network connections graph does not work, you will have to change all "eth0" references to "ppp0" (for modem) or "ath0" (for other devices).
Add dbe module to /etc/X11/xorg.conf to reduce flickering.
sudo vi /etc/X11/xorg.conf
find the section titled Section "Module", and add the following line
Load "dbe"
Add conky to Startup programs
Go to System--->Preferences--->Sessions
Once it opens you should see the following screen
Now you need to select statup programs tab and click on add
Once it opens you should see the following screen here you need to click on browse
Now you need to select conky from /usr/bin and click on open
Once you click on open you should see the following screen here you need to select ok and close
Next time when you reboot your machine conky will start automatically.
If you want to start this from command line just enter the following command
conky
Output looks like below
Only Conky Screenshot
If you want to know more about configuration file and other options check here
Nice article ๐
I just stopped here while searching for advanced configuration files and want to drop a hint i didn’t see here.
If conky is flickering while updates you need to enable double buffering in conky’s configuration file as it is to see above. This will have no effect until you enable double buffering in X11, too.
In order to do this one need to edit the xorg.conf (usually in /etc/X11 and edit as root) and add
Load “dbe”
to the
Section “Module”
Changes will have no effect until your restart the X11 server (e.g. with ctrl+alt+delete)
I lately ran into to this issue and think it’s worth a comment.
polarizer
use ctrl+alt+backspace for X11 restart
Thanks for the article, worked like a charm!
thanks
but it doesnt work on ubuntu 8.10
Sorry being a bit picky but saying: “Conky – a light weight system monitor for Ubuntu Linux Systems” is completely wrong. Conky has NULL relation (and thankfully) with the horrible distro Ubuntu. It even has nothing binding it to Linux, runs fine on my BSD boxes.
It doesn’t say anywhere that it is exclusive to Ubuntu, nor to Linux; but it is indeed ‘for’ Ubuntu, as my laptop is ‘for’ typing and ‘for’ watching videos. The irony of it all being of course, that -you- are doing this complaining on a website focused solely on Ubuntu. Why are you here?
Hmmmm, this is working in Ubuntu 8.10?
Thanks for all the effort to publish this, I have it running with no issues first time on Intrepid Ibex.
Good luck to those who seem to have issues I would love to help but wouldn’t know where to start being new and all
you dont need to edit the xorg.conf,
if you add the line :
“override_utf8_locale yes” (no quotes)
will stop the flicker, you may need to look and see if there is a similar line which says “no” in which case you can omit the line that contains “no”, just thought that it might help.
Also you can do some really funky stuff, I would suggest for new users the weather and lyrics add-ons, it takes some learning, but its not tough in the slightest and the result is often good, the chrunchbang forums have a really good conky thread upon which i stole most of my config
Thanks a million! I love conky, If only it was a bit easier to configure the damn thing.
At what line is the end of the code to be copied? Is it all above the line:
“You can also extract the sample file using the following command”?
Milan
Thank you for spending your time making this great tutorial! Jim
Sorry,but i cannot see the main purpose/significance of conky??
Satish, the importance of Conky to me as a sys admin is that usually a lot of systems are connected to one monitor and mouse (KVM connections). With Conky I can look at the desktop and tell which system I am working on or looking at.
neither adding double buffer not the xorg.conf edit or adding the utf line makes any difference to flickering. this has been like this since jaunty ๐ working perfectly in intrepid
I know this probably sounds silly, but how does one create a configuration file?
Hi,
I configured my first conky config, and honestly been addicted to it.
Everything was working fine until yesterday before i logged off for the day.
Since today morning i started facing conky freezing issues. it used to freeze for seconds together, kind of choppy ! Have been trying to get it back to the performance it displayed yesterday but haven’t succeeded.
I realize there was an auto update (Ubuntu 9.04) today morning. Could that have messed up something ?
Now whenever i start conky through the application menu or startup entry. It either doesn’t display anything but continue to run when veiwed in the system monitor. If it starts then its pretty choppy. nowhere close to yesterday’s ‘Grand Premier’ opening i happen to witness. ๐ but not for long ๐
However when i launch the app through the terminal, the terminal freezes at the following with no display on the desktop.
”
Conky: desktop window (a5) is root window
Conky: window type – normal
Conky: drawing to created window (0x3a00001)
Conky: drawing to double buffer
”
and when i close the terminal window, i get the display on the desktop but in a froozen state !!!
Can you please help me fix the problem ?
PS: following were the auto updates that where installed
”
Upgraded the following packages:
dhcp3-client (3.1.1-5ubuntu8.1) to 3.1.1-5ubuntu8.2
dhcp3-common (3.1.1-5ubuntu8.1) to 3.1.1-5ubuntu8.2
google-chrome-unstable (4.0.295.0-r35884) to 4.0.302.2-r36665
”
thanks.
Hi,
thanks, I think i have figured out the issue. Looks like the below command (for displaying the Public IP) and its implementation, for some reason was making my conky choppy and the subsequent issues i was facing.
${execi 1 ~/.scripts/ip.sh}
my conky is chirping again.
๐
I’m having trouble with conky myself as well. I should say I’m an extreme n00b, I have Ubuntu 9.10. I installed X11-dev then installed conky thru the terminal, followed instructions from a separate ubuntu forum post, and when i went to run conky from the terminal, I got this:
Conky: border_margin is deprecated, please use window.border_inner_margin instead
Conky: statfs ‘/home/tmo’: No such file or directory
Conky: desktop window (22000cf) is subwindow of root window (ff)
Conky: window type – override
Conky: drawing to created window (0x3e00001)
Conky: drawing to double buffer
Conky: statfs ‘/home/tmo’: No such file or directory
Conky: obj->data.cpu_index 2 info.cpu_count 1
Conky: attempting to use more CPUs than you have!
Segmentation fault
dbook82@dbook82-laptop:~$ # UBUNTU-CONKY
dbook82@dbook82-laptop:~$ #
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # Create own window instead of using desktop (required in nautilus)
dbook82@dbook82-laptop:~$ own_window yes
own_window: command not found
dbook82@dbook82-laptop:~$ own_window_type override
own_window_type: command not found
dbook82@dbook82-laptop:~$ own_window_transparent yes
own_window_transparent: command not found
dbook82@dbook82-laptop:~$ own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_hints: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # Use double buffering (reduces flicker, may not work for everyone)
dbook82@dbook82-laptop:~$ double_buffer yes
double_buffer: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # fiddle with window
dbook82@dbook82-laptop:~$ use_spacer right
use_spacer: command not found
dbook82@dbook82-laptop:~$ use_xft yes
use_xft: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # Update interval in seconds
dbook82@dbook82-laptop:~$ update_interval 3.0
update_interval: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # Minimum size of text area
dbook82@dbook82-laptop:~$ minimum_size 200 800
minimum_size: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # Draw shades?
dbook82@dbook82-laptop:~$ draw_shades no
draw_shades: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # Text stuff
dbook82@dbook82-laptop:~$ draw_outline no # amplifies text if yes
draw_outline: command not found
dbook82@dbook82-laptop:~$ draw_borders no
draw_borders: command not found
dbook82@dbook82-laptop:~$ font arial
font: command not found
dbook82@dbook82-laptop:~$ uppercase no # set to yes if you want all text to be in uppercase
uppercase: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # Stippled borders?
dbook82@dbook82-laptop:~$ stippled_borders 3
stippled_borders: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # border margins
dbook82@dbook82-laptop:~$ border_margin 9
border_margin: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # border width
dbook82@dbook82-laptop:~$ border_width 10
border_width: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # Default colors and also border colors, grey90 == #e5e5e5
dbook82@dbook82-laptop:~$ default_color grey
default_color: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ own_window_colour brown
own_window_colour: command not found
dbook82@dbook82-laptop:~$ own_window_transparent yes
own_window_transparent: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # Text alignment, other possible values are commented
dbook82@dbook82-laptop:~$ #alignment top_left
dbook82@dbook82-laptop:~$ alignment top_right
alignment: command not found
dbook82@dbook82-laptop:~$ #alignment bottom_left
dbook82@dbook82-laptop:~$ #alignment bottom_right
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # Gap between borders of screen and text
dbook82@dbook82-laptop:~$ gap_x 10
gap_x: command not found
dbook82@dbook82-laptop:~$ gap_y 10
gap_y: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # number of cpu samples to average
dbook82@dbook82-laptop:~$ # set to 1 to disable averaging
dbook82@dbook82-laptop:~$ cpu_avg_samples 2
cpu_avg_samples: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ text_buffer_size 1024
text_buffer_size: command not found
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ # stuff after โTEXTโ will be formatted on screen
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ TEXT
TEXT: command not found
dbook82@dbook82-laptop:~$ $color${font arial:size=9}
bash: $color${font arial:size=9}: bad substitution
dbook82@dbook82-laptop:~$ $nodename@$sysname $kernel on $machine${font arial:size=8}
bash: $machine${font arial:size=8}: bad substitution
dbook82@dbook82-laptop:~$ Battery ${battery_bar 6 BAT0}
bash: ${battery_bar 6 BAT0}: bad substitution
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ ${color orange}CPU $color
bash: ${color orange}CPU: bad substitution
dbook82@dbook82-laptop:~$ ${freq}MHz${alignr}Load: ${loadavg}
MHzLoad:: command not found
dbook82@dbook82-laptop:~$ ${alignr}${loadgraph 20,250 e5e5e5 F1AA0E}
bash: ${alignr}${loadgraph 20,250 e5e5e5 F1AA0E}: bad substitution
dbook82@dbook82-laptop:~$ CPU Total:${color} ${cpu cpu0}% ${color}${alignr}Temp:${color} ${acpitemp}
bash: ${cpu cpu0}%: bad substitution
dbook82@dbook82-laptop:~$ ${alignr}${cpugraph 0 20,250 e5e5e5 F1AA0E}
bash: ${alignr}${cpugraph 0 20,250 e5e5e5 F1AA0E}: bad substitution
dbook82@dbook82-laptop:~$ Core one: ${color}${cpu cpu1}% ${alignr} Core two: ${color}${cpu cpu2}%
bash: ${color}${cpu cpu1}%: bad substitution
dbook82@dbook82-laptop:~$ ${cpugraph 1 20,120 e5e5e5 F1AA0E}${alignr}${cpugraph 2 20,120 e5e5e5 F1AA0E}
bash: ${cpugraph 1 20,120 e5e5e5 F1AA0E}${alignr}${cpugraph 2 20,120 e5e5e5 F1AA0E}: bad substitution
dbook82@dbook82-laptop:~$ NAME${alignr}PID CPU% MEM%
NAMEPID: command not found
dbook82@dbook82-laptop:~$ ${top name 1}${alignr}${top pid 1} ${top cpu 1} ${top mem 1}
bash: ${top name 1}${alignr}${top pid 1}: bad substitution
dbook82@dbook82-laptop:~$ ${top name 2}${alignr}${top pid 2} ${top cpu 2} ${top mem 2}
bash: ${top name 2}${alignr}${top pid 2}: bad substitution
dbook82@dbook82-laptop:~$ ${top name 3}${alignr}${top pid 3} ${top cpu 3} ${top mem 3}
bash: ${top name 3}${alignr}${top pid 3}: bad substitution
dbook82@dbook82-laptop:~$ ${top name 4}${alignr}${top pid 4} ${top cpu 4} ${top mem 4}
bash: ${top name 4}${alignr}${top pid 4}: bad substitution
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ ${color orange}MEMORY / DISK $color
bash: ${color orange}MEMORY: bad substitution
dbook82@dbook82-laptop:~$ Total: ${color}${memmax} ${alignr} Free: ${color}${memfree}
Total:: command not found
dbook82@dbook82-laptop:~$ RAM: $memperc% ${alignr}Swap: $swapperc%
RAM:: command not found
dbook82@dbook82-laptop:~$ ${memgraph 20,120 e5e5e5 F1AA0E} ${alignr} ${swapbar 20,120 }
bash: ${memgraph 20,120 e5e5e5 F1AA0E}: bad substitution
dbook82@dbook82-laptop:~$ root: ${fs_used_perc /}% ${fs_bar 6 /}$color
bash: ${fs_used_perc /}%: bad substitution
dbook82@dbook82-laptop:~$ home: ${fs_used_perc /home/tmo}% ${fs_bar 6 /home/tmo}$color
bash: ${fs_used_perc /home/tmo}%: bad substitution
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ ${color orange}WIFI (${addr wlan0}) $color
bash: syntax error near unexpected token `${addr wlan0}’
dbook82@dbook82-laptop:~$ ${wireless_essid wlan0} ${wireless_link_bar 6 wlan0}
bash: ${wireless_essid wlan0}: bad substitution
dbook82@dbook82-laptop:~$ Down: $color${downspeed wlan0} k/s ${alignr}Up: ${upspeed wlan0} k/s
bash: $color${downspeed wlan0}: bad substitution
dbook82@dbook82-laptop:~$ ${downspeedgraph wlan0 20,120 e5e5e5 F1AA0E} ${alignr}${upspeedgraph wlan0
> 20,120 e5e5e5 F1AA0E}$color
bash: ${downspeedgraph wlan0 20,120 e5e5e5 F1AA0E}: bad substitution
dbook82@dbook82-laptop:~$ Total: ${totaldown wlan0} ${alignr}Total: ${totalup wlan0}
bash: ${totaldown wlan0}: bad substitution
dbook82@dbook82-laptop:~$ Inbound: ${tcp_portmon 1 32767 count} Outbound: ${tcp_portmon 32768
> 61000 count}${alignr}Total: ${tcp_portmon 1 65535 count}
bash: ${tcp_portmon 1 32767 count}: bad substitution
dbook82@dbook82-laptop:~$
dbook82@dbook82-laptop:~$ ${color orange}LOGGING $color
bash: ${color orange}LOGGING: bad substitution
dbook82@dbook82-laptop:~$ ${font arial:size=7}${execi 30 tail -n 10 /var/log/messages | fold -w45}
Some help please?
Or how can I delete it to reinstall fresh?
.
Conky: missing text block in configuration; exiting
***** Imlib2 Developer Warning ***** :
This program is calling the Imlib call:
imlib_context_free();
With the parameter:
context
being NULL. Please fix your program.
I get that error message when trying to run conky. any help?
Using Mint Helena BTW
Your conky is great for standard conky
I don’t understand why not use for start
setting in ubuntu distros
I like this configuration as standard!
Conky+Lua looking great. Can collect any panel
Amir I am getting the same problem when using ubuntu 10.04. it’s also saying the same thing about fixing the problem……..were u able to fix that??I seriously need help……
Same as amir and indypat. Mint 9.
I have figured out the solution to my problem. I was root when running conky. running it without being rooted fixed this for me. Hope this helps you guys. I accidentally figured this out by forgetting to root before i ran it.
how can i have two conky at desktop on different side?
please help me i’m a new user.
For those of you having trouble with the config file, simply create a new file named .conkyrc in the home folder of your user. (for me this would be under /home/cck)If you search google for conky config files you can also copy them down and replace the .conkyrc file with them. It lets you try out many people’s configurations and you can see what works for you. If you don’t like your configuration, simply delete the file and start over.
I want to display the total amount of downloads, from ethernet + wifi
How do I ad and display the sum of (in my case) eth0 and wlan0?