Is there any way to calculate the Linux network interfaces RX , TX for all times? The suggested method mentioned in this Cyberciti article titled: Linux See Ethernet Statistics only returns the stats of the machine currently, from the the time the system booted until now. Data from previous reboots about network usage does not show up when looking at the ifconfig device, as discussed in the article.

I need to know the life time network usage for the entire life of the machine, since Linux was installed.

  • Where does the network usage log get stored?
  • Does it get stored anywhere?
  • 1
    It's not clear what you want, but if you're asking about something like per-hour IO counters, no linux does not store this information. However you could use utilities such as ntop, but they are not lightweight solutions.
    – phemmer
    Nov 18, 2013 at 12:11
  • @Patrick - he wants to know the totals for the entire life of the system.
    – slm
    Nov 18, 2013 at 13:33

1 Answer 1


I'd take a look at using this package, vnStat which purports to do what you want using the same data that you're looking at from ifconfig.

excerpt of features

  • quick and simple to install and get running
  • gathered statistics persists through system reboots
  • can monitor multiple interfaces at the same time
  • several output options
    • summary, hourly, daily, monthly, weekly, top 10 days
    • optional png image output (using libgd)
  • months can be configured to follow billing period
  • light, minimal resource usage
  • same low cpu usage regardless of traffic
  • can be used without root permissions
  • online color configuration editor
  • as I understood Linux does not store the network usage history anywhere and if want to know about it we should install a third software like vnstat (which was great and easy - thank you) or MRTG which stores the networ data itself and generates the report. Nov 19, 2013 at 7:44
  • @MohammadRafiee - that is correct, Linux does not keep the counters from the network devices. They are real-time counters and get reset each time the system is restarted.
    – slm
    Nov 19, 2013 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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