As a followup question to this one:
I am downloading a file on multiple remote computers using
curl command and am using the
--limit-rate parameter to limit the download speed on the ones whose internet is being used:
curl --limit-rate 10k -r 104857601-209715200 -o distro2.iso 'http://files.cdn/distro.iso'
So I have to periodically monitor the internet usage of each computer (like every 5 seconds), and dynamically decrease the
--limit-rate once the internet is being used by the user and increase it as the internet usage becomes idle. So the only thing that I need to know is whether the user of remote computer is using their internet (like browsing the web, or downloading a file). Is there any easy way to find out this? I think I have to obtain the PID of
curl and exclude it from the list of applications that are using internet to find out whether any other application is using internet. I just don't know which command is better to use. Using commands that do not require sudo privileges are preferred. Any advice would be greatly appreciated!