[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

whether does it mean bytes or bits in file /proc/net/dev?



hi,all:
    i have a mrtg script to scale the network bandwidth usage.
here cames the script:
 
==============================================
 
Title[eth0]: eth0 bits
Options[eth0]: bits
Target[eth0]: `grep eth0 /proc/net/dev | sed 's/eth0://' | awk '{print $1; print $9; print ""; print ""}'`
PageTop[eth0]: eth0 bits
MaxBytes[eth0]: 1000000000
Ylegend[eth0]: bits
ShortLegend[eth0]: bits
XSize[eth0]: 350
YSize[eth0]: 150
Legend1[eth0]: bits 
LegendI[eth0]: input 
LegendO[eth0]: output 
WithPeak[eth0]: ymwd
 
==============================================
 
i have a intel e1000 netcard.
 
when i cat /proc/net/dev it tell me these:
 
==============================================
ftp:~# cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
    lo:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
  eth0:2938970759 74016701    0    0    0     0          0      7482 96493909 3303716266    0    0    0     0       0          0
==============================================
 
i am confused that the title is 'bytes' both Receive and Transmit. but i think 2938970759 bytes are too huge to my e1000 netcard.
 
i want to know how to use the data from /proc/net/dev to scale my netcard?
how to rewrite my mrtg script above?
 
any suggestion is regarded!

Reply to: