Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-P processID1 processID2 ... processIDn #276

Open
JeckPeppinger opened this issue Jun 23, 2024 · 1 comment
Open

-P processID1 processID2 ... processIDn #276

JeckPeppinger opened this issue Jun 23, 2024 · 1 comment

Comments

@JeckPeppinger
Copy link

nethog can be set on specific processes which is great.
With -P a processID to monitor can be specified.

Is there a way to supply a list of processIDs to monitor?

Example cfommand: sudo nethogs -P pgrep rclone -v 3
When one rclone process is running, the command works well.
But when there is more than one rclone process it fails, because pgrep rclone returns several pIDs.
Is there a way to send a list if pIDs to -P?

@JeckPeppinger
Copy link
Author

JeckPeppinger commented Jun 23, 2024

i made a small script for several processes, here it is rclone, change this to the app/process you want. note the -v 3 option switches to network usage - total in out traffic for this process. if you want momentar bandwidth usage check the -v options.

#!/usr/bin/bash

PROC=""

for i in `pgrep rclone` ; do
  PROC="$PROC -P $i"
done

# echo $PROC

sudo nethogs $PROC -v 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant