I am trying to retrieve CPU, disk and networking stats using the /proc filesystem. I was able to successfully retrieve cpu and disk stats from /proc/stat and /proc/diskstats. I still haven't found the right way to collect network statistics.
The stats I would like to collect on a per linux box basis:
I know that I can get these stats using sar but I want to write an independent program that performs similar to sar. It will be great if someone can explain from where sar retrieves this information and how it processes them to arrive at these stats on a periodic basis.
There are great network bandwidth monitoring tools which can help you getting this information almost, like slurm,bmon. You can know more from this URL :- http://www.binarytides.com/linux-commands-monitor-network/
Thanks & Regards,
Alok Thaker
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.