Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo
- - - - -

How to install and configure Conky System Monitor


  • Please log in to reply
19 replies to this topic

#1 Al1000

Al1000

  • Global Moderator
  • 5,923 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:Scotland
  • Local time:07:23 PM

Posted 18 February 2015 - 08:38 AM

Conky is a free software system monitor for the X Window System. It is available for Linux, FreeBSD, and OpenBSD.[2] Conky is highly configurable[3][4][5] and is able to monitor many system variables including the status of the CPU, memory, swap space, disk storage, temperatures, processes, network interfaces, battery power, system messages, e-mail inboxes, Arch Linux updates, many popular music players (MPD, XMMS2, BMPx, Audacious, etc.), weather updates, breaking news, and much more.[6] Unlike system monitors that use high-level widget toolkits to render their information, Conky is drawn directly in an X window. This allows it to consume relatively fewer system resources when configured similarly.[7]

Conky has gained a strong following among many Linux and BSD enthusiasts, and was hailed as "one of the best maintained, and definitely one of the most useful, programs in the world of open source" in Linux Magazine.[8]

http://en.wikipedia.org/wiki/Conky_(software)


To install Conky from the terminal in Mint and Ubuntu etc, run:
 
sudo apt-get install conky-all
To run Conky with the default display either type conky in your applications search facility in the menu (or in dash on Ubuntu) and select Conky. Or alternatively type:
conky &
... in a terminal. The ampersand is used to start the default conky as a background process, meaning you can simply press Ctrl^c (i.e. hold down Ctrl and press c) to close the terminal, as it would otherwise be run in the terminal rather than in the background.

You can see the default configuration file at /etc/conky/conky.conf, and you'll find other useful documents in /usr/share/doc/conky-all

I doubt that many people use the default display though, so here is how to change it. You can use any text editor, and I'm going to use nano.

First of all create a file called .conkyrc in your Home directory. To create the file using nano text editor, type or paste the following into a terminal:
 
nano .conkyrc
Next you need to put a script for conky in the file, as up to now it has been using the default configuration in /etc/conky/conky.conf

You can search the internet for .conkyrc scripts and use one you like, many of which will be configured to work on particular destops and/or require additional applications to be installed; so here is mine that I can confirm works on KDE, MATE and Gnome3 desktops. It uses minimal system resources and doesn't require any additional software to be installed, and you could use to get you started.
 
alignment top_right
background true
border_width 1
cpu_avg_samples 2
default_color green
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
use_xft yes
xftfont Bitstream Vera Sans Mono:size=10
gap_x 5
gap_y 110
minimum_size 5 5
net_avg_samples 2
double_buffer yes
out_to_console no
own_window yes
own_window_argb_visual yes
own_window_argb_value 100
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
stippled_borders 0
update_interval 03.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no

TEXT
${color}${scroll 16 $nodename - $sysname $kernel on $machine | }
${color white}$hr
${color}Uptime:$uptime
${color white}$hr
${color}RAM Usage:$mem/$memmax - $memperc% ${membar 7}
Swap Usage:$swap/$swapmax - $swapperc% ${swapbar 7}
${color white}$hr
${color}CPU 1: ${cpu cpu1}% ${cpubar cpu1}
CPU 2: ${cpu cpu2}% ${cpubar cpu2}
Frequency: ${freq}MHz
CPU 1 Temp: ${hwmon 1 temp 1}C    CPU 2 Temp: ${hwmon 2 temp 1}C
${color white}$hr
${color}File systems: ${fs_free /}/${fs_size /} ${fs_bar 6 /}
${color white}$hr
${color}Networking:
Up: ${upspeed wlan0}/s       Down: ${downspeed wlan0}/s
${color white}$hr
${color}Processes:$processes     Running:$running_processes
${color white}$hr
${color}Name               CPU%   MEM%  USER
${top name 1} ${top cpu 1} ${top mem 1}  ${top user 1}
${top name 2} ${top cpu 2} ${top mem 2}  ${top user 2}
${top name 3} ${top cpu 3} ${top mem 3}  ${top user 3}
${top name 4} ${top cpu 4} ${top mem 4}  ${top user 4}
${top name 5} ${top cpu 5} ${top mem 5}  ${top user 5}
Simply copy and paste that, or whatever script you decide to use, into your .conkyrc file.
 
This script is configured for a dual-core CPU and for the purposes of this post, wifi as well. This is what it looks like:

conkydebian1.png

To change the green text to, for example white, simply change the line that says:
 
default_color green
to:
default_color white
If you use ethernet (and your connection is called eth0) then change the instances of "wlan0" to "eth0".

If your CPU is single-core then change "CPU1" to "CPU0" and delete the portions of script relating to CPU2. Or if for example your CPU has four cores, then using the parts of script relating to CPU1 and CPU2 as examples, add more lines using the same script and typing CPU3 and CPU4, etc. You will soon get the hang of which parts of the script do what.

When you have finished editing the .conkyrc file, save and exit nano.

Note that the background parameter is set to "true" which means that Conky will now start as a background process automatically, so there is no longer any need to use ampersand when starting it from a terminal. But it seems that most people like Conky to start automatically, which is certainly what I've always done. Rather than simply add Conky to your list of start-up applications, I recommend instead creating a start up file with a delay, and adding a path to the file to your start up applications. This ensures that Conky won't be trying to start at the same time as your desktop loads, and it has been known to interfere with applications such as Compiz when it tries to start simultaneously.

My conky start file is called conkystart, but you can name it anything you like. You can also of course use any text editor to create it, but just for fun I'm creating it with the cat command because it only has two lines of text, which are as follows:
 
#!/bin/bash
sleep 10 && conky;
To create a file called conkystart in your Home directory using cat, containing the above code, open a terminal and paste or type the following lines one at a time, and press enter after pasting/typing each line:
 
cat > conkystart
#!/bin/bash
sleep 10 && conky;
After typing/pasting the final line and pressing enter, press Ctrl^d

Now the file and its contents have been created. Next you need to make the file executable:
 
chmod +x conkystart
Now all that remains to be done is to add the path to your conkystart file to the Startup applications. Open your Startup applications utility, and click "add" to add Conky to the list of applications. Type in the name of the application and a description if you like, then either type in the path to the conkystart file in the box for "command" or browse to the file and select it:

conkydebian2.png

conkydebian3.png

Now Conky will start automatically, 10 seconds after you log in, which should be shortly after your desktop has finished loading. You can adjust the "10" parameter in the conkystart file to suit the speed that your computer loads the desktop.

Should you want to stop Conky running for whatever reason, open a terminal and type:
 
killall conky
EDIT: If the start-up script doesn't work in more recent Linux distros, instead, try creating the following file: ~/.config/autostart/conky.desktop
 
[Desktop Entry]
Exec=sleep 3 && conky
Hidden=false
Icon=system-run
Path=
Terminal=false
Type=Application

Edited by Al1000, 30 June 2017 - 10:42 AM.
changed image hosting


BC AdBot (Login to Remove)

 


m

#2 shadow-warrior

shadow-warrior

  • Members
  • 188 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Nicaragua
  • Local time:01:23 PM

Posted 19 February 2015 - 12:17 PM

Conky Manager is a graphical front-end for managing Conky config files. It provides options to start/stop, browse and edit Conky themes installed on the system. Packages are currently available in Launchpad for Ubuntu and derivatives (Linux Mint, etc)

 

for Debian

conky-manager-latest-i386.deb (32-bit, 1 MB)

conky-manager-latest-amd64.deb (64-bit, 1 MB)



#3 pcpunk

pcpunk

  • Members
  • 4,883 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Florida
  • Local time:02:23 PM

Posted 20 October 2015 - 06:02 PM

Please help, you don't say HOW to save this script.  I don't see any Save Option in nano?


sBCcBvM.png

Created by Mike_Walsh

 

KDE, Ruler of all Distro's

eps2.4_m4ster-s1ave.aes_pcpunk_leavemehere

 


#4 DeimosChaos

DeimosChaos

  • BC Advisor
  • 1,400 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:United States, Delaware
  • Local time:02:23 PM

Posted 20 October 2015 - 08:08 PM

Pcpunk, CTRL + X will exit, then it will prompt you to save, you type "Y" to save. May or may not be case sensitive... I can't remember if it is.


OS - Ubuntu 14.04/16.04 & Windows 10
Custom Desktop PC / Lenovo Y580 / Sager NP8258 / Dell XPS 13 (9350)
_____________________________________________________
Bachelor of Science in Computing Security from Drexel University
Security +


#5 pcpunk

pcpunk

  • Members
  • 4,883 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Florida
  • Local time:02:23 PM

Posted 20 October 2015 - 10:16 PM

Thanks DC!


sBCcBvM.png

Created by Mike_Walsh

 

KDE, Ruler of all Distro's

eps2.4_m4ster-s1ave.aes_pcpunk_leavemehere

 


#6 pcpunk

pcpunk

  • Members
  • 4,883 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Florida
  • Local time:02:23 PM

Posted 22 October 2015 - 04:13 PM

Big thanks to Al000 for posting this and allowing me to learn more and helping me do so!  Now let me go and break some stuff!


sBCcBvM.png

Created by Mike_Walsh

 

KDE, Ruler of all Distro's

eps2.4_m4ster-s1ave.aes_pcpunk_leavemehere

 


#7 NickAu

NickAu

    Bleepin' Fish Doctor


  • Moderator
  • 10,529 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:127.0.0.1 Australia
  • Local time:06:23 AM

Posted 22 October 2015 - 04:18 PM

 

Now let me go and break some stuff!

:hysterical:



#8 TheJokerz

TheJokerz

  • Members
  • 268 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:Ohio
  • Local time:02:23 PM

Posted 21 September 2016 - 09:19 AM

This is awesome thanks for sharing!



#9 Al1000

Al1000
  • Topic Starter

  • Global Moderator
  • 5,923 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:Scotland
  • Local time:07:23 PM

Posted 21 September 2016 - 11:28 AM

Thanks for bumping the thread, as I just noticed a couple of errors in the OP which I have now corrected. :)

#10 TheJokerz

TheJokerz

  • Members
  • 268 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:Ohio
  • Local time:02:23 PM

Posted 21 September 2016 - 02:05 PM

Nice!  I cant wait to get home and try this!  I was messing around with conky yesterday and could not get it to do what I want!



#11 Al1000

Al1000
  • Topic Starter

  • Global Moderator
  • 5,923 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:Scotland
  • Local time:07:23 PM

Posted 21 September 2016 - 06:54 PM

Here's my .conkyrc file from antiX. It's the "standard antiX .conkyrc file" with a few lines added and some commented out.

Spoiler


#12 TheJokerz

TheJokerz

  • Members
  • 268 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:Ohio
  • Local time:02:23 PM

Posted 21 September 2016 - 07:40 PM

Nice thank you for sharing!  I am a complete noob when it comes to conky!   What is the antiX?



#13 wizardfromoz

wizardfromoz

  • Banned
  • 2,799 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:05:23 AM

Posted 21 September 2016 - 08:47 PM

Hi Joker

 

 

What is the antiX?

 

AntiX 16 and MX-15 are two Linux Distros produced by Mepis.

 

At http://antix.mepis.org/index.php?title=Main_Page you will find links to download one or both.

 

I run both, but am particularly fond of MX-15.

 

They are based directly on Debian Linux itself.

 

Enjoy Linux ... and yes, this IS an excellent Topic. @Al1000 - should make it a Tutorial Al?

 

 

:wizardball: Wizard

 

BTW you can also read about Conky Manager (referred to above), a GUI frontend for managing Conky configuration files, here http://www.teejeetech.in/p/conky-manager.html  . Tony George, of teejeetech, developed Conky Manager, and is also responsible for Timeshift and Aptik.



#14 NickAu

NickAu

    Bleepin' Fish Doctor


  • Moderator
  • 10,529 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:127.0.0.1 Australia
  • Local time:06:23 AM

Posted 21 September 2016 - 08:49 PM

Heres a bunch of pre made conky's  just follow the simple instructions to install.

http://www.noobslab.com/2012/07/conky-collection-for-ubuntulinux.html



#15 TheJokerz

TheJokerz

  • Members
  • 268 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:Ohio
  • Local time:02:23 PM

Posted 22 September 2016 - 07:51 AM

Thanks Wizard!

 

Also thank you as well Nick!






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users