:
It returns the consume percentage, pid and name of the process that is consume more than the 90% of the CPU
Module data
module_begin
module_name Processes high CPU (%, PID, name)
module_type generic_data_string
module_exec core=$(nproc) && ps -eo pcpu,pid,comm |sort -n | grep -v CPU | tail -1 | awk -v "var=$core" '{if ($1/var>90) print $1/var "%" " " $2 " " $3; else print "NA"}' | tr -d "n"
module_description PID Processes > 90% CPU
module_end
(Visited 594 times, 1 visits today)

