Filter on process state
Is it possible to filter on process state (state == 'D' for example)? If not, it'd be nice. And is there a meter that'll show the number of processes in each state?
The answer to both of your questions is currently: No.
This feature does not currently exist and the necessary information to make it a meter is not currently counted while gathering information.
This looks like something I can take a look at for hacktoberfest. I'll fork, clone and build (to get started) unless someone objects.
Pointers to "the necessary information" and how to add to what is counted would probably get me off the ground a little quicker.
Thanks!
Step 0: look for contributor guidelines.
Step 0: Read this document
Step 0.5: https://github.com/htop-dev/htop/blob/9c316cc14cafce1097583247710b6d74c1feb505/Process.h#L38-L56 and https://github.com/htop-dev/htop/blob/9c316cc14cafce1097583247710b6d74c1feb505/Process.h#L192
I have not had the time to get to this so I won't be able to complete this work.
I’ll start working on this.
@BenBE just to remind you, this issue also involves a meter showing the number of processes in each state, not just the process state filter.
If you like you can do a second PR for this to create this meter. Be sure to keep changes minimal and streamlined. Counting the number of processes/threads in each state is at most 2 lines when enumerating, one array for the counters (two if split between processes/threads) and a minimal meter to display the results.
Please use a branch distinct from main (that was part of the reason for the fumble yesterday).
If you like you can do a second PR for this to create this meter. Be sure to keep changes minimal and streamlined. Counting the number of processes/threads in each state is at most 2 lines when enumerating, one array for the counters (two if split between processes/threads) and a minimal meter to display the results.
Please use a branch distinct from main (that was part of the reason for the fumble yesterday).
I will do it.
Só agora me toquei que o senhor também é brasileiro, prazer.