Just to see what is going through my own computer I use vnstat and take the output from that into conky. I accept that if there are other machines using the network it will not be a accurate overall figure, but for my one main machine it is fine for me.
The .conkyrc content I use for the network display is
Code:
NETWORK IP: $alignr eth0 - ${addr eth0}
DOWN: ${downspeed eth0}/s$alignr UP: ${upspeed eth0}/s
${color #FFA500}${downspeedgraph eth0 40,158}$alignr${upspeedgraph eth0 40,158}${color #FFFFFF}
TOTAL ${totaldown eth0}$alignr TOTAL ${totalup eth0}
#NETWORK IP: $alignr eth0 - ${addr eth0}
#DOWN: ${downspeed eth0}/s $alignr TOTAL ${totaldown eth0}
#${downspeedgraph eth0 20,320}
#UP: ${upspeed eth0}/s $alignr TOTAL ${totalup eth0}
#${upspeedgraph eth0 20,320}
#
# To make hddtemp run as user use command "sudo chmod u+s /usr/sbin/hddtemp"
# To make vnstat run as user use command "sudo chmod u+s /usr/bin/vnstat"
# "${execi 60 vnstat" updates figures every 60 seconds.
DOWN: UP:
Today: ${execi 60 vnstat | grep "today" | awk '{print $2 $3}'}${alignr}Today: ${execi 60 vnstat | grep "today" | awk '{print $5 $6}'}
Week: ${execi 60 vnstat -w | grep "current week" | awk '{print $3 $4}'}${alignr}Week: ${execi 60 vnstat -w | grep "current week" | awk '{print $6 $7}'}
Month: ${execi 60 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $3 $4}'}${alignr}Month: ${execi 60 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $6 $7}'}
Note the command in red needed to run vnstat as user instead of root.
Bookmarks