I am developing a network statistic program in C++ for Linux.
I would like to access some statistical information about the current network connection.
E.g.:
Any idea how to access this kind of information?
so, i have been trying to accomplish my objective using de /proc, we can find alot of information, but there is some missing information i need. I am thinking in developing a simple C++ promiscuous application, using LibPcap, that captures the network traffic i need and starts taking the metrics i want.
The Con is that i think this is going to be CPU intensive, at least more then needed ... Any thoughts about this ?
All this information are spread into /proc/net
files (updated by kernel). The most important file is /proc/net/netstat
. Into to /proc/net/dev
there are device statistics. You could open and parse.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With