Web Projects Consulting

conky: CPU, Network and Resources Monitor

Configuring conky is fun, now it is time to tune up system properties, CPU, GPU, RAM, SWAP, disk IO, temperatures, processor and system load. You should have probably read my previous article on building an rpm with nvidia and images support and the article about loading conky at GNOME startup.


Create the script which is called from the conkyatlogin launcher.

touch ~/bin/conky/cpu.conky
chmod a+x ~/bin/conky/cpu.conky
gedit ~/bin/conky/cpu.conky

Copy and paste:

cpu.conky

alignment top_right
gap_x 10
gap_y 20
minimum_size 285
maximum_width 285

use_xft yes
override_utf8_locale yes
xftfont DejaVu Sans Mono:size=7
xftalpha 0.1

background yes
double_buffer yes
own_window yes
own_window_class Conky
own_window_argb_visual yes
#own_window_argb_value 255
own_window_transparent yes
#own_window_colour black
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

top_cpu_separate no
cpu_avg_samples 2
net_avg_samples 2
update_interval 2.0
update_interval_on_battery 2.0

draw_borders no
border_width 0
border_inner_margin 12
border_outer_margin 0
#pad_percents 20
#stippled_borders 0

draw_graph_borders yes
draw_outline no
draw_shades no
#default_bar_size 8 16
default_color #FFFFFF
default_gauge_size 30 30
default_graph_size 0 30
#default_outline_color white
#default_shade_color #888888
#extra_newline no
format_human_readable yes
short_units no
#no_buffers yes
#show_graph_scale no
#show_graph_range no
#out_to_console no
#out_to_stderr no
#use_spacer none
#uppercase no

TEXT
${color #888888}CPU ${hr 2}
${color #CCCCCC}${execi 99999 cat /proc/cpuinfo | grep “model name” -m1 | cut -d”:” -f2 | cut -d” ” -f2-}
${color #666666}SYSTEM LOAD ${hr 2}
${color #444444}${loadgraph 8,285 111111 00316E -t -l}
${color #666666}Processor 1 … ${color #FFFFFF}${cpu cpu1}%${alignr}${color #666666}Processor 2 … ${color #FFFFFF}${cpu cpu2}%
${color #222222}${cpubar cpu1 4,140} ${color #222222}${cpubar cpu2 4,140}
${color #888888}${execi 9999 cat /proc/driver/nvidia/cards/0 | grep -i model | cut -c11-30} ${hr 2}
${color #444444}GPU: ${color #888888}${nvidia gpufreq}MHz ${alignr}${color #444444}MEM: ${color #888888}${nvidia memfreq}MHz
${color #888888}RAM: $memmax | SWAP $swapmax ${hr 2}$color
${color #555555}RAM ${color #FFFFFF}$memperc% $alignr${color #444444}${membar 4,210}
${color #555555}Swap ${color #FFFFFF}$swapperc% $alignr${color #444444}${swapbar 4,210}
${color #888888}Disk I/O ${diskio} ${hr 2}$color
${color #666666}Read $alignr${color #444444}${diskiograph_read 8,245 111111 00316E -t -l}
${color #666666}Write $alignr${color #444444}${diskiograph_write 8,245 111111 00316E -t -l}
${color #888888}TEMPERATURES ${hr 2}
${color #444444}Processor 1: ${color #888888}${execi 20 sensors |grep ‘Core 0:’ | cut -d” ” -f8} ${color #444444}${alignr}HDD /dev/sda: ${color #888888}+${execi 8 hddtemp /dev/sda |cut -c24-27}
${color #444444}Processor 2: ${color #888888}${execi 20 sensors |grep ‘Core 1:’ | cut -d” ” -f8} ${color #444444}${alignr}HDD /dev/sdb: ${color #888888}+${execi 8 hddtemp /dev/sdb |cut -c24-27}
${color #444444}ACPI: ${color #888888}${execi 1 sensors | grep ‘temp1’ | cut -c14-20} ${alignr}${color #444444}GPU: ${color #888888}+${nvidia temp}°C
${if_up wlan0}${color #888888}WLAN ${hr 2}
${color #444444}Download: ${alignr}${color #FFFFFF}${downspeed wlan0}/s
${color #444444}${downspeedgraph wlan0 10,285 111111 00316E -t -l}
${color #444444}Upload: ${alignr}${color #FFFFFF}${upspeed wlan0}/s
${color #444444}${upspeedgraph wlan0 10,285 111111 00316E -t -l}${endif}

The result is below:

conky, Fedora 13, multiple=

To be continued.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.