IITDU Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Conky: Excellent System monitor for Ubuntu

4 posters

Go down

Conky: Excellent System monitor for Ubuntu Empty Conky: Excellent System monitor for Ubuntu

Post by BIT0122-Amit Sun Oct 31, 2010 1:51 am

I think some of you have used screenlets. The problem about screenlets is that it eats up too much memory.

However, there is a much better solution available. It is faster, and it is better. And it looks hellishly better.

I picked this up from here. But it is for Linux Mint, so I kind of changed and adapted for ubuntu. But still, most of the credentials should go to that topic Smile

Anyway, lets start.

1. Install necessary packages:

Code:
sudo apt-get install conky-all curl hddtemp lm-sensors python-statgrab

you might or might not be prompted with a screen in terminal asking you with a yes/no dialogue at the end of installation. Use No for now.

2. Setting up necessary things:

give these two commands:
Code:
sudo chmod u+s /usr/sbin/hddtemp
sudo sensors-detect

After the second command, you will be asked several yes/no questions. You should type "Yes" in all of them and press enter to continue.

Now, type
Code:
sudo dpkg-reconfigure hddtemp

when asked if it should be installed as SUID-Root, enter Yes.
set delay value to 30. (or to your preferred value).
It should be started at boot.
use ip as 127.0.0.1
and port as 7634

3. Downloading nice screens:

go to this url and download source files. (conky colors.) Now, go to the folder where it is kept and then extract it using this command:

Code:
tar -xvzf (conky_sourcefilename)

it will create a new folder. Move inside it,
Code:
cd conky_colors
then use
Code:
make
make install
now, type

gedit ~/.conkyrc

remove all lines (you can keep a backup.) and paste the following lines here

Code:

    # Use Xft?
    use_xft yes
    xftfont DejaVu Sans:size=8
    xftalpha 0.8
    text_buffer_size 2048

    # Update interval in seconds
    update_interval 1

    # This is the number of times Conky will update before quitting.
    # Set to zero to run forever.
    total_run_times 0

    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_transparent yes
    own_window_type override
    #own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes

    # Minimum size of text area
    minimum_size 182 0
    maximum_width 182

    # Draw shades?
    draw_shades no

    # Draw outlines?
    draw_outline no

    # Draw borders around text
    draw_borders no

    # Stippled borders?
    stippled_borders 0

    # border margins
    border_margin 5

    # border width
    border_width 1

    # Default colors and also border colors
    default_color white
    #default_shade_color black
    #default_outline_color white
    own_window_colour white

    # 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
    # same thing as passing -x at command line
    gap_x 30
    gap_y 49

    # Subtract file system buffers from used memory?
    no_buffers yes

    # set to yes if you want all text to be in uppercase
    uppercase no

    # number of cpu samples to average
    # set to 1 to disable averaging
    cpu_avg_samples 2

    # number of net samples to average
    # set to 1 to disable averaging
    net_avg_samples 2

    # Force UTF8? note that UTF8 support required XFT
    override_utf8_locale yes

    # Add spaces to keep things from moving about?  This only affects certain objects.
    use_spacer none

    TEXT
    SYSTEM ${hr 2}
    ${goto 6}${voffset 6}${font OpenLogos:size=22}u${font}${goto 36}${voffset -18}${pre_exec cat /etc/issue.net} $machine
    ${goto 36}Kernel: ${kernel}
    ${hr 2}

    ${goto 6}${font StyleBats:size=16}A${font}${voffset -4}${goto 32}CPU1: ${cpu cpu0}% ${alignr}${cpubar cpu0 8,60}
    ${goto 6}${voffset 4}${font StyleBats:size=16}A${font}${voffset -4}${goto 32}CPU2: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}
    ${goto 6}${voffset 4}${font StyleBats:size=16}g${font}${voffset -4}${goto 32}Memory: ${mem} ${alignr}${membar 8,60}
    ${goto 6}${voffset 4}${font StyleBats:size=16}x${font}${voffset -4}${goto 32}Disk: ${diskio}${alignr}${diskiograph 8,60 F57900 FCAF3E}
    ${goto 6}${voffset 4}${font StyleBats:size=16}j${font}${voffset -4}${goto 32}Swap: $swapperc% ${alignr}${swapbar 8,60}
    ${goto 4.5}${voffset 2}${font Poky:size=15}y${font}${voffset -6}${goto 32}HDD temperature:${alignr}${color #FCAF3E}${exec hddtemp /dev/sda -n --unit=C} °C$color
    ${goto 6}${voffset 4}${font StyleBats:size=16}q${font}${voffset -4}${goto 32}Uptime: ${alignr}${uptime}
    ${goto 6}${voffset 4}${font StyleBats:size=16}k${font}${voffset -4}${goto 32}Processes: ${alignr}$processes ($running_processes running)
    ${goto 7.5}${voffset 4}${font Poky:size=15}a${font}${goto 32}${voffset -10}Highest: ${alignr 13}CPU${alignr}RAM
    ${goto 32}${voffset -5.5}${hr 1}
    ${voffset -1}${goto 32}${top name 1} ${goto 124}${top cpu 1}${alignr }${top mem 1}
    ${voffset -1}${goto 32}${top name 2} ${goto 124}${top cpu 2}${alignr }${top mem 2}
    ${voffset -1}${goto 32}${top name 3} ${goto 124}${top cpu 3}${alignr }${top mem 3}
    ${voffset -1}${goto 32}${top name 4} ${goto 124}${top cpu 4}${alignr }${top mem 4}

    Time & Date ${hr 2}
    ${font Arial Black:size=26}${alignc}${time %H:%M}${font}
    ${alignc}${time %A, %B %d, %Y}

    HDD ${hr 2}
    ${font Poky:size=16}y${font} ${voffset -5}File System
    ${voffset 4}${fs_free /}/${fs_size /} ${alignr}${fs_bar 8,60 /}
    ${font Poky:size=16}y${font} ${voffset -5}Home
    ${voffset 4}${fs_free /home}/${fs_size /home} ${alignr}${fs_bar 8,60 /home}

    Network ${hr 2}
    ${if_up wlan0}
    ${font Poky:size=14}Y${font}${goto 32}${voffset -8}SSID: ${wireless_essid wlan0}
    ${goto 32}Signal: ${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 8,60 wlan0}
    ${voffset 4}${font VariShapes Solid:size=14}q${font}${goto 32}${voffset -6}Up: ${upspeed wlan0}${font} ${alignr}${upspeedgraph wlan0 8,60 F57900 FCAF3E}
    ${goto 32}Total: ${totalup wlan0}
    ${voffset 4}${font VariShapes Solid:size=14}Q${font}${goto 32}${voffset -6}Down: ${downspeed wlan0}${font} ${alignr}${downspeedgraph wlan0 8,60 F57900 FCAF3E}
    ${goto 32}Total: ${totaldown wlan0}
    ${voffset 4}${font Poky:size=13}w${font}${goto 32}${voffset -8}Local IP: ${alignr}${addr wlan0}
    ${goto 32}Public IP: ${alignr}${execi 3600 wget -O - http://whatismyip.org/ | tail}
    # |--ETH0
    ${else}${if_up eth0}
    ${voffset -13}${font VariShapes Solid:size=14}q${font}${goto 32}${voffset -6}Up: ${upspeed eth0}${font} ${alignr}${upspeedgraph eth0 8,60 F57900 FCAF3E}
    ${goto 32}Total: ${totalup eth0}
    ${voffset -2}${font VariShapes Solid:size=14}Q${font}${goto 32}${voffset -6}Down: ${downspeed eth0}${font} ${alignr}${downspeedgraph eth0 8,60 F57900 FCAF3E}
    ${goto 32}Total: ${totaldown eth0}
    ${voffset -2}${font Poky:size=13}w${font}${goto 32}${voffset -4}Local IP: ${alignr}${addr eth0}
    ${goto 32}Public IP: ${alignr}${execi 3600 wget -O - http://whatismyip.org/ | tail}
    # |--PPP0
    ${endif}${else}${if_up ppp0}
    ${voffset -13}${font VariShapes Solid:size=14}q${font}${goto 32}${voffset -6}Up: ${upspeed ppp0}${font} ${alignr}${upspeedgraph ppp0 8,60 F57900 FCAF3E}
    ${goto 32}Total: ${totalup ppp0}
    ${voffset -2}${font VariShapes Solid:size=14}Q${font}${goto 32}${voffset -6}Down: ${downspeed ppp0}${font} ${alignr}${downspeedgraph ppp0 8,60 F57900 FCAF3E}
    ${goto 32}Total: ${totaldown ppp0}
    ${voffset -2}${font Poky:size=13}w${font}${goto 32}${voffset -4}Local IP: ${alignr}${addr ppp0}
    ${endif}${else}${voffset 4}${font PizzaDude Bullets:size=12}4${font}${goto 32}Network Unavailable${endif}${endif}

Now, if you want to run conky, press Alt+F2 and type conky. It will take about 13-15 seconds to load. And I am sure you will Love it!!

Here is my desktop:

Conky: Excellent System monitor for Ubuntu Screen10
How about showing us yours?
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

Conky: Excellent System monitor for Ubuntu Empty Re: Conky: Excellent System monitor for Ubuntu

Post by BIT0103-Ovid Thu Dec 16, 2010 2:16 am

I have got a problem. Though i have four cpu its only showing 2.
BIT0103-Ovid
BIT0103-Ovid
Release Candidate
Release Candidate

Course(s) :
  • BIT

Blood Group : O-
Posts : 150
Points : 261

Back to top Go down

Conky: Excellent System monitor for Ubuntu Empty Re: Conky: Excellent System monitor for Ubuntu

Post by BIT0111-muctadir Fri Dec 17, 2010 1:22 am

Several problems identified. Solved some,
1. number of CPU's can be changed. Just use this edited configuration file
Code:

    # Use Xft?
    use_xft yes
    xftfont DejaVu Sans:size=8
    xftalpha 0.8
    text_buffer_size 2048

    # Update interval in seconds
    update_interval 1

    # This is the number of times Conky will update before quitting.
    # Set to zero to run forever.
    total_run_times 0

    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_transparent yes
    own_window_type override
    #own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes

    # Minimum size of text area
    minimum_size 182 0
    maximum_width 182

    # Draw shades?
    draw_shades yes

    # Draw outlines?
    draw_outline yes

    # Draw borders around text
    draw_borders no

    # Stippled borders?
    stippled_borders 0

    # border margins
    border_margin 5

    # border width
    border_width 1

    # Default colors and also border colors
    default_color white
    #default_shade_color black
    #default_outline_color white
    own_window_colour white

    # 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
    # same thing as passing -x at command line
    gap_x 30
    gap_y 49

    # Subtract file system buffers from used memory?
    no_buffers yes

    # set to yes if you want all text to be in uppercase
    uppercase no

    # number of cpu samples to average
    # set to 1 to disable averaging
    cpu_avg_samples 2

    # number of net samples to average
    # set to 1 to disable averaging
    net_avg_samples 2

    # Force UTF8? note that UTF8 support required XFT
    override_utf8_locale yes

    # Add spaces to keep things from moving about?  This only affects certain objects.
    use_spacer none

    TEXT
    SYSTEM ${hr 2}
    ${goto 6}${voffset 6}${font OpenLogos:size=22}${font}${goto 36}${voffset -18}${pre_exec cat /etc/issue.net} $machine
    ${goto 36}Kernel: ${kernel}
    ${hr 2}

    ${goto 6}${font StyleBats:size=16}${font}${voffset -4}${goto 32}CPU1: ${cpu cpu0}% ${alignr}${cpubar cpu0 8,60}
    ${goto 6}${voffset 4}${font StyleBats:size=16}${font}${voffset -4}${goto 32}CPU2: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}

    #Edited by Muctadir Dinar
    ${goto 6}${font StyleBats:size=16}${font}${voffset -4}${goto 32}CPU3: ${cpu cpu2}% ${alignr}${cpubar cpu0 8,60}
    ${goto 6}${voffset 4}${font StyleBats:size=16}${font}${voffset -4}${goto 32}CPU4: ${cpu cpu3}% ${alignr}${cpubar cpu1 8,60}


    ${goto 6}${voffset 4}${font StyleBats:size=16}${font}${voffset -4}${goto 32}Memory: ${mem} ${alignr}${membar 8,60}
    ${goto 6}${voffset 4}${font StyleBats:size=16}${font}${voffset -4}${goto 32}Disk: ${diskio}${alignr}${diskiograph 8,60 F57900 FCAF3E}
    ${goto 6}${voffset 4}${font StyleBats:size=16}${font}${voffset -4}${goto 32}Swap: $swapperc% ${alignr}${swapbar 8,60}
    ${goto 4.5}${voffset 2}${font Poky:size=15}${font}${voffset -6}${goto 32}HDD temperature:${alignr}${color #FCAF3E}${exec hddtemp /dev/sda -n --unit=C} °C$color
    ${goto 6}${voffset 4}${font StyleBats:size=16}${font}${voffset -4}${goto 32}Uptime: ${alignr}${uptime}
    ${goto 6}${voffset 4}${font StyleBats:size=16}${font}${voffset -4}${goto 32}Processes: ${alignr}$processes ($running_processes running)
    ${goto 7.5}${voffset 4}${font Poky:size=15}${font}${goto 32}${voffset -10}Highest: ${alignr 13}CPU${alignr}RAM
    ${goto 32}${voffset -5.5}${hr 1}
    ${voffset -1}${goto 32}${top name 1} ${goto 124}${top cpu 1}${alignr }${top mem 1}
    ${voffset -1}${goto 32}${top name 2} ${goto 124}${top cpu 2}${alignr }${top mem 2}
    ${voffset -1}${goto 32}${top name 3} ${goto 124}${top cpu 3}${alignr }${top mem 3}
    ${voffset -1}${goto 32}${top name 4} ${goto 124}${top cpu 4}${alignr }${top mem 4}

    Time & Date ${hr 2}
    ${font Arial Black:size=26}${alignc}${time %H:%M}${font}
    ${alignc}${time %A, %B %d, %Y}

    HDD ${hr 2}
    ${font Poky:size=16}${font} ${voffset -5}File System
    ${voffset 4}${fs_free /}/${fs_size /} ${alignr}${fs_bar 8,60 /}
    ${font Poky:size=16}${font} ${voffset -5}Home
    ${voffset 4}${fs_free /home}/${fs_size /home} ${alignr}${fs_bar 8,60 /home}

    Network ${hr 2}
    ${if_up eth1}
    ${font Poky:size=14}Y${font}${goto 32}${voffset -8}SSID: ${wireless_essid wlan0}
    ${goto 32}Signal: ${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 8,60 wlan0}
    ${voffset 4}${font VariShapes Solid:size=14}q${font}${goto 32}${voffset -6}Up: ${upspeed wlan0}${font} ${alignr}${upspeedgraph wlan0 8,60 F57900 FCAF3E}
    ${goto 32}Total: ${totalup wlan0}
    ${voffset 4}${font VariShapes Solid:size=14}Q${font}${goto 32}${voffset -6}Down: ${downspeed wlan0}${font} ${alignr}${downspeedgraph wlan0 8,60 F57900 FCAF3E}
    ${goto 32}Total: ${totaldown wlan0}
    ${voffset 4}${font Poky:size=13}w${font}${goto 32}${voffset -8}Local IP: ${alignr}${addr wlan0}
    ${goto 32}Public IP: ${alignr}${execi 3600 wget -O - http://whatismyip.org/ | tail}
    # |--ETH0
    ${else}${if_up eth0}
    ${voffset -13}${font VariShapes Solid:size=14}q${font}${goto 32}${voffset -6}Up: ${upspeed eth0}${font} ${alignr}${upspeedgraph eth0 8,60 F57900 FCAF3E}
    ${goto 32}Total: ${totalup eth0}
    ${voffset -2}${font VariShapes Solid:size=14}Q${font}${goto 32}${voffset -6}Down: ${downspeed eth0}${font} ${alignr}${downspeedgraph eth0 8,60 F57900 FCAF3E}
    ${goto 32}Total: ${totaldown eth0}
    ${voffset -2}${font Poky:size=13}w${font}${goto 32}${voffset -4}Local IP: ${alignr}${addr eth0}
    ${goto 32}Public IP: ${alignr}${execi 3600 wget -O - http://whatismyip.org/ | tail}
    # |--PPP0
    ${endif}${else}${if_up ppp0}
    ${voffset -13}${font VariShapes Solid:size=14}q${font}${goto 32}${voffset -6}Up: ${upspeed ppp0}${font} ${alignr}${upspeedgraph ppp0 8,60 F57900 FCAF3E}
    ${goto 32}Total: ${totalup ppp0}
    ${voffset -2}${font VariShapes Solid:size=14}Q${font}${goto 32}${voffset -6}Down: ${downspeed ppp0}${font} ${alignr}${downspeedgraph ppp0 8,60 F57900 FCAF3E}
    ${goto 32}Total: ${totaldown ppp0}
    ${voffset -2}${font Poky:size=13}w${font}${goto 32}${voffset -4}Local IP: ${alignr}${addr ppp0}
    ${endif}${else}${voffset 4}${font PizzaDude Bullets:size=12}4${font}${goto 32}Network Unavailable${endif}${endif}
I just added two lines. The lines are self explanatory i think.
2.HDD size not right.
3.Installing something compiling the source may be troublesome specially while removing. So, i prefer to add a PPA for conky.
Code:
sudo gedit /etc/apt/sources.list.d/ conkyhardcore-ppa.list
And paste the line
Code:
deb http://ppa.launchpad.net/conkyhardcore/ppa/ubuntu maverick main #Conky Hardcore PPA
Now, update repository and you will find conky in the software center.
4. I am using Banglalink internet with my mobile phone as modem having interface ppp0. The local IP is not shown.
BIT0111-muctadir
BIT0111-muctadir
Expert
Expert

Course(s) :
  • BIT

Blood Group : B+
Posts : 233
Points : 395

Back to top Go down

Conky: Excellent System monitor for Ubuntu Empty Re: Conky: Excellent System monitor for Ubuntu

Post by BIT0112-Rokon Sat Dec 18, 2010 8:04 am

I installed it curiously many days ago. Btw it kills time while startup.
BIT0112-Rokon
BIT0112-Rokon
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : O+
Posts : 673
Points : 1269

http://blog.codexplo.org

Back to top Go down

Conky: Excellent System monitor for Ubuntu Empty Re: Conky: Excellent System monitor for Ubuntu

Post by BIT0122-Amit Sat Dec 18, 2010 10:23 am

BIT0112-Rokon wrote:I installed it curiously many days ago. Btw it kills time while startup.
That's because you kept it exactly at startup Razz I have made a script that sleeps for half minute and then initiates conky.

And everyone is happy!
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

Conky: Excellent System monitor for Ubuntu Empty Re: Conky: Excellent System monitor for Ubuntu

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum