January 08 2008
Conky - A light system monitor
Tagged Under : Conky, FAQ, format, guide, monitor, new vision, setting up, system, temperature, tutorial
There a quite a few ways to view system stats in Linux like CPU or Hard Disk temperature. The usual ways include using gdesklets and screenlets to get the same. Although the benefit of the above is that you get rather neat looking little applets which you can place all over your desktop, they come with the disadvantage of using quite a bit more memory. With the decreasing prices of Memory this shouldn’t be an issue for most. However for those resource conscious folks who would like to view all those system stats at a low memory usage overhead then Conky is definitely the way to go.
I recently learned how to use Conky to monitor the stats of my system and Im pretty pleased with it. Just to make sure that you know what you’re getting into I’ve shown a screenshot of my Conky configuration given below.

Now lets get started in configuring our own Conky. First of all you will need to install Conky from the repositories. You can do this by issuing the following command.
sudo apt-get install conky
Conky uses the file .conkyrc to load the various settings you want monitored on your system. Now you could either start writing your own conky or get a basic configuration listed at one of the sites below. I used the New Vision for Conky which you can get from here.
Theres quite a few scripts that you can use on gnome-look.org or you can get some from the Conky home page itself. For this example we will be using the New Vision of Conky. Download the script and then extract it to your home folder. You should now have a new folder called lukconky . Once we have the script extracted we need tog et the fonts that the script uses as well. In the above conky screenshot all the symbols are actually characters of various fonts. To get those symbols to work w will have to install those fonts to our computer. The fonts required for this conky script are given below. Download them to your lukconky folder.
Font 1: Pizza Dude Bullets
Font 2: Style Bats
Font 3: Weather
Font 4: Xspiralmental
Thanks to Murtaza for gettign the updated links
.
Extract the above fonts and then run the following command in your terminal.
gksu nautilus fonts://
Using another Window (Use the menu Places > Home Folder) browse to the lukconky folder and copy the fonts that you just extracted and paste them into the nautilus window that just opened up. Lets move on to the configuration part. In the lukconky folder you will notice that there is a file called conky text in there. This is the text that needs to go into the .conkyrc file in your home folder to work. So open that file in gedit (Applications > Accessories > Text Editor ) and then open a new file. Copy and paste the text in the conky text file into the new file. Make sure you save the file using the character encoding “Western” as shown in the picture below.

Name the file as .conkyrc and then add the following lines to the beginning of the file.
use_xft yes
xftfont verdana:size=8
xftalpha 0.8
You can close out of the file at this point. For .conkyrc to be able to access the temperatures of your Hard Disk and CPU etc you will need the packages lm-sensors and hddtemp installed. You can do this by running the command.
sudo apt-get install lm-sensors
sudo apt-get install hddtemp
Next copy the scripts folder as is from the lukconky folder and paste it in your home folder. There are two files in there which you will need to edit.
check_gmail.sh : In this file you will have to enter your user name and password where it says xxx and yyy respectively. Personally I don’t monitor my gmail like that so I haven’t configured it and have removed the line which access gmail from my .conkyrc file.
pogodynka.sh : This file contains all the weather related settings you will need. You will have to change the location to indicate your location in this file. You can do this to change the line that says kod=PLXX0013 to your location number which you can find by going to http://weather.yahoo.com/ and then browsing to your location. Extract the location ID from the web page address and then replace it in the above line. In my case I used kod=INXX0032 for Cochin, India.
Lets confirm that everything works now. Open up a terminal and then enter in the following command
conky
If everything went well then you should have a similar conky to mine running in your window.
Although this seemed to be a bit intensive to setup . There are quite a few conky scripts you can download which don’t need alot of setup. You can find them at the below sites.
Conky Screenshots and their Configuration
Gnome Look : Search for conky in this page.
Conky Home Page : For Documentation in case you would want to tinker with any settings.
Conky Screenshots with their configurations on Ubuntuforums.org : A huge thread with lots of conky configurations.
Edit: Ive added my conkyrc file that I use here for your use if you need it. Please note that my Conky configuration uses black as the font and does not check for email either. You can download it here.










(1 votes, average: 4 out of 5)
Great post! What’s the name of theme you’re using on Ubuntu? I’m liking it
[Reply]
Its Slickness on gnome-look.org . You can find it at http://gnome-look.org/content/show.php/SlicknesS?content=71993
[Reply]
Your tips are very good and I have gotten farther with this conky, however when I run the conky I get
localhost [127.0.0.1] 7634 (?) : Connection refused
Even if I take out the HDDTEMP stuff, I still get a GETHOSTBYNAME failure - any tips?
[Reply]
Yes Jeff, I recall getting the same error. I can’t remember at the moment what i actually did to remove it though. I think I might have removed the line which accessed gmail. So you might want to try that out. Otherwise Ill check and see if I can ercall what I did to fix that.At the moment Im bogged with my exams so Im kind of short on time .
[Reply]
Jeff , tell you what . I can attach my conkyrc file and you can check if that works. If it does then as I said above the configuration for receiving your Gmail is wrong. I didn’t try that part cause I use Evolution for checking my email anyway. I have attached the file to the blog in case you need it
[Reply]
Hey Man,
Thanks so much. I’m still getting errors though. I’m just tinkering in my spare time which I’m sure you can appreciate. If you do get a chance, I basically ran your script unedited just to give it a whirl. Now when I launch conky I get:
localhost [127.0.0.1] 7634 (?) : Connection refused
gethostbyname: Unknown host
Still odd - I did not put gmail back in or anything.
The local host is happening on my script call to hddmonit.sh, not sure where the gethostbyname error is happening.
[Reply]
OK - getting there - I now have it working, but still getting the local host error (which is not updating my HDD, CPU or FSB - and the weather is not working for some odd reason (and is not in English - I’ll have to edit that file).
[Reply]
OK - still have the localhot error - getting the temperature (-3o/-12o) but no font picture.
[Reply]
A bit further, my weather was actually ‘UNKNOWN’ so there was no picture to display for that - which is fine - leaves me with my localhost issue - any ideas?
[Reply]
Jeff: The error localhost [127.0.0.1] 7634 (?) : Connection refused makes me think that theres something wrong with setting hddtemp to work. Did you install hddtemp as explained above. If you did then does your Hard Drive support this? Make sure you have SMART functions for your Hard Disk enabled. I believe you can enabled this feature in your BIOS.
As far as the temperature is concerned as you said above. It wont show an icon unless you have the condition mentioned in the script file conditions.sh . I had the same problem when my location showed up as “Haze” which wasn’t in the condition script file. I just copied the line and added Haze to it and it worked fine :). Let me know if this solves your problem.
[Reply]
It was off, the call localhost won’t work, but I swapped it out for calling hddtemp directly, and I got that all good now. The CPU and FSB are 0 though - no errors - is that odd?
Weather is working, but I only seem to get unknown so may look for an alternate site to scrape for that.
Thanks for you help though! I really appreciate this. Fun to play with this.
[Reply]
What motherboard are you using Jeff? I’m guessing at this point that your motherboard might not be supported by lm-sensors maybe? however there are ways to extract the temperature using other commands I believe. I recall seeing some command like acpi something , but I’ll have to look that up. Theres no way your temp of your CPU and FSB is at 0
. As for the weather, what location are you from ? Have you changed the code? I have edited my weather portion a bit I believe.What you want to do is extract the line which retrieves the weather and run it bit by bit from the terminal and it should show you what goes wrong if anything does go wrong that is.
[Reply]
Man you are helpful. I am in Nova Scotia (Canada) so it keep coming up unknown - more annoying than anything else.
I played with the lmsensors a bit, I can run that from command line - here’s what I get:
jeffrey@jeffrey-desktop:~$ sensors
ALARM
ALARM
w83697hf-isa-0290
Adapter: ISA adapter
VCore: +1.63 V (min = +0.18 V, max = +1.68 V)
+3.3V: +3.30 V (min = +0.51 V, max = +0.40 V) ALARM
+5V: +4.92 V (min = +0.24 V, max = +5.59 V)
+12V: +11.07 V (min = +5.84 V, max = +3.95 V) ALARM
-12V: +0.06 V (min = +3.51 V, max = -4.38 V) ALARM
-5V: +5.10 V (min = -7.36 V, max = -2.28 V) ALARM
V5SB: +5.38 V (min = +0.22 V, max = +0.11 V) ALARM
VBat: +3.23 V (min = +0.03 V, max = +1.82 V) ALARM
fan1: 770 RPM (min = 2481 RPM, div =
fan2: 2481 RPM (min = 84375 RPM, div =
temp1: +23°C (high = +32°C, hyst = +0°C) sensor = thermistor
temp2: +39.0°C (high = +70°C, hyst = +42°C) sensor = diode
alarms:
beep_enable:
Sound alarm enabled
So I definitely am getting something, but the script isn’t returning anything.
[Reply]
Well definitely your sensors output is different than mine. here is my output for sensors. If you scroll down you can see the section where it shows the CPU and motherboard temperatures. I guess you could make a custom command to extract the last 2 temperatures but then again the temperature 23 sounds to be on the low side. What motherboard are you using? Im using an Asus M2N-MX SE .
biju@Venom:~$ sensors
k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:
+20°C
Core0 Temp:
+9°C
Core1 Temp:
+17°C
Core1 Temp:
+12°C
it8712-isa-0290
Adapter: ISA adapter
VCore 1: +1.33 V (min = +0.00 V, max = +4.08 V)
VCore 2: +4.08 V (min = +0.00 V, max = +4.08 V) ALARM
+3.3V: +3.31 V (min = +0.00 V, max = +4.08 V)
+5V: +6.85 V (min = +0.00 V, max = +6.85 V) ALARM
+12V: +12.67 V (min = +0.00 V, max = +16.32 V)
-12V: -15.21 V (min = -27.36 V, max = +3.93 V)
-5V: +4.03 V (min = -13.64 V, max = +4.03 V) ALARM
Stdby: +6.85 V (min = +0.00 V, max = +6.85 V) ALARM
VBat: +3.26 V
fan1: 2960 RPM (min = 0 RPM, div = 2)
fan2: 0 RPM (min = 0 RPM, div = 2)
M/B Temp: +40°C (low = -1°C, high = +127°C) sensor = thermistor
CPU Temp: +36°C (low = -1°C, high = +127°C) sensor = thermistor
Temp3: +128°C (low = -1°C, high = +127°C) sensor = disabled
[Reply]
Oh and as for the weather you need to change your file pogodynka.sh to point to access the http://weather.yahoo.com/forecast/CAXX0130.html . This is the page I got when I did a search for Nova Scotia on Yahoo Weather. Is Elmsdale somewhere near you?
Change the line kod=PLXX0013 to kod=CAXX0130 . Please note that PLXX0013 is the location in the original file. Run the following command and see if you get the temperatures.
w3m -dump http://weather.yahoo.com/forecast/CAXX0130_c.html | grep -A21 “Current” | sed ’s/DEG/°/g’
The above is one line. I must say that -3 just freaks me out
.
You can get the temperature only by running the command
w3m -dump http://weather.yahoo.com/forecast/CAXX0130_c.html | grep -A21 “Current” | sed ’s/DEG/°/g’ | tail -n1 | cut -b 1-2
Basically I have used the commands which were present in the script file. According to this I am getting the temperature -3.
You should just be able to get the correct temperatures if the place is correct by changing the kod part .
[Reply]
I’ll have to see what motherboard I am using - PC is a bit older but so much better with Ubuntu than windows.
I do have the temperature (and -3 was correct, tomorrow should go to -18). The only issue I have with the YAHOO one is the ‘unknown’ setting - not getting a cool graphic.
In terms of the other temp settings, have to load up my bios and go from there - wonder if my sensor updates are for my video card (which was a new upgrade to get open GL stuff).
More playing
[Reply]
So funny - Elmsdale (which is close) gets a description (’cloudy’) but Halifax which is the capital of Nova Scotia is always ‘UNKNOWN’.
[Reply]
Well let me know how it goes
.
[Reply]
A wee bit further - Didn’t see anything obvious in my BIOS, but my motherboard is ASUS A7V8X-LA - any ideas on where I can get drivers for that using ubuntu (lots of windows drivers out there)
[Reply]
Hey dude - just giving you more updates as you’ve been very helpful. I ran a Gnome sensors applet and I can get al my info in the tool bar, so conky *should* be able to get the same stuff. As I said before, I swapped out the HD line to use hddtemp directly, and that worked. I now am using ‘acpitemp’ and getting my corret CPU temperature (40oC).
I now have a temp 1 and temp 2 temperature that I can display but cannot show in Conky at the moment - not even sure what those are actually
[Reply]
… and HWMON replaces my i2c and I’m good to go! Now what the hell are those other temperatures I’m checking anyways ..
[Reply]
Not sure about the temperatures
. However why do you need drivers for your mobo? Are you having problems with getting sound or onboard display to work?
[Reply]
I’m good - I think the other two temps are from my video card. I was looking for drivers in the event there was something to upgrade (was grasping at straws). Putting on the gnome sensors showed me I should be able to get the info I was looking for, and then using the different script commands was key to seeing that.
[Reply]
I’d love to get this working but I have 2 big problems. I’ve installed the fonts but they only appear as Verdana. So for instance, to the left of “HDD” reads “X.”
Also, is there a way to convert the temperature to Fahrenheit? I can’t tell because that script is in a language foreign to me.
[Reply]
Patrick the reason why the Symbol is comnig up as an X is because either the font is missing or not installed properly. Another thing you could try is to check if you have the lines
use_xft yes
xftfont verdana:size=8
xftalpha 0.8
To install the fonts I opened sudo nautilus and copied them into the fonts folder.
[Reply]
hello,
could you please tell me how the “unknown host” problem is solved, i still have the problem and I could see nothing on my gnome desktop with this config
[Reply]
I’ve got the same problem with the fonts.
I installed them as you described and added the lines on the head of the .cronkyrc file. but the symbols still don’t appear.
any idea?
[Reply]
@hisoka : You would get the unknown host error if you dont have hddtemp installed or if your hard disk does not supports it.
@mindfuck : Other than having the fonts installed . I guess you could try changing the encoding when saving the file but other than that Im not sure. Whatev distro are you using. Are you using UBuntu 7.10 also?
[Reply]
I remove the line for email from .conkyrc and now conky loads, but not with the special fonts… any ideas?
[Reply]
@igodit :- Did you download and install the fonts as explained above?
[Reply]
I cant download the fonts. Can you post another link. I
googled some of them and I got no luck.
[Reply]
Here are the updated links
http://img.dafont.com/dl/?f=pizzadude_bullets
http://img.dafont.com/dl/?f=style_bats
http://img.dafont.com/dl/?f=weather
http://img.dafont.com/dl/?f=weather
[Reply]
http://img.dafont.com/dl/?f=xspiralmental
[Reply]
ok…this is odd after i copy the conky text i can’t save as Western.
[Reply]
Ok…so for the fonts don’t work….even though they have been place in the fonts folder…there is no font error but the symbols don’t show up…none of the temp work…however, the weather temp is correct…i get a local host error..it says connection refused…im a beginner linux user and I am using ubuntu 7.10 gutsy
[Reply]
@Murtaza. Thank you for getting me the updated links.
First of all , are you editing the file within gedit (Normal Text Editor)? You can access it by going to Applications > Accessories and text Editor . You can change the Character Encoding to Western at the bottom of the Save Dialog. If you can’t do you get an error or are you missing that option?
As for the second error. Do you have hddtemp installed? If you don’t have it installed you will get the above mentioned error.
[Reply]
@Murtaza.
To get the fonts working you have to copy the fonts to /usr/share/fonts/truetype/
with this line
sudo cp /home/user/lukconky/*.ttf .
Change user to your username
[Reply]
Hi,
So i was trying to make the weather script work but i still keep getting a unknown page error. I’m trying to find the weather in San Luis Obispo, CA. I changed the variable kod to USCA1000 but i still get the error. Any suggestions?
[Reply]
@jeannie : Delete the _C in the line http://weather.yahoo.com/forecast/“$kod”_c.html and try again. I believe it should fix the problem you are having.
[Reply]
Hi, your TuT is wonderful, but I’m getting an error when I try to launch conky via terminal:
******@******-desktop:~$ conky
Conky: desktop window (e000bd) is subwindow of root window (13a)
Conky: drawing to desktop window
Conky: drawing to single buffer
gethostbyname: Unknown host
[Reply]
@The Godfather: I believe the gethostbyname error is a result of not having hddtemp and lm-sensors installed correctly. Please make sure you have that installed. Also I don’t think the other three lines in there matter but if you still get an error . Let me know
.
[Reply]
@Anders: I’m using sudo, because putting the fonts into /usr/share/fonts/truetype/ requires root access. I’m still rather new to Ubuntu, but I understand that.
However, I don’t see how sudo cp /home/user/lukconky/*.ttf works to put it there. It doesn’t know where the destination is, even though I know. What command do I use to tell it where to go? It’s sad that I’m hung up on installing the fonts to get this working… It makes so much sense, except that I don’t know how to command it just yet.
Why do I need to be root to put new fonts on the machine? This question is rhetorical, even though an answer might help me understand it better.
Otherwise, @The Void, this tutorial seems very informative. I can’t wait to have this set up running as it looks snazzy.
[Reply]
@nicesocks : I’ve used the above command gksu nautilus fonts:// to just place the fonts in there and it works for me :). The command you gave would work if you ran it from the destination folder I believe. Try out the command given above and let me know if it works. You need to be root because the fonts are stored in your / partition and are considered as system files I guess.
[Reply]
@The Void: Thanks for the info. I tried running the command gksu nautilus fonts:// but I get an error message. [Couldn’t display “fonts:///”. Nautilus cannot handle fonts: locations.] And a folder named root opens up, not one named Fonts.
Yes, it seemed to add another slashie, I double checked that I only put two in.
I am running Hardy Heron, perhaps this directory has been moved, changed, or altered? Is there a command I type in to the terminal to let it know that the Truetype folder is my destination folder? Your help is appreciated!
[Reply]
Hi
I used your great how-to and got it working. I was just wondering if you could tell me how to change the celsius into fahrenheit for all the temperatures. I tried tweaking the scripts but it’s a bit difficult. Thanks for any help.
[Reply]
One more thing. I’m also not getting for CPU temp and FSB temp. Here is a screenshot: http://ubuntuforums.org/attachment.php?attachmentid=72067&d=1212086935
Also, what is FSB temp anyway?
[Reply]
@daikee : Sure thing . Open the pogodynka.sh script and browse to the line
w3m -dump http://weather.yahoo.com/forecast/“$kod”_c.html
Remove the _c and it should give you the temperature in F instead . And out of curiosity you did install the lmsensors package? id have to check into that further I don’t have conky installed at the moment on hardy but I will try and see if I can replicate the problem. out of curiosity what Processor and motherboard.
[Reply]
@nicesocks : I think you can put the fonts in the .fonts folder of your home directory also but I will have to install conky and see if I can get the same to work.
[Reply]
Hi
Thanks for your suggestion. It worked for the weather. I don’t really need to have the CPU and FSB. But can you tell me how to change the celsius to fahrenheit for the HD temp?
[Reply]
Hi again. I was also wondering if you knew how to get battery usage in this conky script with a battery icon and everything.
[Reply]
[…] http://www.filledvoid.com/2008/01/08/conky-a-light-system-monitor/ […]
hi,
I got the conky working with this tutorial but there is one slight problem i am unable to fix. The conky window appears on all the windows i open. it stays on top of all the windows. I have this line in conkyrc:
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
the value “below” i assume is the one which tells conky to stay below all windows. I am trying to see if changing something in compiz will help.
[Reply]