Web Projects Consulting

conky: Top Processes and Memory Usage

Another part of the conkyatlogin script is displaying top processes and top memory usage. 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/host.conky
chmod a+x ~/bin/conky/host.conky
gedit ~/bin/conky/host.conky

Copy and paste (watch for changing the path /home/USER/PATH-TO-LOGO/):

host.conky

alignment bottom_left
gap_x 10
gap_y 20
minimum_size 250
maximum_width 250

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
${image /home/USER/PATH-TO-LOGO/fedoralogo-small.png -p 0,18 -s 40×40}
${goto 62}${color #333333}${font Tahoma:size=24:bold}FEDORA 13$font
${goto 62}${nodename}
${color 012f69}${hr 1}
${goto 10}${color #444444}Kernel${color #888888}$alignr $kernel
${goto 10}${color #444444}Uptime${color #888888}$alignr $uptime
${color #444444}Procs: ${alignr}${color #888888}$processes
${color #444444}Run: ${alignr 6}${color #888888}$running_processes
${color #888888}TOP PROCESSOR USAGE ${hr 2}
${color #333333}NAME PID CPU MEM
${color white}1. ${top name 1}${top pid 1} ${top cpu 1} ${top mem 1}
${color #EEEEEE}2. ${top name 2}${top pid 2} ${top cpu 2} ${top mem 2}
${color #CCCCCC}3. ${top name 3}${top pid 3} ${top cpu 3} ${top mem 3}
${color #AAAAAA}4. ${top name 4}${top pid 4} ${top cpu 4} ${top mem 4}
${color #888888}5. ${top name 5}${top pid 5} ${top cpu 5} ${top mem 5}
${color #666666}6. ${top name 6}${top pid 6} ${top cpu 6} ${top mem 6}
${color #444444}7. ${top name 7}${top pid 7} ${top cpu 7} ${top mem 7}
${color #222222}8. ${top name 8}${top pid 8} ${top cpu 8} ${top mem 8}
${color #888888}TOP MEMORY USAGE ${hr 2}
${color #333333}NAME PID CPU MEM
${color white}1. ${top_mem name 1}${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color #EEEEEE}2. ${top_mem name 2}${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color #CCCCCC}3. ${top_mem name 3}${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${color #AAAAAA}4. ${top_mem name 4}${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4}
${color #888888}5. ${top_mem name 5}${top_mem pid 5} ${top_mem cpu 5} ${top_mem mem 5}
${color #666666}6. ${top_mem name 6}${top_mem pid 6} ${top_mem cpu 6} ${top_mem mem 6}
${color #444444}7. ${top_mem name 7}${top_mem pid 7} ${top_mem cpu 7} ${top_mem mem 7}
${color #222222}8. ${top_mem name 8}${top_mem pid 8} ${top_mem cpu 8} ${top_mem mem 8}

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.