Hardware::PID::Stat
Inherits Struct / Value / Object
Parse stat initialized at Hadware::PID#stat
pid_stat = Hardware::PID::Stat.new
loop do
sleep 1
p pid_stat.cpu_usage! # => 1.5
end
Constructors
Instance methods
Returns the "cmajflt" stat field.
Returns the "cminflt" stat field.
Returns the CPU time with or without including ones from children processes.
Returns the CPU used in percentage.
pid_stat = Hardware::PID::Stat.new
loop do
sleep 1
p pid_stat.cpu_usage! # => 1.5
end
Returns the "cstime" stat field.
Returns the "cutime" stat field.
Returns the "flags" stat field.
Returns the "itrealvalue" stat field.
Returns the "majflt" stat field.
Returns the "minflt" stat field.
Returns the "nice" stat field.
Returns the "numthreads" stat field.
Returns the "pgrp" stat field.
Generate methods based on stat Returns the "ppid" stat field.
Returns the "priority" stat field.
Returns the "rss" stat field.
Returns the "session" stat field.
Returns the "starttime" stat field.
Returns the "stime" stat field.
Returns the "tpgid" stat field.
Returns the "tty_nr" stat field.
Returns the "utime" stat field.
Returns the "vsize" stat field.