Monitor del sistema: Conky – Instalación y Configuracion

closeHola! hace 7 years 15 days que escribí esta entrada, puede que esta información ya no sea valida en la actualidad, por favor se comprensivo conmigo cuando comentes 🙂

Conky es un monitor ligero de nuestro sistema, es altamente configurable a nuestras necesidades.

  • Instalación

sudo apt-get install conky

  • Configuración

gedit ~/.conkyrc

Luego remplazamos el contenido por nuestro archivo por el siguiente contenido

# UBUNTU-CONKY
# jodacame (http://jodacame.com)
 
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type overide
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
background no #Transparent background.
 
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
 
# fiddle with window
use_spacer right
use_xft yes
 
# Update interval in seconds
update_interval .5
 
# Minimum size of text area
minimum_size 260 5
 
# Draw shades?
draw_shades no
 
# Draw borders around graphs
draw_graph_borders no
 
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
xftfont Eurostile:size=10
xftalpha 0.7
#font arial
uppercase no # set to yes if you want all text to be in uppercase
 
# Stippled borders?
stippled_borders 3
 
# border margins
border_margin 9
 
# border width
border_width 10
 
# Default colors and also border colors, grey90 == #e5e5e5
default_color grey
 
own_window_colour black
own_window_transparent yes
 
# 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 40
 
# stuff after 'TEXT' will be formatted on screen
 
TEXT
 
${font arial black:size=12}${color #7FCF5D}SISTEMA${color}${font arial black:size=11} ${color #7FCF5D} ${hr 2}$color$font
${color #7FCF5D}${font openlogos:size=30} $color${font}
${voffset -38}${goto 50}$sysname  $kernel on $machine${voffset -18}
${voffset 16}${goto 50}$nodename  ${font arial black:size=9}UP TIME: $font$uptime ${voffset -18}
${voffset 6}${font arial black:size=30}${time %e}$font ${voffset -17}${time %A, }${time %B} ${time %G}
${voffset -2}${goto 65}${font arial black:size=10} ${time %I:%M:%S %p}
Ahora agregamos las siguientes lineas dependiendo de nuestra configuración de hardware
Monitor procesadores

Cabecera

${font arial black:size=12}${color #7FCF5D}CPU${color}${font arial black:size=11} ${color #7FCF5D}

Procesadores

${font arial black:size=9}
${color lightgray}
${alignc} ${freq}MHz / ${acpitemp}C ${alignr}(${cpu cpu0}%)
${color #7FCF5D}CPU 0  ${color lightgray}${cpubar cpu0}$color
${alignc} ${freq}MHz / ${acpitemp}C ${alignr}(${cpu cpu1}%)
${color #7FCF5D}CPU 1  ${color lightgray}${cpubar cpu1}$color
Si tenemos mas procesadores copiamos nuevamente la linea y remplazamos el “0” por el procesador que queremos.

Monitor de Memoria

${font arial black:size=12}${color #7FCF5D}MEMORIA${color}${font arial black:size=11} ${color #7FCF5D} ${hr 2}$color$font
${font arial black:size=9}RAM: $font$memperc% ${alignr}$mem ${font arial black:size=9}/ $font$memmax
${membar 4}
${font arial black:size=9}SWAP: $font$swapperc% ${alignr}$swap ${font arial black:size=9}/ $font$swapmax
${swapbar 4}
Monitor de Discos
(Cabecera)

${font arial black:size=12}${color #7FCF5D}DISCOS${color}${font arial black:size=11} ${color #7FCF5D} ${hr 2}$color$font
${font arial black:size=9}VOLUMEN${goto 116}TIPO${goto 180}%LIBRE${alignr 1}TAMAÑO$font
Discos (Particiones)

#Particion0
${font arial black:size=9}ROOT:$font${goto 120}${fs_type /}${goto 190}${fs_free_perc /}%${alignr}${fs_size /}
${fs_bar 4 /}$color
#Particion1
${if_mounted /media/Oficina}${font arial black:size=9}OFICINA:$font${goto 120}${fs_type /media/Oficina}${goto 190}${fs_free_perc /media/Oficina}%${alignr 1}${fs_size /media/Oficina}
${fs_bar 4 /media/Oficina}$color $endif
Si tenemos mas particiones podemos agregarlas solo es copiar y pegar las lineas y luego cambiar la ruta de la particion
Monitor de Red

${font arial black:size=12}${color #7FCF5D}RED${color}${font arial black:size=11} ${color #7FCF5D} ${hr 2}$color$font
${font arial black:size=9}LOCAL:$font${addr eth0} $alignr ${color} ${font arial black:size=9}IP:$font${execi 14400 wget -O - http://whatismyip.org/ | tail}${color}
${font arial black:size=9}DOWN: $font$color${downspeed eth0} k/s ${alignr}${font arial black:size=9}UP: $font${upspeed eth0} k/s
${downspeedgraph eth0 25,140 303030 C0C0C0} ${alignr}${upspeedgraph eth0
25,140 303030 C0C0C0}$color
${font arial black:size=9}TOTAL: $font${totaldown eth0} ${alignr}${font arial black:size=9}TOTAL: $font${totalup eth0}
${font arial black:size=9}INBOUND: $font${tcp_portmon 1 32767 count} ${font arial black:size=9}OUTBOUND: $font${tcp_portmon 32768
61000 count}${alignr}${font arial black:size=9}TOTAL: $font${tcp_portmon 1 65535 count}
${color #7FCF5D}${hr 2}$color
Si unimos todo lo anterior debe quedar un archivo parecido a este
# UBUNTU-CONKY
# jodacame (http://jodacame.com)
 
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type overide
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
background no #Transparent background.
 
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
 
# fiddle with window
use_spacer right
use_xft yes
 
# Update interval in seconds
update_interval .5
 
# Minimum size of text area
minimum_size 260 5
 
# Draw shades?
draw_shades no
 
# Draw borders around graphs
draw_graph_borders no
 
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
xftfont Eurostile:size=10
xftalpha 0.7
#font arial
uppercase no # set to yes if you want all text to be in uppercase
 
# Stippled borders?
stippled_borders 3
 
# border margins
border_margin 9
 
# border width
border_width 10
 
# Default colors and also border colors, grey90 == #e5e5e5
default_color grey
 
own_window_colour black
own_window_transparent yes
 
# 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 40
 
# stuff after 'TEXT' will be formatted on screen
 
TEXT
 
${font arial black:size=12}${color #7FCF5D}SISTEMA${color}${font arial black:size=11} ${color #7FCF5D} ${hr 2}$color$font
${color #7FCF5D}${font openlogos:size=30} $color${font}
${voffset -38}${goto 50}$sysname  $kernel on $machine${voffset -18}
${voffset 16}${goto 50}$nodename  ${font arial black:size=9}UP TIME: $font$uptime ${voffset -18}
${voffset 6}${font arial black:size=30}${time %e}$font ${voffset -17}${time %A, }${time %B} ${time %G}
${voffset -2}${goto 65}${font arial black:size=10} ${time %I:%M:%S %p}
${font arial black:size=12}${color #7FCF5D}CPU${color}${font arial black:size=11} ${color #7FCF5D}
#${font arial black:size=9}USO CPU (AVG): $font${cpu cpu0}%
#${cpugraph cpu0 7FCF5D C0C0C0}
#${cpugraph cpu1 7FCF5D C0C0C0}
#${cpugraph cpu2 7FCF5D C0C0C0}
${font arial black:size=9}
${color lightgray}
${alignc} ${freq}MHz / ${acpitemp}C ${alignr}(${cpu cpu1}%)
${color #7FCF5D}CPU 1  ${color lightgray}${cpubar cpu1}$color
${alignc} ${freq}MHz / ${acpitemp}C ${alignr}(${cpu cpu2}%)
${color #7FCF5D}CPU 2  ${color lightgray}${cpubar cpu2}$color
 
#MEMORIA
 
${font arial black:size=12}${color #7FCF5D}MEMORIA${color}${font arial black:size=11} ${color #7FCF5D} ${hr 2}$color$font
${font arial black:size=9}RAM: $font$memperc% ${alignr}$mem ${font arial black:size=9}/ $font$memmax
${membar 4}
${font arial black:size=9}SWAP: $font$swapperc% ${alignr}$swap ${font arial black:size=9}/ $font$swapmax
${swapbar 4}
#DISCOS
 
${font arial black:size=12}${color #7FCF5D}DISCOS${color}${font arial black:size=11} ${color #7FCF5D} ${hr 2}$color$font
${font arial black:size=9}VOLUMEN${goto 116}TIPO${goto 180}%LIBRE${alignr 1}TAMAÑO$font
#Particion0
${font arial black:size=9}ROOT:$font${goto 120}${fs_type /}${goto 190}${fs_free_perc /}%${alignr}${fs_size /}
${fs_bar 4 /}$color
#Particion1
${if_mounted /media/Oficina}${font arial black:size=9}OFICINA:$font${goto 120}${fs_type /media/Oficina}${goto 190}${fs_free_perc /media/Oficina}%${alignr 1}${fs_size /media/Oficina}
${fs_bar 4 /media/Oficina}$color $endif
#Particion2
${if_mounted /media/Personal}${font arial black:size=9}PERSONAL:$font${goto 120}${fs_type /media/Personal}${goto 190}${fs_free_perc /media/Personal}%${alignr 1}${fs_size /media/Personal}
${fs_bar 4 /media/Personal}$color $endif
#Particion3
${if_mounted /media/OS}${font arial black:size=9}DATOS:$font${goto 120}${fs_type /media/OS}${goto 190}${fs_free_perc /media/OS}%${alignr 1}${fs_size /media/OS}
${fs_bar 4 /media/OS}$color $endif
 
${font arial black:size=12}${color #7FCF5D}RED${color}${font arial black:size=11} ${color #7FCF5D} ${hr 2}$color$font
${font arial black:size=9}LOCAL:$font${addr eth0} $alignr ${color} ${font arial black:size=9}IP:$font${execi 14400 wget -O - http://whatismyip.org/ | tail}${color}
${font arial black:size=9}DOWN: $font$color${downspeed eth0} k/s ${alignr}${font arial black:size=9}UP: $font${upspeed eth0} k/s
${downspeedgraph eth0 25,140 303030 C0C0C0} ${alignr}${upspeedgraph eth0
25,140 303030 C0C0C0}$color
${font arial black:size=9}TOTAL: $font${totaldown eth0} ${alignr}${font arial black:size=9}TOTAL: $font${totalup eth0}
${font arial black:size=9}INBOUND: $font${tcp_portmon 1 32767 count} ${font arial black:size=9}OUTBOUND: $font${tcp_portmon 32768
61000 count}${alignr}${font arial black:size=9}TOTAL: $font${tcp_portmon 1 65535 count}
${color #7FCF5D}${hr 2}$color

Guardamos los cambios de nuestro archivo de configuración.

Resultado

Para ejecutar solo debemos escribir en una terminal el comando
conky
Para hacer que inicie con el sistema debemos ir a Sistemas >Preferencias > Aplicaciones al Inicio > Añadir

Listo, si analizas las lineas te darás cuenta que es muy fácil hacerle modificaciones al código, puedes cambiar el color, tamaño del texto, etc… también puedes buscar archivos ya pre-configurados en http://gnome-look.org/ y poner el diseño que mas te guste.

You may also like...

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *