Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

want to see an amount of traffic passed through interface since boot. It's an ISPManager VDS with FreeBSD 8.0, and

ifconfig -L epair521b -B

does nothing.

Want to have output like Linux's ifconfig:

lo Link encap:Local Loopback
...

RX bytes:6642443661 (6.1 GiB) TX bytes:6642443661 (6.1 GiB)

share|improve this question

2 Answers 2

up vote 14 down vote accepted
systat -ifstat 1

Is much better. You gonna get traffic throughput, Peak and Total.

share|improve this answer
    
Cool! Thanks boy –  Pol Hallen Nov 28 '13 at 15:04
    
Pure Bliss. ... –  sjas Aug 21 at 14:53
    
Nice - I haven't used this command for 12 years I was thinking it was netstat –  Jim Ford Oct 24 at 19:34

Reading file /usr/local/share/munin/plugins/if_ (in port sysutils/munin-node) I see it's using the following command line to achieve just that :

/usr/bin/netstat -i -b -n -I $INTERFACE

PS: that file also contains a warning that those are 32 bit counters; some years ago I RTFS and verifier that's because it's easier to update atomically; I didn't verify if it's the same on the (more recent) amd64 platform though.

share|improve this answer
    
This is perfect for me, as I needed a command with static output so I could use it in a script. –  WildVelociraptor May 14 at 18:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.