visterine
(usa Linux Mint)
Enviado em 07/03/2016 - 00:20h
Tentei várias configurações para o Conky mostrar o trafego de rede.
Não estou conseguindo ativar as variáveis "downspeed" e "upspeed".
Como faço tambem para mostrar a rotação da ventoinha?
Meu sistema: Sabayon Linux amd64 16.04
Meu Conky(adaptado de
http://didi79.deviantart.com/art/conky-config-127651851):
http://www.zimagez.com/zimage/capturadetela2016-03-0700-15-53.php
#!/usr/bin/conky -d -c
## .conkyrc configuration
alignment top_right
background yes
border_margin 5
border_width 5
color0 555555 #
color1 FCAF3E # zolty
color2 64574e # braz
color3 a82553 # rozowy f71f84
color4 5e1014 # bordowy
color5 64574e # braz
color6 a7a7a7 # szary
color7 8888CC # (COOL)
color8 9d9c61 # zolto-szary
color9 525276 # niebiesko-szary
cpu_avg_samples 2
default_color e1e1e1 # szary a7a7a7
default_outline_color 000000 # Black
default_shade_color 000000 # Black
double_buffer yes
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
gap_x 5
gap_y 40
max_specials 1024
max_user_text 10000
maximum_width 180
minimum_size 850
net_avg_samples 2
no_buffers yes
override_utf8_locale yes
own_window yes
own_window_colour 000000 # Black
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_type override ## normal
pad_percents 2 # to co nizej, miejsc po przecinku
short_units yes # krotka wersja podawania wielkosci dyskow np. 612.21M/3.80G
stippled_borders 3
text_buffer_size 8000
total_run_times 0
update_interval 1.0
uppercase no
use_spacer right
use_xft yes
xftalpha 0.75
xftfont sans:size=10
TEXT
${color1}${goto 10}${font DejaVu Sans Mono:size=44}${time %H}${font DejaVu Sans Mono:size=20}${voffset -25}'${time %M}${font DejaVu Sans Mono:size=8}${voffset -12}${time %S}
${color1}${goto 85}${voffset 10}${font :size=10}${time %A}
${color1}${goto 85}${voffset 1}${font :size=10}${time %d %B %Y}
${color}${font RsbillsDng:size=14}O${font}${font DejaVu Sans Mono:size=8}${execpi 3600 DJS=`date +%_d`; cal -m | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color1}'"$DJS"'${color}'" "/}${font}
${voffset -20}${color1}${font led:size=10}SYSTEM ${font}$hr
${color}${sysname} Kernel: ${alignr}$kernel
${color}${alignc}${execi 99999 cat /proc/cpuinfo | grep "model name" -m1 | cut -d":" -f2 | cut -d" " -f2- | sed 's#Processor ##'}
${color}Machine: $machine
${color}Uptime: $alignr$uptime
${voffset -10}${color1}${font led:size=10}CPU ${font}$hr
${color}Core 1: ${cpu cpu1}% $alignr ${freq_g (1)} GHz / ${exec sensors | grep "Core 0" | cut --bytes=14-21}
${color}Core 2: ${cpu cpu2}% $alignr ${freq_g (2)} GHz / ${exec sensors | grep "Core 1" | cut --bytes=14-21}
${voffset -10}${color1}${font led:size=10}TAREFAS ${font}$hr
${voffset -2}${color}${font}NAME ${goto 90}PID${goto 120}CPU% ${alignr}MEM%
${color}${font :size=7}${goto 9}${top name 1}${goto 85}${top pid 1}${goto 120}${top cpu 1}${goto 156}${top mem 1}
${color}${font :size=7}${goto 9}${top name 2}${goto 85}${top pid 2}${goto 120}${top cpu 2}${goto 156}${top mem 2}
${color}${font :size=7}${goto 9}${top name 3}${goto 85}${top pid 3}${goto 120}${top cpu 3}${goto 156}${top mem 3}
${voffset -6}${color1}${font led:size=10}MEMORY ${font}$hr
${color}ram: ${mem} / ${memmax} ${alignr} ${memperc}%
${color}swap: ${swap} / ${swapmax} ${alignr} ${swapperc}%
${voffset -10}${color1}${font led:size=10}HDD ${font}$hr
${color}root: ${fs_used /} / ${fs_size /} ${alignr} ${fs_used_perc /}%
${color}home: ${fs_used /home} / ${fs_size /home} ${alignr} ${fs_used_perc /home}%
${color}${voffset -12}${execpi 5 ~/.conky/usb_nowe.sh}
${voffset -10}${color1}${font led:size=10}REDE ${font}$hr
${color}gateway IP: ${alignr}${gw_ip}
Down: $color${downspeed eth0} k/s ${alignr}Up: ${upspeed eth0} k/s
${downspeedgraph eth0 25,140 000000 ff0000} ${alignr}${upspeedgraph eth0
25,140 000000 00ff00}$color
Total: ${totaldown eth0} ${alignr}Total: ${totalup eth0}
${execi 30 netstat -ept | grep ESTAB | awk '{print $9}' | cut -d: -f1 | sort | uniq -c | sort -nr}
${color orange}LOGGING ${hr 2}$color
${execi 30 tail -n3 /var/log/messages | awk '{print " ",$5,$6,$7,$8,$9,$10}' | fold -w50}
Editado 08/03/16:
Consegui matar a charada.
Segui a wiki do Gentoo em
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Networking/pt-br e descobri que minha interface de rede era enp0s25 e não eth0. Foi só substituir no arquivo de configuração do Conky que os dados de rede começaram a ser exibidos.
Para descobrir a interface de rede correta é só digitar no terminal:
ls /sys/class/net
O resultado deve ser algo parecido com:
dummy0 eth0 lo sit0 tap0 wlan0 enp0s25