Monitorizando el sistema mediante Conky
Conky is a free, light-weight system monitor for X, that displays any information on your desktop. Conky is licensed under the GPL and runs on Linux and BSD.
Instalamos Conky desde los repositorios y creamos los siguientes archivos:
~/.conky/conky.conf
#!/usr/bin/conky -d -c
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
alignment top_right
gap_x 10
gap_y 50
background yes
draw_borders no
border_width 2
border_inner_margin 0
border_outer_margin 0
use_xft yes
xftalpha 0.75
xftfont Droid Sans:size=8
color0 FFFFFF # white
color7 FFFFFF # COOL
color8 FFFF00 # WARM
color9 FCCCCC # HOT
cpu_avg_samples 2
default_color FFFFFF
default_outline_color 000000
default_shade_color 000000
draw_graph_borders yes
draw_outline no
draw_shades no
max_specials 1024
max_user_text 4000
minimum_size 300
maximum_width 300
net_avg_samples 2
no_buffers yes
override_utf8_locale yes
pad_percents 2
short_units yes
stippled_borders 0
text_buffer_size 8000
total_run_times 0
uppercase no
use_spacer right
update_interval 1.0
TEXT
${alignc}${time %c}
${pre_exec lsb_release -i | cut -f 2} ${pre_exec lsb_release -r | cut -f 2}${alignc}$kernel${alignr}$machine
${color0}${stippled_hr 1}${color}
${alignc}${pre_exec cat /proc/cpuinfo | grep 'model name' | head -n1 | sed -e 's/model name.*: //'}
${cpubar}
Core 0${goto 50}${cpu cpu1}%${goto 100}${freq_g cpu1}Ghz${alignr}${execpi 10 sensors | grep 'temp1' | paste -s | sed 's/°/\n/' | head -n1 | cut -c15-16 | xargs ~/.conky/scripts/colorize.sh}.0°C${color}
Core 1${goto 50}${cpu cpu2}%${goto 100}${freq_g cpu2}Ghz${alignr}${execpi 10 sensors | grep 'fan1' | paste -s | sed 's/RPM/\n/' | head -n1 | cut -c13-16} RPM
RAM${goto 50}$memmax${goto 100}$memfree${goto 140}${membar}
SWAP${goto 50}$swapmax${goto 100}$swapfree${goto 140}${swapbar}
PROC${goto 50}$processes${goto 100}$running_processes${alignr}$uptime
ROOT${goto 50}${fs_size /}${goto 100}${fs_free /}${goto 140}${fs_bar /}
HOME${goto 50}${fs_size /home}${goto 100}${fs_free /home}${goto 140}${fs_bar /home}
DISK IO${goto 50}${diskio}
${diskiograph 000000 FFFFFF}
WAN IP${goto 50}${execi 60 wget http://checkip.dyndns.org/ -q -O - | grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'}
${if_existing /proc/net/route eth0}eth0 IP${goto 50}${addr eth0}
${goto 5}${downspeed eth0}${goto 160}${upspeed eth0}
${downspeedgraph eth0 25,145 000000 FFFFFF}${alignr}${upspeedgraph eth0 25,145 000000 FFFFFF}
${goto 5}${totaldown eth0}${goto 160}${totalup eth0}
${endif}${if_existing /proc/net/route ra0}ra0 IP${goto 50}${addr ra0}
${goto 5}${downspeed ra0}${goto 160}${upspeed ra0}
${downspeedgraph ra0 25,145 000000 FFFFFF}${alignr}${upspeedgraph ra0 25,145 000000 FFFFFF}
${goto 5}${totaldown ra0}${goto 160}${totalup ra0}
${endif}
user@localhost${goto 100}${mails /var/spool/mail/user}
y ~/.conky/scripts/colorize.sh
#!/bin/bash
COOL=40
WARM=75
if [[ $1 -lt $COOL ]]; then
echo "\${color7}"$1 # COOL
elif [[ $1 -gt $WARM ]]; then
echo "\${color9}"$1 # HOT
else
echo "\${color8}"$1 # WARM
fi
exit 0
Para que se ejecute en cada inicio, añadiremos sh -c "sleep 10 && conky -c ~/.conky/conky.conf" en Sistema → Preferencias → Aplicaciones al inicio.
Comentarios
Enviar un comentario nuevo