Check cpu usage of specific process


Hi everyone,

I’m trying to check the cpu usage of a specific process. I manage to do it for memory usage :

alias_mem_count = check_process process=$ARG1$ “warn=working_set > $ARG2$m” “crit=working_set > $ARG3$m”

What about the cpu usage ? Is there any way to do it with check_process ? or check_cpu ?

Thx for you help. Regards, amans


Perhaps with check_pdh ? I can’t find how to return the Processor Time of a specific process.


I may have found a way but the result is incorrect because of multiple vcpu

./check_nrpe -n -u -H -c check_pdh -a "counter=\Process(CPUSTRES)% Processor Time" OK: \Process(CPUSTRES)% Processor Time = 47|’\Process(CPUSTRES)% Processor Time_value’=47;0;0

How can I do to get the total processor used for a specific process ?



I use this command for CPU Used and CPU Free

cpu_used = CheckCounter -a "Counter:% Processor Used Total=\Processor(_Total)% Processor Time" cpu_free = CheckCounter -a “Counter:% Processor Free Total=\Processor(_Total)% Idle Time”