Display current bandwidth statistics

ifstat -nt
ifstat, part of ifstat package, is a tool for displaying bandwidth and other statistics. The -n option avoid to display header periodically, the -t option put a timestamp at the beginning of the line. Works for me on Debian and CentOS
Sample Output
#  ifstat -nt
  Time           eth0       
HH:MM:SS   KB/s in  KB/s out
13:36:13      6.18     14.83
13:36:14      7.66     13.32
13:36:15      0.49      6.41
13:36:16      3.21     12.21
13:36:17      8.85     12.66

2009-04-30 11:38:31

What Others Think

@vgagliardi curious, this is what I get: ifstat -nt ifstat: option requires an argument -- 't' Usage: ifstat [OPTION] [ PATTERN [ PATTERN ] ] -h, --help this message -a, --ignore ignore history -d, --scan=SECS sample every statistics every SECS -e, --errors show errors -n, --nooutput do history only -r, --reset reset history -s, --noupdate don;t update history -t, --interval=SECS report average over the last SECS -V, --version output version information -z, --zeros show entries with zero activity -e, --errors show errors -z, --zeros show entries with zero activity ifstat --nooutput --interval=3600 something is amiss :-(
mpb · 633 weeks and 2 days ago
Nice! For a top-like display of bandwith usage, there's also: iftop
unixmonkey3639 · 633 weeks ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: