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

Feature Request: Filter to show only certain sub tree(s) #76

Open
BenBE opened this issue Sep 2, 2020 · 10 comments
Open

Feature Request: Filter to show only certain sub tree(s) #76

BenBE opened this issue Sep 2, 2020 · 10 comments
Labels
new feature Completely new feature

Comments

@BenBE
Copy link
Member

BenBE commented Sep 2, 2020

Repost from: hishamhm/htop#836

Short Description:
Allow the user to select some processes/threads of interest and after activating the filter view only show those or any children.

Detailed explanation in hishamhm/htop#836 (comment)

@fasterit fasterit added the Hacktoberfest Issues for DigitalOcean Hacktoberfest label Oct 5, 2020
@layderv
Copy link
Contributor

layderv commented Oct 6, 2020

Hi. I implemented the solution in the most upvoted comment in the link above. See #219

@layderv
Copy link
Contributor

layderv commented Oct 16, 2020

Can this be closed?

@BenBE
Copy link
Member Author

BenBE commented Oct 16, 2020

The intention of the original feature request was for more or less free selection (space bar) for the trees to show after filtering. So the basic infrastructure to have this is there, but if I remember the patchset correctly it's currently bound to some explicit filter string.

@fasterit fasterit removed the Hacktoberfest Issues for DigitalOcean Hacktoberfest label Nov 15, 2020
@BenBE BenBE added the new feature Completely new feature label Dec 16, 2020
@singalen
Copy link

I would appreciate even more if I could set a parent process PID on a command line.

@ashamza
Copy link

ashamza commented Dec 21, 2020

I wanted to do something that's similar to this FR. I wanted to add a feature to include children and/or parents for a process when filter. A use case for it is when using a tmux/screen session on a busy server when usually I am interested in processes that's running on those sessions instead of everything.

I have made hishamhm/htop#973 (comment) to show what I was looking for. Is this already fixed? is it possible now to have such a filter?

@singalen
Copy link

It doesn't look like the current filter supports it.

@poetaman
Copy link

poetaman commented Jul 21, 2021

@BenBE Btw, something struck me regarding this. Given the top pane shows CPU activity, etc it would be nice to have a keybinding to toggle between viewing the active filter and unfiltered (default) view. That would be useful if user sees unusual activity, and wants to toggle back to unfiltered view without having to close htop and reopen it.

@BenBE
Copy link
Member Author

BenBE commented Jul 21, 2021

Such a key binding should probably best go into its own issue, as that's not directly part of this issue. But it has its merits.

@yurenchen000
Copy link

yurenchen000 commented Nov 26, 2022

I wanted to do something that's similar to this FR. I wanted to add a feature to include children and/or parents for a process when filter. A use case for it is when using a tmux/screen session on a busy server when usually I am interested in processes that's running on those sessions instead of everything.

I have made hishamhm/htop#973 (comment) to show what I was looking for. Is this already fixed? is it possible now to have such a filter?

That's exactly what I'm looking for. 👍 👍

When I do F4 Filter, I wanna know not only the matched process but also its parent or children,
So that I can clearly know where I am.
//Imagine a bunch of bash processes but you can't tell them apart.


Before this I could only do F3 Search again and again, to navigate to each match, and mark it by c.
The pain is that Search keyword can't keep during mark the process, So I have to input the search keyword again and again.
//seem it's not able to leave search input but keep search keyword, just like focus switch in other GUI programs.

until today I want to get rid of it.

If the two option (show children, show parent) also in F3 context (toggle anytime) it'll perfect.
and an extra option to highlight/mark matched process, like the c or Space.


Three years later, still not entered the mainline yet?

@yurenchen000
Copy link

Update @ashamza 's patch here PR #1139

Hope someone will consider it.

The effect is not exactly the same as

Repost from: hishamhm/htop#836

Short Description: Allow the user to select some processes/threads of interest and after activating the filter view only show those or any children.

Detailed explanation in hishamhm/htop#836 (comment)

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

No branches or pull requests

7 participants