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

procs or cpu-usage: Check for cpu usage of specific processes #753

Open
asltbbg opened this issue Apr 4, 2024 · 5 comments
Open

procs or cpu-usage: Check for cpu usage of specific processes #753

asltbbg opened this issue Apr 4, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@asltbbg
Copy link

asltbbg commented Apr 4, 2024

Describe the solution you'd like

It would be nice if the proc check would have the feature to check for problems with the cpu usage and throws warnings
like the memory usage.

Maybe 2 switces:

--warning-cpu-percent
--critical-cpu-percent

Additional context

No response

@asltbbg asltbbg added the enhancement New feature or request label Apr 4, 2024
@markuslf
Copy link
Member

markuslf commented Apr 4, 2024

What about https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/cpu-usage and its output like this?

2.7% - user: 1.4%, system: 0.6%, irq: 0.4%, guest: 0.3%, iowait: 0.2%, softirq: 0.1%
guest_nice: 0.0%, nice: 0.0%, steal: 0.0%
ctx_switches: 601.1M, interrupts: 428.6M, soft_interrupts: 184.1M

Top 5 processes using the most cpu time:
1. WebExtensions: 2h 44m
2. morgen: 2h 28m
3. firefox: 2h 10m
4. qemu-system-x86_64: 1h 46m
5. gnome-shell: 1h 42m

@asltbbg
Copy link
Author

asltbbg commented Apr 4, 2024

yes we are using this currently as a workarround.

with the proc check you are able to monitor one specific process. its mostly one known process which is anoing.

the cpu_usage monitors all processes and you have to pic the troublemaker in the list by locking manualy.

@markuslf
Copy link
Member

markuslf commented Apr 4, 2024

And how should a switch like --warning-cpu in procs behave if you monitor more than one or all procs?

@asltbbg
Copy link
Author

asltbbg commented Apr 4, 2024

i think for this case the cpu_usage check is good enough
maybe it is also a good idee to include this feature for monitoring a choosen process by name in the cpu_usage check instead in the proc check?

@markuslf
Copy link
Member

markuslf commented Apr 4, 2024

I get the point, we'll think about it. Thank you for your input. 👍

@markuslf markuslf changed the title procs: ability check for cpu usage procs or cpu-usage: ability check for cpu usage Apr 4, 2024
@markuslf markuslf changed the title procs or cpu-usage: ability check for cpu usage procs or cpu-usage: Check for cpu usage of specific processes Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants