How to know the current load of the network (Mac OS)?

Please help to invent the algorithm / maybe there's some ready command to determine the current load of the network on Mac OS, then you need to work with this variable programmatically (Python, PHP, Shell, something else). For example, the torrent client at the moment, shakes 200-300 KB/s, Chrome loads YouTube videos and consumes another 300 KB/s. How to collect in total all of this in one variable (500-600 KB/c)?
What you need: have a Yota (mobile operator from Russia) are in the personal Cabinet the function of dynamic change of parameters of the rate and cost, I would like to write daemon which would monitor my current "high speed needs" and depending on this, include the desired rate, the maximum saving. Found on GitHub Python script which you can use through the console to dynamically change the speed, passing is required as a parameter, I would like to automate.
52cf0e68dd8f4f64928629f5f9b9a987.pnga00de9abbfb841a5a5fcbc92402e8641.png
June 27th 19 at 15:29
1 answer
June 27th 19 at 15:31
Solution
for python you should consider psutil
well, example of use
stackoverflow.com/questions/21866951/get-upload-do...

Find more questions by tags PythonYota