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

Filter on process state #1544

Open
OlafvdSpek opened this issue Oct 3, 2024 · 4 comments
Open

Filter on process state #1544

OlafvdSpek opened this issue Oct 3, 2024 · 4 comments
Labels
good first issue 🥇 Good for newcomers Hacktoberfest Issues for DigitalOcean Hacktoberfest new feature Completely new feature

Comments

@OlafvdSpek
Copy link

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?

@BenBE
Copy link
Member

BenBE commented Oct 3, 2024

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.

@BenBE BenBE added new feature Completely new feature good first issue 🥇 Good for newcomers Hacktoberfest Issues for DigitalOcean Hacktoberfest labels Oct 3, 2024
@HankB
Copy link

HankB commented Oct 3, 2024

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.

@BenBE
Copy link
Member

BenBE commented Oct 3, 2024

Step 0: Read this document

Step 0.5:

htop/Process.h

Lines 38 to 56 in 9c316cc

/* Core process states (shared by platforms)
* NOTE: The enum has an ordering that is important!
* See processStateChar in process.c for ProcessSate -> letter mapping */
typedef enum ProcessState_ {
UNKNOWN = 1,
RUNNABLE,
RUNNING,
QUEUED,
WAITING,
UNINTERRUPTIBLE_WAIT,
BLOCKED,
PAGING,
STOPPED,
TRACED,
ZOMBIE,
DEFUNCT,
IDLE,
SLEEPING
} ProcessState;
and

htop/Process.h

Line 192 in 9c316cc

ProcessState state;

@HankB
Copy link

HankB commented Oct 26, 2024

I have not had the time to get to this so I won't be able to complete this work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue 🥇 Good for newcomers Hacktoberfest Issues for DigitalOcean Hacktoberfest new feature Completely new feature
Projects
None yet
Development

No branches or pull requests

3 participants