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

Add process filter #218

Merged
merged 1 commit into from
Mar 2, 2022
Merged

Add process filter #218

merged 1 commit into from
Mar 2, 2022

Conversation

sgtcortez
Copy link
Contributor

@sgtcortez sgtcortez commented Dec 30, 2021

Add new option(-P <pid>) to show only traffic about process that the user wants to.
Other processes are caught as unknown tcp/udp

  • Update the manual page. I also added a note section that mentions about the behavior of nethogs when the watched process exit.
  • Update the help message.
  • Add code to let the user filter processes by pid.
  • Tested on Freebsd .

@sgtcortez sgtcortez mentioned this pull request Dec 30, 2021
src/main.cpp Show resolved Hide resolved
src/process.cpp Outdated Show resolved Hide resolved
src/process.cpp Outdated Show resolved Hide resolved
src/process.cpp Outdated Show resolved Hide resolved
@sgtcortez
Copy link
Contributor Author

Hi @raboof, any thoughts?

Copy link
Owner

@raboof raboof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments here and there for your consideration, but LGTM. LMK when you're happy and this can be merged.

doc/nethogs.8 Outdated Show resolved Hide resolved
doc/nethogs.8 Outdated Show resolved Hide resolved
src/main.cpp Show resolved Hide resolved
src/process.cpp Outdated Show resolved Hide resolved
src/process.cpp Outdated Show resolved Hide resolved
src/process.cpp Show resolved Hide resolved
src/process.cpp Outdated Show resolved Hide resolved
src/process.cpp Outdated Show resolved Hide resolved
@sgtcortez sgtcortez marked this pull request as ready for review February 28, 2022 23:37
It is possible to filter by process id!
Add the -P <pid> flag.
Example: `nethogs -P 123 -P 333` to filter the processes: 123 and 333
@sgtcortez
Copy link
Contributor Author

Hi, @raboof sorry for being so late ...

Could you please take a look, I have applied your suggestions ...

Copy link
Owner

@raboof raboof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@raboof raboof merged commit 358f445 into raboof:main Mar 2, 2022
@sgtcortez sgtcortez deleted the feat-process-filter branch March 2, 2022 13:34
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

Successfully merging this pull request may close these issues.

None yet

2 participants