Saturday 17 April 2010

Conky - A light weight system monitor

Right until now I was using a system monitor widget from screenlets as my system monitor. But today I discovered a pretty cool system monitor. It's really customizable, you can setit up to show just about anything you want and just the way you want it; from color, fonts, ...

Get conky from Ubuntu repository:
sudo apt-get install conky
To make conky work with compiz:
sudo gedit /etc/X11/xorg.conf
Go to this section:
Section "Module"
And add this line:
Load "dbe"

I've plain around for a while to make my conky to look just the way I wanted. I'll add the script to save you the trouble. Copy and paste the code below in a file called ".conkyrc" using gedit in your home directory (in the root of your home direcotory "~/.conkyrc").

# Conky, a system monitor, based on torsmo
# Any original code is licensed under the BSD license
# All code written is licensed under the GPL
# Please see COPYING for details
# Copyright (c) 2010, Carles Sentis
# All rights reserved.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .

double_buffer yes
alignment top_right
background no
border_width 1
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
xftfont DejaVu Sans Mono:size=12
gap_x 5
gap_y 60
minimum_size 410 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no

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

stippled_borders 0
update_interval 2.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no

${color #ddaa00}$nodename${alignr}${time %T}
${alignr}Uptime: $uptime
${color grey}Frequency (in MHz):$color $freq
${color grey}Frequency (in GHz):$color $freq_g
${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color grey}Temp: CPU $color${acpitemp}C${color grey} - Nvidia $color${nvidia temp}C
${color grey}CPU Usage:

${offset 40}CPU1${color #ddaa00} ${cpugauge cpu1 30,70}
${offset 115}${color }${cpu cpu1}
${offset 40}${color grey}${cpugraph cpu0 30,355 00000 ddaa00 -t}

${color grey}Processes:$color $processes ${color grey}Running:$color $running_processes

${offset 40}${color slate grey}Highest CPU: PID CPU%
${offset 40}${color #ddaa00} ${top name 1} ${top pid 1}${top cpu 1}
${offset 40}${color lightgrey} ${top name 2} ${top pid 2}${top cpu 2}
${offset 40}${color lightgrey} ${top name 3} ${top pid 3}${top cpu 3}
${offset 40}${color lightgrey} ${top name 4} ${top pid 4}${top cpu 4}

${offset 40}${color slate grey}Highest MEM: PID MEM%
${offset 40}${color #ddaa00} ${top_mem name 1} ${top_mem pid 1}${top_mem mem 1}
${offset 40}${color lightgrey} ${top_mem name 2} ${top_mem pid 2}${top_mem mem 2}
${offset 40}${color lightgrey} ${top_mem name 3} ${top_mem pid 3}${top_mem mem 3}
${offset 40}${color lightgrey} ${top_mem name 4} ${top_mem pid 4}${top_mem mem 4}
${color grey}File systems:

${offset 40}${color slate grey}ROOT: ${color }${fs_free /}/${fs_size /} ${fs_bar 4 /}
${offset 40}${color slate grey}HOME: ${color }${fs_free /home}/${fs_size /home} ${fs_bar 4 /home}
${color grey}Networking:

${offset 40}${color grey}Down:$color ${downspeed eth0} ${color grey}Up:$color ${upspeed eth0}
${offset 40}${downspeedgraph eth0 30,170 00000 ddaa00 -t} ${upspeedgraph eth0 30,170 00000 ddaa00 -t}
${offset 40}${color slate grey}Address: ${color }${addr eth0}
${offset 40}${color slate grey}TCP Connections: ${color }${tcp_portmon 1 65535 count}
${color grey}Other:

${offset 40}${color }Volume: $mixer%


Post a Comment