Conky configuration

doug
Sat, 22 Aug 2009 18:04:27 +0000

I spent a bit of time making a nice conky configuration for my amusement. I thought I'd share.

Preview:

The configuration:

alignment bottom_right
background no
border_width 1
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color white
double_buffer yes
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
font 6x10
gap_x 10
gap_y 30
minimum_size 330 10
net_avg_samples 2
no_buffers yes
out_to_console no
own_window no
own_window_class Conky
own_window_type normal
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer no
show_graph_scale no
show_graph_range no


TEXT
${color orange}SYSTEM ${hr 2}$color
 ${color grey}Domain: ${color white}$nodename.nullnetwork.net ${alignr}
 ${color grey}Kernel: ${color white}$sysname $kernel on $machine$color
 ${color grey}Uptime:$color $uptime
 ${color grey}Time:$color   ${execi 1 date }

${color orange}CPU ${hr 2}$color
 ${color grey}Frequency (MHz):$color $freq
 ${color grey}Frequency (GHz):$color $freq_g
 ${color grey}Load:$color            ${loadavg}
 ${color grey}Entropy: ${alignr} $color${entropy_avail}${color grey}/${color}${entropy_poolsize} ${entropy_bar 6,200}
 ${color grey}CPU: $color ${alignr} $cpu% ${cpubar 6,200}
 ${cpugraph de9e22 ffa500}
 ${color grey}Processes:$color $processes ${alignr} ${color grey}Running:$color $running_processes

 ${color grey}Name (sorted by cpu usage)       PID     CPU%     MEM%
  ${color white}${top name 1}               ${top pid 1}   ${top cpu 1}   ${top mem 1}
  ${color white}${top name 2}               ${top pid 2}   ${top cpu 2}   ${top mem 2}
  ${color white}${top name 3}               ${top pid 3}   ${top cpu 3}   ${top mem 3}
  ${color white}${top name 4}               ${top pid 4}   ${top cpu 4}   ${top mem 4}
  ${color white}${top name 5}               ${top pid 5}   ${top cpu 5}   ${top mem 5}

 ${color grey}Name (sorted by memory usage)    PID     CPU%     MEM%
  ${color white}${top_mem name 1}               ${top_mem pid 1}   ${top_mem cpu 1}   ${top_mem mem 1}
  ${color white}${top_mem name 2}               ${top_mem pid 2}   ${top_mem cpu 2}   ${top_mem mem 2}
  ${color white}${top_mem name 3}               ${top_mem pid 3}   ${top_mem cpu 3}   ${top_mem mem 3}

${color orange}MEMORY ${hr 2}$color
       ${color grey}Used     Total  Used%
 ${color grey}RAM: $color $mem   $memmax ${alignr} $memperc% ${membar 6,157}
 ${color grey}Swap:$color $swap  $swapmax ${alignr} $swapperc% ${swapbar 6,157}

${color orange}FILE SYSTEM ${hr 2}$color
 ${color grey}Name   Used%    Free$color
  Root: ${fs_used_perc /}% ${alignr}$color${fs_free /} ${fs_bar 6,200 /}$color
  Home: ${fs_used_perc /home}% ${alignr}$color${fs_free /home} ${fs_bar 6,200 /home}$color
  hdb1: ${fs_used_perc /media/hdb1}% ${alignr}$color${fs_free /media/hdb1} ${fs_bar 6,200 /media/hdb1}$color
  sda1: ${fs_used_perc /media/sda1}% ${alignr}$color${fs_free /media/sda1} ${fs_bar 6,200 /media/sda1}$color
  sdc1: ${fs_used_perc /media/sdc1}% ${alignr}$color${fs_free /media/sdc1} ${fs_bar 6,200 /media/sdc1}$color
  sdc2: ${fs_used_perc /media/sdc2}% ${alignr}$color${fs_free /media/sdc2} ${fs_bar 6,200 /media/sdc2}$color

${color orange}LOGGING ${hr 2}$color
${execi 30 dmesg | tail -n3 | fold -w55 | awk  -F: '{ print " " $0 }'}

${color orange}NETWORK (${addr eth1}) ${hr 2}$color
 ${color grey}Down:$color ${downspeed eth1} k/s ${alignr}${color grey}Up:$color ${upspeed eth1} k/s
 ${color grey}Total:$color ${totaldown eth1} ${alignr}${color grey}Total:$color ${totalup eth1}
 ${color grey}Inbound:$color ${tcp_portmon 1 32767 count} ${color grey}Outbound:$color ${tcp_portmon 32768 61000 count}${alignr}${color grey}Total:$color ${tcp_portmon 1 65535 count}
 ${downspeedgraph eth1 20 CCFF01 CCFF01 }
 ${upspeedgraph eth1 20 FF4301 FF4301 }
 ${color grey}Inbound Connection${alignr}Remote Port$color
  ${tcp_portmon 1 32767 rhost 0}${alignr}${tcp_portmon 1 32767 lservice 0}
  ${tcp_portmon 1 32767 rhost 1}${alignr}${tcp_portmon 1 32767 lservice 1}
  ${tcp_portmon 1 32767 rhost 2}${alignr}${tcp_portmon 1 32767 lservice 2}

 ${color grey}Outbound Connection${alignr}Local Port$color
  ${tcp_portmon 32768 61000 rhost 0}${alignr}${tcp_portmon 32768 61000 rservice 0}
  ${tcp_portmon 32768 61000 rhost 1}${alignr}${tcp_portmon 32768 61000 rservice 1}
  ${tcp_portmon 32768 61000 rhost 2}${alignr}${tcp_portmon 32768 61000 rservice 2}
${color orange}${hr 2}$color