How to get network bandwidth in RHEL systems?
by hacback17 from LinuxQuestions.org on (#5B74F)
I am writing a simple bash script, using a tool nethogs for this task. It is very good in the interactive mode but I am not able to output from it in a way I want. Please see the screenshot here: https://ibb.co/s3j8dhq
For example, I am just interested in the total SENT and RECEIVED bandwidth. When I do sudo nethogs >> output, it just shows this standard error: Waiting for first packet to arrive (see sourceforge.net bug 1019381). Please see the screenshot here: https://ibb.co/N91h3qv
Do you have any suggestion how I can I better utilize this tool or you can also suggest a better one for this particular task that can be easily incorporated in a bash script?


For example, I am just interested in the total SENT and RECEIVED bandwidth. When I do sudo nethogs >> output, it just shows this standard error: Waiting for first packet to arrive (see sourceforge.net bug 1019381). Please see the screenshot here: https://ibb.co/N91h3qv
Do you have any suggestion how I can I better utilize this tool or you can also suggest a better one for this particular task that can be easily incorporated in a bash script?