Monitoreando el sistema con Conky

Conky es un sistema para monitorear el sistema muy ligero, consume pocos recursos, ademas que se
puede personalizar al gusto, incluye transparencias, fuentes, barras, colores, y se puede hacer uso de scripts para alguna funcion en particular.

La forma de instalacion es muy sencilla:

Bajar el codigo fuente de la pagina oficial de conky y descomprimir:
$ tar -xzvf conky-1.4.2.tar.gz

Y se compila de la manera tradicional:
$cd conky-1.4.2
$./configure
$make
#make install

Necesitaremos un archivo .conkyrc en nuestro /home/usuario para hacer las configuraciones, este es el que uso:

#.conkyrc
# set to yes if you want Conky to be forked in the background
background yes

cpu_avg_samples 2
net_avg_samples 2

out_to_console no

# X font when Xft is disabled, you can pick one with program xfontsel
#font 7×9
#font 6×10
#font 7×13
#font 8×13
#font 7×12
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
#font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
xftfont monospace-8

own_window_transparent yes
#own_window_colour black

# Text alpha when using Xft
xftalpha 0.8

on_bottom yes

# mail spool
mail_spool $MAIL

# Update interval in seconds
update_interval 1

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

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

# Minimum size of text area
minimum_size 5 5
maximum_width 290

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_margin 10

# border width
border_width 2

# Default colors and also border colors
default_color white
default_shade_color white
default_outline_color white

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

# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer yes

# Subtract file system buffers from used memory?
no_buffers yes

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

#xmms_player infopipe
# boinc (seti) dir
# seti_dir /opt/seti

xmms_player infopipe # (requiere xmms-infopipe)

TEXT
$alignc $nodename – $sysname $kernel – $freq Mhz
$alignc ip:
${addr eth0}
$alignc wireless: ${addr ath0}
$alignc Uptime: $uptime | ${color white}load: ( ${color white}$loadavg ${color white})
CPU:${color white}${color white} ${cpu}% ${cpubar}
${color white}RAM: $memperc% ${membar}
$alignc ${color white}procesos: ${color white}$processes ${color white}corriendo: ${color white}$running_processes ${color white}

${color lightgrey}File systems:
/ $color${fs_used /}/${fs_size /} ${fs_bar /}
/home $color${fs_used /home}/${fs_size /home} ${fs_bar /home}

$stippled_hr
${color white}eth0 ${downspeedf eth0}${color white}k/s down ${color white}${upspeedf eth0}${color white}k/s up
${color white}${downspeedgraph eth0 25,120 ff0000 0000ff} ${color white}${upspeedgraph eth0 25,120 0000ff ff0000}
${color white}Trafico total: ${color white}${totaldown eth0} ${color white}Trafico total: ${color white}${totalup eth0}
${color white}ath0 ${downspeedf ath0}${color white}k/s down ${color white}${upspeedf ath0}${color white}k/s up
${color white}${downspeedgraph ath0 25,120 ff0000 0000ff} ${color white}${upspeedgraph ath0 25,120 0000ff ff0000}
${color white}Trafico total: ${color white}${totaldown ath0} ${color white}Trafico total: ${color white}${totalup ath0}

${color #ffccaa}Uso del Procesador y memoria
${color white}Nombre PID CPU% MEM%
${color #ddaa00} ${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}
$stippled_hr

${font Bitstream Vera Sans:size=9}${alignc} ${color #ccccee} XMMS: ${color #88ff88}$xmms_status
${font Bitstream Vera Sans:size=9}${color} ${alignc} $xmms_title
${font Bitstream Vera Sans:size=9}${color} ${alignc} $xmms_filename}
${font Bitstream Vera Sans:size=9}${color} ${alignc} $xmms_position ${font Bitstream Vera Sans:size=9}${color} ${alignc} $xmms_playlist_position/$xmms_playlist_length
${font Bitstream Vera Sans:size=9}${color}${alignc} Volume: $mpd_vol Bitrate: $xmms_bitrate kbps
${color #ccddff} $xmms_bar $color

$alignc ${color white}${execi 1800 /home/alex/scripts/weather/weather.sh}

Para que funcione correctamente esta configuracion necesitaras del plugin Info pipe para XMMS, despues de bajar y compilar (manera tradicional) lo habilitamos en XMMS > Options > Preferences > General Pluggins > InfoPipe > Enable Pluggin

Tambien ocuparemos un script para que nos muestre el clima:
Este es: Script Weather, y modificamos el script weather.sh

#Este es el ID de Tijuana, puedes buscar el tuyo en http://xoap.weather.com
LOCID=MXBC0005

#Y este es el path donde esta el script, en mi caso
RUNDIR=/home/alex/scripts/weather

Ya con esto podemos hechar a andar Conky:
$ conky &

Y tendremos esto:

Conky

0 thoughts on “Monitoreando el sistema con Conky

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.