{"id":648,"date":"2008-03-02T16:36:41","date_gmt":"2008-03-02T15:36:41","guid":{"rendered":"http:\/\/www.marblestation.com\/blog\/?p=648"},"modified":"2012-04-26T16:30:36","modified_gmt":"2012-04-26T14:30:36","slug":"monitorizacion-del-sistema-con-conky-alternativa-a-gkrellm","status":"publish","type":"post","link":"https:\/\/www.marblestation.com\/?p=648","title":{"rendered":"Monitorizaci\u00f3n del sistema con conky (alternativa a gkrellm)"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/conky.sourceforge.net\/conky-thumb-1.png\" align=\"right\"\/>Aparte de las <a href=\"http:\/\/www.marblestation.com\/blog\/?p=642\">herramientas de monitorizaci\u00f3n<\/a> m\u00e1s completas y complejas que coment\u00e9 en otro art\u00edculo, he descubierto <a href=\"http:\/\/conky.sourceforge.net\/\">conky<\/a>.<\/p>\n<p>Conky es una herramienta que nos permite visualizar en el escritorio la carga de nuestro sistemas, las conexiones de red activas, etc. Similar a <a href=\"http:\/\/members.dslextreme.com\/users\/billw\/gkrellm\/gkrellm.html\">gkrellm<\/a> pero m\u00e1s configurable. La mayor pega que le encuentro es que no acaba de integrarse bien con Nautilus y la zona del escritorio que ocupa, se sobrepone a los ficheros que contenga.<\/p>\n<pre>\r\naptitude install conky\r\n<\/pre>\n<p>As\u00ed como gkrellm se puede configurar a partir de su propia interfaz gr\u00e1fica, conky requiere que creemos manualmente un archivo en nuestro directorio personal &#8216;~\/.conkyrc&#8217;. Os adjunto el contenido del mio por si sirve a alguien de utilidad:<br \/>\n<!--more--><\/p>\n<pre>\r\n# conky configuration\r\n# edited by darcon@gmail.com\r\n\r\n# set to yes if you want Conky to be forked in the background\r\nbackground no\r\n\r\n# X font when Xft is disabled, you can pick one with program xfontsel\r\n#font 5x7\r\n#font 6x10\r\n#font 7x13\r\n#font 8x13\r\n#font 9x15\r\n#font *mintsmild.se*\r\n#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*\r\n\r\n\r\n# Use Xft?\r\nuse_xft yes\r\n\r\n# Xft font when Xft is enabled\r\nxftfont Bitstream Vera Sans Mono:size=8\r\n#xftfont Terminus:size=8\r\n\r\n# Text alpha when using Xft\r\nxftalpha 1.0\r\n\r\n# Print everything to console?\r\n# out_to_console no\r\n\r\n# mail spool\r\n#mail_spool $MAIL\r\n\r\n# Update interval in seconds\r\nupdate_interval 3.0\r\n\r\n# This is the number of times Conky will update before quitting.\r\n# Set to zero to run forever.\r\ntotal_run_times 0\r\n\r\n# Create own window instead of using desktop (required in nautilus)\r\nown_window yes\r\nown_window_type override\r\nown_window_transparent yes\r\nown_window_hints undecorated,below,sticky,skip_taskbar,skip_pager\r\n\r\n\r\n# Use double buffering (reduces flicker, may not work for everyone)\r\ndouble_buffer yes\r\n\r\n# Minimum size of text area\r\nminimum_size 200 5\r\n\r\nmaximum_width 200\r\n\r\n# Draw shades?\r\ndraw_shades yes\r\n\r\n# Draw outlines?\r\ndraw_outline no\r\n\r\n# Draw borders around text\r\ndraw_borders yno\r\n\r\n# Stippled borders?\r\nstippled_borders 8\r\n\r\n# border margins\r\nborder_margin 4\r\n\r\n# border width\r\nborder_width 1\r\n\r\n# Default colors and also border colors\r\ndefault_color white\r\ndefault_shade_color black\r\ndefault_outline_color white\r\n\r\n# Text alignment, other possible values are commented\r\nalignment top_left\r\n#alignment top_right\r\n#alignment bottom_left\r\n#alignment bottom_right\r\n\r\n# Gap between borders of screen and text\r\n# same thing as passing -x at command line\r\n#gap_x 450\r\n#gap_y 1\r\n\r\n# Subtract file system buffers from used memory?\r\nno_buffers yes\r\n\r\n# set to yes if you want all text to be in uppercase\r\nuppercase no\r\n\r\n# number of cpu samples to average\r\n# set to 1 to disable averaging\r\ncpu_avg_samples 1\r\n\r\n# number of net samples to average\r\n# set to 1 to disable averaging\r\nnet_avg_samples 1\r\n\r\n# Force UTF8? note that UTF8 support required XFT\r\noverride_utf8_locale yes\r\n\r\n\r\n# Add spaces to keep things from moving about?  This only affects certain objects.\r\nuse_spacer yes\r\n#Note: doesn't work in conky 1.2 =(\r\n\r\n#   mldonkey_hostname     Hostname for mldonkey stuff, defaults to localhost\r\n#   mldonkey_port         Mldonkey port, 4001 default\r\n#   mldonkey_login        Mldonkey login, default none\r\n#   mldonkey_password     Mldonkey password, default none\r\n\r\n\r\n# Possible variables to be used:\r\n#\r\n#      Variable         Arguments                  Description                \r\n\r\n# \taddr              (interface)   IP address for an interface\r\n# \tacpiacadapter                   ACPI ac adapter state.                   \r\n# \tacpifan                         ACPI fan state                           \r\n# \tacpitemp                        ACPI temperature.                        \r\n# \tadt746xcpu                      CPU temperature from therm_adt746x       \r\n# \tadt746xfan                      Fan speed from therm_adt746x             \r\n# \talignr            (num)         Right-justify text, with space of N\r\n# \talignc                          Align text to centre\r\n# \tbattery           (num)         Remaining capasity in ACPI or APM        \r\n# \t\t\t\t\tbattery. ACPI battery number can be      \r\n# \t\t\t\t\tgiven as argument (default is BAT0).     \r\n# \tbuffers                         Amount of memory buffered                \r\n# \tcached                          Amount of memory cached                  \r\n# \tcolor             (color)       Change drawing color to color            \r\n# \tcpu                             CPU usage in percents                    \r\n# \tcpubar            (height)      Bar that shows CPU usage, height is      \r\n# \t\t\t\t\tbar's height in pixels                 \r\n# \tcpugraph          (height),(width) (gradient colour 1) (gradient colour 2)\r\n# \t\t\t\t\tCPU usage graph, with optional colours in hex,\r\n# \t\t\t\t\tminus the #.\r\n# \tdownspeed         net           Download speed in kilobytes              \r\n# \tdownspeedf        net           Download speed in kilobytes with one     \r\n# \t\t\t\t\tdecimal                                  \r\n# \tdownspeedgraph    net (height),(width) (gradient colour 1) (gradient colour 2)\r\n# \t\t\t\t\tDownload speed graph, colours defined in\r\n# \t\t\t\t\thex, minus the #.\r\n# \texec              shell command Executes a shell command and displays    \r\n# \t\t\t\t\tthe output in conky. warning: this      \r\n# \t\t\t\t\ttakes a lot more resources than other    \r\n# \t\t\t\t\tvariables. I'd recommend coding wanted   \r\n# \t\t\t\t\tbehaviour in C and posting a patch :-).  \r\n# \texecbar           shell command Same as exec, except if the first value\r\n# \t\t\t\t\treturn is a value between 0-100, it\r\n# \t\t\t\t\twill use that number for a bar.\r\n# \t\t\t\t\tThe size for the bar is currently fixed,\r\n# \t\t\t\t\tbut that may change in the future.\r\n# \texecgraph         shell command Same as execbar, but graphs values\r\n# \texeci             interval, shell command\r\n#  \t\t\t\t\tSame as exec but with specific interval. \r\n# \t\t\t\t\tInterval can't be less than              \r\n# \t\t\t\t\tupdate_interval in configuration.        \r\n#\tfont\t\t  font\t\tSpecify a different font.  Only applies\r\n#\t\t\t\t\tto one line.\r\n# \tfs_bar            (height), (fs)Bar that shows how much space is used on \r\n# \t\t\t\t\ta file system. height is the height in   \r\n# \t\t\t\t\tpixels. fs is any file on that file      \r\n# \t\t\t\t\tsystem.                                  \r\n# \tfs_free           (fs)          Free space on a file system available    \r\n# \t\t\t\t\tfor users.                               \r\n# \tfs_free_perc      (fs)          Free percentage of space on a file       \r\n# \t\t\t\t\tsystem available for users.              \r\n# \tfs_size           (fs)          File system size                         \r\n# \tfs_used           (fs)          File system used space                   \r\n# \thr                (height)      Horizontal line, height is the height in \r\n# \t\t\t\t\tpixels                                   \r\n# \ti2c               (dev), type, n  I2C sensor from sysfs (Linux 2.6). dev   \r\n# \t\t\t\t\tmay be omitted if you have only one I2C  \r\n# \t\t\t\t\tdevice. type is either in (or vol)       \r\n# \t\t\t\t\tmeaning voltage, fan meaning fan or\r\n# \t\t\t\t\ttemp\/tempf (first in C, second in F)\r\n# \t\t\t\t\tmeaning temperature. n is number of the  \r\n# \t\t\t\t\tsensor. See \/sys\/bus\/i2c\/devices\/ on     \r\n# \t\t\t\t\tyour local computer.                     \r\n# \tif_running        (process)     if PROCESS is running, display\r\n# \t\t\t\t\teverything if_running and the matching $endif\r\n# \tif_existing       (file)        if FILE exists, display everything between\r\n# \t\t\t\t\tif_existing and the matching $endif\r\n# \tif_mounted        (mountpoint)  if MOUNTPOINT is mounted, display everything between\r\n# \t\t\t\t\tif_mounted and the matching $endif\r\n# \telse                            Text to show if any of the above are not true\r\n# \tkernel                          Kernel version                          \r\n# \tlinkstatus        (interface)   Get the link status for wireless connections\r\n# \tloadavg           (1), (2), (3) System load average, 1 is for past 1     \r\n# \t\t\t\t\tminute, 2 for past 5 minutes and 3 for   \r\n# \t\t\t\t\tpast 15 minutes.                         \r\n# \tmachine                         Machine, i686 for example                \r\n# \tmails                           Mail count in mail spool. You can use    \r\n# \t\t\t\t\tprogram like fetchmail to get mails from \r\n# \t\t\t\t\tsome server using your favourite         \r\n# \t\t\t\t\tprotocol. See also new_mails.            \r\n# \tmem                             Amount of memory in use                  \r\n# \tmembar            (height)      Bar that shows amount of memory in use   \r\n# \tmemmax                          Total amount of memory                   \r\n# \tmemperc                         Percentage of memory in use\r\n# \t\r\n# \tmetar_ob_time\r\n# \tmetar_temp\r\n# \tmetar_tempf                     Temp in F\r\n# \tmetar_windchill\r\n# \tmetar_dew_point                 There are a bunch of these\r\n# \tmetar_rh                        and they are self-explanatory\r\n# \tmetar_windspeed\r\n# \tmetar_winddir\r\n# \tmetar_swinddir\r\n# \tmetar_cloud\r\n# \tmetar_u2d_time\r\n# \t\r\n# \tml_upload_counter               total session upload in mb\r\n# \tml_download_counter             total session download in mb\r\n# \tml_nshared_files                number of shared files\r\n# \tml_shared_counter               total session shared in mb, buggy\r\n# \t\t\t\t\tin some mldonkey versions\r\n# \tml_tcp_upload_rate              tcp upload rate in kb\/s\r\n# \tml_tcp_download_rate            tcp download rate in kb\/s\r\n# \tml_udp_upload_rate              udp upload rate in kb\/s\r\n# \tml_udp_download_rate            udp download rate in kb\/s\r\n# \tml_ndownloaded_files            number of completed files\r\n# \tml_ndownloading_files           number of downloading files\r\n# \t\r\n# \tmpd_artist\t\t\tArtist in current MPD song\r\n# \t\t\t\t\t(must be enabled at compile)\r\n# \tmpd_album\t\t\tAlbum in current MPD song\r\n# \tmpd_bar           (height)      Bar of mpd's progress\r\n# \tmpd_bitrate                     Bitrate of current song\r\n# \tmpd_status                      Playing, stopped, et cetera.\r\n# \tmpd_title\t\t\tTitle of current MPD song\r\n# \tmpd_vol\t\t\t\tMPD's volume\r\n# \tmpd_elapsed                     Song's elapsed time\r\n# \tmpd_length                      Song's length\r\n# \tmpd_percent                     Percent of song's progress\r\n# \tnew_mails                       Unread mail count in mail spool.         \r\n# \tnodename                        Hostname                                 \r\n# \toutlinecolor      (color)       Change outline color                     \r\n# \tpre_exec          shell command Executes a shell command one time before \r\n# \t\t\t\t\tconky displays anything and puts output \r\n# \t\t\t\t\tas text.                                 \r\n# \tprocesses                       Total processes (sleeping and running)   \r\n# \trunning_processes               Running processes (not sleeping),        \r\n# \t\t\t\t\trequires Linux 2.6                       \r\n# \tshadecolor        (color)       Change shading color                     \r\n# \tstippled_hr       (space),      Stippled (dashed) horizontal line        \r\n# \t\t\t(height)        \r\n# \tswapbar           (height)      Bar that shows amount of swap in use     \r\n# \tswap                            Amount of swap in use                    \r\n# \tswapmax                         Total amount of swap                     \r\n# \tswapperc                        Percentage of swap in use                \r\n# \tsysname                         System name, Linux for example           \r\n# \toffset            pixels        Move text over by N pixels\r\n# \ttail              logfile, lines (interval)\r\n# \t\t\t\t\tDisplays last N lines of supplied text\r\n# \t\t\t\t\ttext file.  If interval is not supplied,\r\n# \t\t\t\t\tConky assumes 2x Conky's interval.\r\n# \t\t\t\t\tMax of 30 lines.\r\n# \t\t\t\t\tMax of 30 lines can be displayed.\r\n# \ttime              (format)      Local time, see man strftime to get more \r\n# \t\t\t\t\tinformation about format                 \r\n# \ttotaldown         net           Total download, overflows at 4 GB on     \r\n# \t\t\t\t\tLinux with 32-bit arch and there doesn't \r\n# \t\t\t\t\tseem to be a way to know how many times  \r\n# \t\t\t\t\tit has already done that before conky   \r\n# \t\t\t\t\thas started.                            \r\n# \ttop               type, num     This takes arguments in the form:\r\n# \t\t\t\t\ttop <name> <number>\r\n# \t\t\t\t\tBasically, processes are ranked from \r\n# \t\t\t\t\thighest to lowest in terms of cpu\r\n# \t\t\t\t\tusage, which is what <num> represents.\r\n# \t\t\t\t\tThe types are: \"name\", \"pid\", \"cpu\", and\r\n# \t\t\t\t\t\"mem\".\r\n# \t\t\t\t\tThere can be a max of 10 processes listed.\r\n# \ttop_mem           type, num     Same as top, except sorted by mem usage\r\n# \t\t\t\t\tinstead of cpu\r\n# \ttotalup           net           Total upload, this one too, may overflow \r\n# \tupdates                         Number of updates (for debugging)        \r\n# \tupspeed           net           Upload speed in kilobytes                \r\n# \tupspeedf          net           Upload speed in kilobytes with one       \r\n# \t\t\t\t\tdecimal                                  \r\n# \tupspeedgraph      net (height),(width)  (gradient colour 1) (gradient colour 2)\r\n# \t\t\t\t\tUpload speed graph, colours defined in\r\n# \t\t\t\t\thex, minus the #.\r\n# \tuptime                          Uptime                                   \r\n# \tuptime_short                    Uptime in a shorter format               \r\n# \t\r\n# \tseti_prog                       Seti@home current progress\r\n# \tseti_progbar      (height)      Seti@home current progress bar\r\n# \tseti_credit                     Seti@hoome total user credit\r\n\r\n\r\n# variable is given either in format $variable or in ${variable}. Latter\r\n# allows characters right after the variable and must be used in network\r\n# stuff because of an argument\r\n\r\n# stuff after 'TEXT' will be formatted on screen\r\n\r\nTEXT\r\n${color slate grey}${time %a, } ${color }${time %e %B %G}\r\n${color slate grey}${time %Z,    }${color }${time %H:%M:%S}\r\n${color slate grey}UpTime: ${color }$uptime\r\n${color slate grey}Battery: ${color }${battery_percent}%\r\n${color slate grey}CPU:${color } $cpu% ${acpitemp}C\r\n${cpugraph 20,130 000000 ffffff}\r\n${color slate grey}Load: ${color }$loadavg\r\n${color slate grey}Processes: ${color }$processes  \r\n${color slate grey}Running:   ${color }$running_processes\r\n\r\n${color slate grey}Highest CPU:      CPU%   MEM%\r\n${color #ddaa00} ${top name 1} ${top cpu 1} ${top mem 1}\r\n${color lightgrey} ${top name 2} ${top cpu 2} ${top mem 2}\r\n${color lightgrey} ${top name 3} ${top cpu 3} ${top mem 3}\r\n${color lightgrey} ${top name 4} ${top cpu 4} ${top mem 4}\r\n${color slate grey}Highest MEM:\r\n${color #ddaa00} ${top_mem name 1} ${top_mem cpu 1} ${top_mem mem 1}\r\n${color lightgrey} ${top_mem name 2} ${top_mem cpu 2} ${top_mem mem 2}\r\n${color lightgrey} ${top_mem name 3} ${top_mem cpu 3} ${top_mem mem 3}\r\n${color lightgrey} ${top_mem name 4} ${top_mem cpu 4} ${top_mem mem 4}\r\n\r\n${color slate grey}MEM:  ${color } $memperc% $mem\/$memmax\r\n${membar 3,100}\r\n${color slate grey}SWAP: ${color }$swapperc% $swap\/$swapmax\r\n${swapbar 3,100}\r\n${color slate grey}ROOT:    ${color }${fs_free \/}\/${fs_size \/}\r\n${fs_bar 3,100 \/}\r\n${color slate grey}HOME:  ${color }${fs_free \/home\/marble}\/${fs_size \/home\/marble}\r\n${fs_bar 3,100 \/home\/marble}\r\n${color slate grey}LAN: \r\n${color}Up: ${color }${upspeed eth0} k\/s  ${color}Down: ${color }${downspeed eth0}k\/s${color}\r\n${upspeedgraph eth0 20,80 000000 ffffff}  ${downspeedgraph eth0 20,80 000000 ffffff}\r\n${color slate grey}Wireless: ${color}${wireless_essid eth1}\r\n${color}Up: ${color }${upspeed eth1} k\/s  ${color}Down: ${color }${downspeed eth1}k\/s${color}\r\n${upspeedgraph eth1 20,80 000000 ffffff}  ${downspeedgraph eth1 20,80 000000 ffffff}\r\n\r\n${color #ddaa00}Port(s)${alignr}#Connections   \r\n$color Inbound: ${tcp_portmon 1 32767 count}  Outbound: ${tcp_portmon 32768 61000 count}${alignr}ALL: ${tcp_portmon 1 65535 count}\r\n${color #ddaa00}Inbound Connection ${alignr} Local Port$color\r\n ${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0}\r\n ${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}\r\n ${tcp_portmon 1 32767 rhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2}\r\n ${tcp_portmon 1 32767 rhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3}\r\n ${tcp_portmon 1 32767 rhost 4} ${alignr} ${tcp_portmon 1 32767 lservice 4}\r\n${color #ddaa00}Outbound Connection ${alignr} Remote Port$color\r\n ${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0}\r\n ${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1}\r\n ${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2}\r\n ${tcp_portmon 32768 61000 rhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3}\r\n ${tcp_portmon 32768 61000 rhost 4} ${alignr} ${tcp_portmon 32768 61000 rservice 4}\r\n<\/num><\/number><\/name><\/pre>\n<p>Esta configuraci\u00f3n esta preparada para funcionar con GNOME y se visualiza en el fondo de escritorio. Una vez creado el archivo, \u00fanicamente necesitamos ejecutar &#8216;conky&#8217;.<\/p>\n<p>Otra alternativas podr\u00eda ser el uso de <a href=\"http:\/\/www.gdesklets.de\/\">gdesklets<\/a> o <a href=\"http:\/\/adesklets.sourceforge.net\/\">adesklets<\/a> (este \u00faltimo m\u00e1s ligero) con complementos de monitorizaci\u00f3n del sistema.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Aparte de las herramientas de monitorizaci\u00f3n m\u00e1s completas y complejas que coment\u00e9 en otro art\u00edculo, he descubierto conky. Conky es una herramienta que nos permite visualizar en el escritorio la carga de nuestro sistemas, las conexiones de red activas, etc. Similar a gkrellm pero m\u00e1s configurable. La mayor pega que le encuentro es que no &hellip; <a href=\"https:\/\/www.marblestation.com\/?p=648\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Monitorizaci\u00f3n del sistema con conky (alternativa a gkrellm)<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,6],"tags":[],"class_list":["post-648","post","type-post","status-publish","format-standard","hentry","category-espanyol","category-tecnologia"],"_links":{"self":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts\/648","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=648"}],"version-history":[{"count":1,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts\/648\/revisions"}],"predecessor-version":[{"id":1271,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts\/648\/revisions\/1271"}],"wp:attachment":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=648"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=648"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=648"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}