How to check network flow rate by Python?

We had mentioned a perl script in a former post that can be used to check network flow rate in command line.
Since python is very popular today in system administration, we will show a python script on this. Here is the output from this script:

$ python
Current In: 0.75k/s, Current Out: 0.16k/s
Current In: 0.15k/s, Current Out: 13.53k/s
Current In: 0.06k/s, Current Out: 0.12k/s

You can get the script here: By default, this script check eth0 with ifconfig for details, you can change the interface as you need.

Leave a comment

Your email address will not be published. Required fields are marked *