how to get current network link speed through c program
when some packets are transmitted on our interface how get the current
packet transmission speed through a c program and display it.
Currently im collecting statistics after complete traffic generation from
/sys/class/net/eth0/statistics/tx_bytes and shoing speed using following
formulae
speed = (tx_bytes*8)/(60*1024*1024) for showing in mbps (mega bits per
second) but the actual speed shown on bmon (bandwidth monitor) program and
what im getting using this calculation are different.
No comments:
Post a Comment