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

Do not show kernel threads by default #206

Open
baryluk opened this issue Jan 23, 2021 · 2 comments
Open

Do not show kernel threads by default #206

baryluk opened this issue Jan 23, 2021 · 2 comments

Comments

@baryluk
Copy link

baryluk commented Jan 23, 2021

On modern systems, especially with a lot of CPU cores, kernel can have a lot of own tasks / threads, that are almost never of interest to casual user, or even expert.

On my system there are 386 (yes!), kernel threads. I have zero interest in any of them, unless something is really really wrong. In which case, I will use other tools than mate-system-monitor to troubleshoot anyway. I still want to see all user space processes (including that of root, and other userspace users / daemons, etc), so I can't just switch to "My processes" only.

It would be good to have option to hide kernel tasks and threads, and enable it by default to not show them. It would also speed up GUI updates quite a bit.

So, instead of showing me 534 processes, the mate-system-monitor will show me now 148 processes, which is quite manageable to scroll, comprehend and update in performant way.

I don't know how procps does detect the kernel threads, but it does, and show them differently (in square brackets). I believe the trick is to do readlink on /proc/<PID>/exe and/or /proc/<PID>/cwd and/or /proc/<PID>/root. If the result is empty string (""), and the uid (from /proc/<PID>/stat or proc/<PID>/status) is 0, then it is a kernel process / task / thread.

@rbuj
Copy link
Contributor

rbuj commented Jan 25, 2021

You can check the option Dependencies, next collapse and expand all trees for grouping kernel processes, kthreadadd in the picture below:

Captura de pantalla a 2021-01-25 23-53-50

@baryluk
Copy link
Author

baryluk commented Jan 26, 2021

You can check the option Dependencies, next collapse and expand all trees for grouping kernel processes, kthreadadd in the picture below:

I don't want to use Dependencies option. I want a flat view.

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

No branches or pull requests

2 participants