Sunday, July 15, 2007

My .conkyrc File

A lot of people have been asking me about my system monitor in the upper right hand corner of my 1501 desktop, it's called Conky.

conky

Conky is a system monitor software for the X Window System. It is able to monitor almost all systems variables including CPU, memory, swap, disk space, temperature, top, upload, download, system messages, and much more. It is extremely configurable, however the configuration can be a little hard to understand. To learn more vist the Conky website

To get conky in a terminal type:
sudo apt-get install conky

If you need help or just want to see mine .conkyrc file:
you can find your .conkyrc once installed in your home folder, once you enable show hidden files under View>Show Hidden Files. Ctrl+H is the shortcut

# THIS CONFIG RELIES ON 2 SCRIPTS, CPUSPEED AND CPUTEMP
# YOUR SYSTEM MAY NOT REQUIRE THEM, REPLACE AS DESIRED

# maintain spacing between certain elements
use_spacer yes

# set to yes if you want tormo to be forked in the background
background no

use_xft yes

# Xft font when Xft is enabled
xftfont Bitstream Vera Sans Mono-7
#xftfont Andale Mono-9
#xftfont Clean-8
#xftfont cubicfive10:pixelsize=8
#xftfont squaredance10:pixelsize=14
#xftfont swf!t_v02:pixelsize=10

# Text alpha when using Xft
xftalpha 1
mail_spool $MAIL

# Update interval in seconds
update_interval 4.0

# Create own window instead of using desktop (required in nautilus)
own_window no

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

# Minimum size of text area
minimum_size 280 5

# Draw shades?
draw_shades yes

# Draw outlines?
draw_outline no # amplifies text

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_margin 9

# border width
border_width 1

# Default colors and also border colors, grey90 == #e5e5e5
default_color grey90
default_shade_color black
default_outline_color DarkGrey

# 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 24
gap_y 24

# Subtract file system buffers from used memory?
no_buffers yes

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

# stuff after 'TEXT' will be formatted on screen

TEXT


${color #EFEBE7}CPU: $freq_g${execi 5 cpuspeed}MHz $cpu%$color
${color #EFEBE7}$cpubar
${color #EFEBE7}NAME PID CPU% MEM%
${color #EFEBE7}${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color #EFEBE7}${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color #EFEBE7}${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color #EFEBE7}${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}

${color #EFEBE7}RAM: $memmax $memperc% $color
${color #EFEBE7}${membar 6}${color}
${color #EFEBE7}NAME PID CPU% MEM%
${color #EFEBE7}${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color #EFEBE7}${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color #EFEBE7}${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${color #EFEBE7}${top_mem name 4} ${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4}

${color #EFEBE7}Upload: ${upspeed eth1}kb/s Download: ${downspeed eth1}kb/s
$color


edited by pHreaksYcle

3 comments:

Kartofel said...

Hi Red!

I have taken so much from your blog, so why can't I contribute something too? :)
Here is my conkyrc file with some more features added. If you find it interesting, feel free to publish it.
BTW I've removed some stuff as they needed external scripts to be written (gmail checker, CPU temp sensors etc.)
Now it's copy, paste and go. Only thing needing to be changed is hdd space monitoring, but I think anybody can handle it :)

Here it goes...

background yes

#prawy dolny rog
gap_x 1050
gap_y 50

maximum_width 210

# X font when Xft is disabled, you can pick one with program xfontsel
#font -*-*-*-r-normal--14-*-*-*-c-*-iso8859-2
font -xos4-terminus-*-r-normal-*-12-100-*-*-c-*-iso10646-1

# Use Xft?
use_xft yes

#xftfont Bitstream Vera Sans Mono:size=8
xftfont Terminus:encoding=utf-8:size=9
xftalpha 0.9

update_interval 1.0

total_run_times 0

own_window yes
#own_window_type override
#own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes

# If own_window_transparent is set to no, you can set the background colour here
own_window_colour hotpink

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
draw_shades yes
draw_outline no
draw_borders no
stippled_borders 8
border_margin 4
border_width 1

default_color white
default_shade_color black
default_outline_color white

alignment top_left
no_buffers yes
uppercase no

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale no

use_spacer yes

TEXT
${color #ddaa00}${font Terminus:encoding=iso8859-2:size=15}System Monitoring
${font :encoding=iso8859-2:size=9}$alignr${color #ddaa00}Conky
${color slate grey}Kernel:
$alignc${color }$kernel
${color slate grey}UpTime:
$alignc${color }$uptime

${color }${color slate grey}CPU: $color%${color #ddaa00}$cpu$alignr$color$running_processes/ $processes
${color slate grey}${cpugraph 20,200 000000 ffffff}
${font :size=8}${color #ddaa00}${top name 1}$alignr${top cpu 1}
${color lightgrey}${top name 2}$alignr${top cpu 2}
${color lightgrey}${top name 3}$alignr${top cpu 3}
${color lightgrey}${top name 4}$alignr${top cpu 4}
${font :size=9}
${color slate grey}RAM: $color%$memperc ${alignr}$mem
${membar 5,200}
${color slate grey}SWAP: $color%$swapperc ${alignr}$swap
${swapbar 5,200}
${font :size=8}${color #ddaa00}${top_mem name 1}$alignr${top_mem mem 1}
${color lightgrey}${top_mem name 2}$alignr${top_mem mem 2}
${color lightgrey}${top_mem name 3}$alignr${top_mem mem 3}
${color lightgrey}${top_mem name 4}$alignr${top_mem mem 4}${font :size=9}
${color slate grey}HDD: $color$alignr$diskio
${color slate grey}${diskiograph 20,200 000000 ff0000}
${color slate grey} Root:${alignr}${color }${fs_free /}
${fs_bar 5,200 /}
${color slate grey} Sda3:${alignr}${color }${fs_free /media/sda3}
${fs_bar 5,200 /media/sda3}
${color slate grey} Sda5:${alignr}${color }${fs_free /media/sda5}
${fs_bar 5,200 /media/sda5}
${color slate grey}INTERNET:
${color}Download:${color #ddaa00}${downspeed eth1}${color}KB/s${color}${alignr} Total:${color #ddaa00}${totaldown eth1}
${color}Upload:${color #ddaa00}${offset 17}${upspeed eth1}${color} KB/s${color} Total:${alignr}${color #ddaa00}${totalup eth1}
${color slate grey}${downspeedgraph eth1 15,200 000000 00ff00}
${color slate grey}${upspeedgraph eth1 15,200 000000 0000ff}

${color #0077ff}Connections
$color Outbound: ${tcp_portmon 32768 61000 count}$color Inbound: ${tcp_portmon 1 32767 count}
${color #0077ff}Outbound Connections ${alignr} Port${color }${font :encoding=iso8859-2:size=6}
${tcp_portmon 32768 61000 rip 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0}
${tcp_portmon 32768 61000 rip 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1}
${tcp_portmon 32768 61000 rip 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2}
${tcp_portmon 32768 61000 rip 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3}
${tcp_portmon 32768 61000 rip 4} ${alignr} ${tcp_portmon 32768 61000 rservice 4}
${tcp_portmon 32768 61000 rip 4} ${alignr} ${tcp_portmon 32768 61000 rservice 5}
${tcp_portmon 32768 61000 rip 4} ${alignr} ${tcp_portmon 32768 61000 rservice 6}
${tcp_portmon 32768 61000 rip 4} ${alignr} ${tcp_portmon 32768 61000 rservice 7}
${tcp_portmon 32768 61000 rip 4} ${alignr} ${tcp_portmon 32768 61000 rservice 8}
${tcp_portmon 32768 61000 rip 4} ${alignr} ${tcp_portmon 32768 61000 rservice 9}
${tcp_portmon 32768 61000 rip 4} ${alignr} ${tcp_portmon 32768 61000 rservice 10}

c0ld said...

Any links for cpuspeed and cputemp?

Igor said...

My .conkyrc especially for Dell Inpiron 1501.
I'm using ADSL, so ppp0 interface is included :)

# THIS CONFIG RELIES ON 2 SCRIPTS, CPUSPEED AND CPUTEMP
# YOUR SYSTEM MAY NOT REQUIRE THEM, REPLACE AS DESIRED

# maintain spacing between certain elements
use_spacer no

# set to yes if you want tormo to be forked in the background
background no

use_xft yes

# Xft font when Xft is enabled
xftfont Bitstream Vera Sans Mono-7
#xftfont Andale Mono-9
#xftfont Clean-8
#xftfont cubicfive10:pixelsize=8
#xftfont squaredance10:pixelsize=14
#xftfont swf!t_v02:pixelsize=10

# Text alpha when using Xft
xftalpha 1
mail_spool $MAIL

# Update interval in seconds
update_interval 1.0

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

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

# Minimum size of text area
#minimum_size 280 5

# Draw shades?
draw_shades yes

# Draw outlines?
draw_outline no # amplifies text

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 10

# border margins
border_margin 4

# border width
border_width 1

# Default colors and also border colors, grey90 == #e5e5e5
default_color grey90
default_shade_color black
default_outline_color DarkGrey

# 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 20
gap_y 30

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no
# Possible variables to be used:
#
# Variable Arguments Description
# acpiacadapter ACPI ac adapter state.
# acpifan ACPI fan state
# acpitemp ACPI temperature.
# adt746xcpu CPU temperature from therm_adt746x
# adt746xfan Fan speed from therm_adt746x
# battery (num) Remaining capasity in ACPI or APM
# battery. ACPI battery number can be
# given as argument (default is BAT0).
# buffers Amount of memory buffered
# cached Amount of memory cached
# color (color) Change drawing color to color
# cpu CPU usage in percents
# cpubar (height) Bar that shows CPU usage, height is
# bar's height in pixels
# downspeed net Download speed in kilobytes
# downspeedf net Download speed in kilobytes with one
# decimal
# exec shell command Executes a shell command and displays
# the output in torsmo. warning: this
# takes a lot more resources than other
# variables. I'd recommend coding wanted
# behaviour in C and posting a patch :-).
# execi interval, shell Same as exec but with specific interval.
# command Interval can't be less than
# update_interval in configuration.
# fs_bar (height), (fs) Bar that shows how much space is used on
# a file system. height is the height in
# pixels. fs is any file on that file
# system.
# fs_free (fs) Free space on a file system available
# for users.
# fs_free_perc (fs) Free percentage of space on a file
# system available for users.
# fs_size (fs) File system size
# fs_used (fs) File system used space
# hr (height) Horizontal line, height is the height in
# pixels
# i2c (dev), type, n I2C sensor from sysfs (Linux 2.6). dev
# may be omitted if you have only one I2C
# device. type is either in (or vol)
# meaning voltage, fan meaning fan or temp
# meaning temperature. n is number of the
# sensor. See /sys/bus/i2c/devices/ on
# your local computer.
# kernel Kernel version
# loadavg (1), (2), (3) System load average, 1 is for past 1
# minute, 2 for past 5 minutes and 3 for
# past 15 minutes.
# machine Machine, i686 for example
# mails Mail count in mail spool. You can use
# program like fetchmail to get mails from
# some server using your favourite
# protocol. See also new_mails.
# mem Amount of memory in use
# membar (height) Bar that shows amount of memory in use
# memmax Total amount of memory
# memperc Percentage of memory in use
# new_mails Unread mail count in mail spool.
# nodename Hostname
# outlinecolor (color) Change outline color
# pre_exec shell command Executes a shell command one time before
# torsmo displays anything and puts output
# as text.
# processes Total processes (sleeping and running)
# running_processes Running processes (not sleeping),
# requires Linux 2.6
# shadecolor (color) Change shading color
# stippled_hr (space), Stippled (dashed) horizontal line
# (height)
# swapbar (height) Bar that shows amount of swap in use
# swap Amount of swap in use
# swapmax Total amount of swap
# swapperc Percentage of swap in use
# sysname System name, Linux for example
# time (format) Local time, see man strftime to get more
# information about format
# totaldown net Total download, overflows at 4 GB on
# Linux with 32-bit arch and there doesn't
# seem to be a way to know how many times
# it has already done that before torsmo
# has started.
# totalup net Total upload, this one too, may overflow
# updates Number of updates (for debugging)
# upspeed net Upload speed in kilobytes
# upspeedf net Upload speed in kilobytes with one
# decimal
# uptime Uptime
# uptime_short Uptime in a shorter format
#
# seti_prog Seti@home current progress
# seti_progbar (height) Seti@home current progress bar
# seti_credit Seti@hoome total user credit


# variable is given either in format $variable or in ${variable}. Latter
# allows characters right after the variable and must be used in network
# stuff because of an argument
#${font Dungeon:style=Bold:pixelsize=10}I can change the font as well
#${font Verdana:size=10}as many times as I choose
#${font Perry:size=10}Including UTF-8,
#${font Luxi Mono:size=10}justo como este texto que o google traduz fêz o português

# stuff after 'TEXT' will be formatted on screen

TEXT
${color #EFEBE7} CPU:$cpu% usage ${cpubar}
$hr 1
${color #EFEBE7} NAME PID CPU% MEM%
${color #EFEBE7} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color #EFEBE7} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color #EFEBE7} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color #EFEBE7} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
$hr 1
${color #EFEBE7} RAM Total: $memmax Used: $mem ($memperc%) + $cached
${membar} $color
${color #EFEBE7} SWAP Total: $swapmax Used: $swap ($swapperc%)
${swapbar} $color
Processes:$processes Running:$running_processes
$hr 1
${color #EFEBE7} NAME PID CPU% MEM%
${color #EFEBE7} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color #EFEBE7} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color #EFEBE7} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${color #EFEBE7} ${top_mem name 4} ${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4}
$hr 1
Home: ${font}${fs_free /home} of ${fs_size /home} (${fs_free_perc /home}% free)
${fs_bar /home}
$hr 1
${color #EFEBE7} eth0 (Ethernet) statistics
${downspeedgraph eth0 20,80 white white}
${voffset -27} ${color #EFEBE7} IP: ${addr eth0}
${color #EFEBE7} ppp0 (ADSL) IP: ${addr ppp0}
${upspeedgraph eth0 20,80 white white}
${voffset -27} ${color #EFEBE7} Download: ${downspeedf eth0}kB/s
${color #EFEBE7} Upload: ${upspeedf eth0}kB/s
$hr 1
${downspeedgraph eth1 20,80 white white}
${voffset -26} ${color #EFEBE7} eth1 (Wireless) statistics
${color #EFEBE7} IP: ${addr eth1}
${upspeedgraph eth1 20,80 white white}
${voffset -26} ${color #EFEBE7} Download: ${downspeedf eth1}kB/s
${color #EFEBE7} Upload: ${upspeedf eth1}kB/s
Signal power: ${wireless_link_bar eth1}
$hr 1
${color #EFEBE7} System uptime: $uptime
${color #EFEBE7} Battery :${battery BAT1} ${battery_bar BAT1}
$color