No network I/O displayed

GTP

Well-Known Member
Reaction score
9,186
Location
Adelaide, Australia
Was just wondering if anyone with code skilz could take a look at this conky file and tell me why it wont display network I/O. (Or just fix it for me please? :))
Its on a wired network. (eth0)
TIA

Code:
# Use Xft?
use_xft yes
xftfont DejaVu Sans:size=8
xftalpha 0.8
text_buffer_size 2048

# Update interval in seconds
update_interval 4

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

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

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

# Minimum size of text area
minimum_size 180 0
#maximum_width 800

# 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 5

# border width
border_width 1

# Default colors and also border colors
default_color grey
#default_shade_color black
#default_outline_color grey
own_window_colour grey

# 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
# same thing as passing -x at command line
gap_x 55
gap_y 5

# Subtract file system buffers from used memory?
no_buffers yes

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

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

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

TEXT
${color red}SYSTEM ${hr 2}$color
${alignc -5}${font URW Chancery L:size=16}${color Green}MINT 18.3${font}$color
${alignc}${color Yellow}${font URW Chancery L:size=10}        Sometimes, magic happens!$color
${voffset 2}${font StyleBats:size=14}${font}${color Black}        Kernel:${alignr}${kernel}$color
${font URW Chancery L:size=16}${color Green}${color Black}${font}     CPU1: ${cpu cpu1}% ${alignr}${color Blue}${cpubar cpu1 10,90}$color
${font URW Chancery L:size=16}${color Green}${color Black}${font}     CPU2: ${cpu cpu2}% ${alignr}${color Blue}${cpubar cpu2 10,90}$color
${font URW Chancery L:size=16}${color Green}${color Black}${font}     CPU3: ${cpu cpu3}% ${alignr}${color Blue}${cpubar cpu3 10,90}$color
${font URW Chancery L:size=16}${color Green}${color Black}${font}     CPU4: ${cpu cpu4}% ${alignr}${color Blue}${cpubar cpu4 10,90}$color
${font URW Chancery L:size=16}${color Green}${color Black}${font}     RAM: $memperc% ${alignr}${color yellow}${membar 10,90}$color$color
${font URW Chancery L:size=16}${color Green}${color Black}${font}     SWAP: $swapperc% ${alignr}${color Green}${swapbar 10,90}$color
${font StyleBats:size=14}${font} ${color Black}    Uptime: ${alignr}${color Red}${uptime}$color
${color red}DATE ${hr 2}$color
${alignc 17}${font URW Chancery L:size=16}${color Green}${time %H:%M}${font}$color
${alignc}${color Black}${time %A %d %B %Y}
${color red}HARDDISK ${hr 2}$color
${voffset 4}${font URW Chancery L:size=16}${color Black}${font}    ${voffset -5}Root:
${voffset 4}       ${fs_used /}/${fs_size /} ${alignr}${color #FFFF00}${fs_bar 8,60 /}$color
${font URW Chancery L:size=16}${color Black}${font}   ${voffset -5}Home:
${voffset 4}       ${fs_used /home}/${fs_size /home} ${alignr}${color #FFFF00}${fs_bar 8,60 /home}$color
${color Black}${voffset 2}${hr 1}
${color Black}${voffset 5}Hostname: ${color Black}$alignr$nodename
#${color Black}wlan0: ${color Black}$alignr${addr wlan0}
#${color Black}Current: ${color Black}${alignr}${execi 10 /sbin/iwconfig wlan0|grep Rate|cut -d"M" -f1|cut -b20-24} #Mbits/sec
#${alignr 140}Public IP ${color Blue}                            ${exec wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]|.]//#g'}$color
${color Black}Down: ${color Black}${downspeed eth0}k/s ${alignr}${color Black}Up: ${color Black}${upspeed eth0}k/s
${downspeedgraph eth0 30,120 000000 Black} ${alignr}${upspeedgraph eth0 30,120 000000 Black}$color
${color Black}Total:${color Black}${totaldown eth0} ${alignr}${color Black}Total:${color Black}${totalup eth0}

${color red}PROCESSES ${hr 2}$color

${color Black}NAME $alignr ${color Black}PID    CPU

${top name 1} ${font URW Chancery L:size=10}${color Green}S${font}${color Black}  $alignr ${top pid 1} ${top cpu 1}

${top name 2} ${font URW Chancery L:size=10}${color Green}Y${font}${color Black}  $alignr ${top pid 2} ${top cpu 2}

${top name 3} ${font URW Chancery L:size=10}${color Green}L${font}${color Black}  $alignr ${top pid 3} ${top cpu 3}

${top name 4} ${font URW Chancery L:size=10}${color Green}V${font}${color Black}  $alignr ${top pid 4} ${top cpu 4}

${top name 5} ${font URW Chancery L:size=10}${color Green}I${font}${color Black}  $alignr ${top pid 5} ${top cpu 5}

${top name 6} ${font URW Chancery L:size=10}${color Green}A${font}${color Black}  $alignr ${top pid 6} ${top cpu 6}

#${font URW Chancery L:size=10}${alignc}TEMP
#${font URW Chancery L:size=10}${color Black}CPU TEMP0: ${alignr}${execp sensors coretemp-isa-0000 | grep 'Core 0' | cut -c16-17} 3${color #FBAA35}°C${color Black} / ${color Black}105${color #FBAA35} °C$color
#${font URW Chancery L:size=10}${color Black}CPU TEMP1: ${alignr}${execp sensors coretemp-isa-0000 | grep 'Core 2' | cut -c16-17} ${color #FBAA35}°C${color Black} / ${color Black}105${color #FBAA35} °C$color
#${font URW Chancery L:size=10}${color Black}MOTHERBD TEMP: ${alignr}${exec sensors it8721-isa-0a10 | grep 'temp1' | cut -c16-17} ${color #FBAA35}°C${color Black} / ${color Black}80${color #FBAA35} °C$color
#${font URW Chancery L:size=10}${color Black}HD-DISK TEMP:${alignr}${exec hddtemp /dev/sda -n --unit=C}${color #FBAA35} °C${color Black} / ${color Black}70${color #FBAA35} °C$color
#${font URW Chancery L:size=10}${color Black}TEMP2: ${alignr}${exec sensors it8721-isa-0a10 | grep 'temp2' | cut -c16-17} ${color FBAA35}°C${color Black} / ${color Black}127${color #FBAA35} °C$color
#${font URW Chancery L:size=10}${color Black}TEMP3: ${alignr}${exec sensors it8721-isa-0a10 | grep 'temp3' | cut -c16-17} ${color FBAA35}°C${color Black} / ${color Black}127${color #FBAA35} °C$color
#${font URW Chancery L:size=10}${color Black}FAN: ${alignr}${exec sensors it8721-isa-0a10 | grep 'fan1' | cut -c12-18}${font}${color FBAA35}  RPM${font}


#not used ${color Black}eth0: ${color Black}$alignr${addr eth0}
 
Works for me (Mint 18.3 (in VirtualBox on a Mac, not that that should matter), Conky 1.10.1), though I had to tweak it to change all the references to eth0 into enp0s3 in order to match the network adapter on my VM. If you give Conky the wrong device name it doesn't complain and just reports no traffic, which sounds a lot like your situation.

I suppose ifconfig on your machine does say you're using eth0 and not something more exotic?
 
You still worried about your network in Conky @Barcelona ? I suppose I should do the same. Hehee!

Too many times I've typed ifconfig into a Windows machine and wonder why it doesn't work and what happened - heh! (For some reason I never type ipconfig into a Linux machine....)
 
I'm using TeeJee Tech's Conky Manager but the PPA isn't supported in Xenial.
I manually edited the file some time ago and used some code from another conky which broke it cause it was still using eth0 for the network.
Just glad to have it working but the best thing is I've learned something.:)
 
Back
Top