Skip to content

Commit

Permalink
pmrep conf: fix few pidstat metric formulas
Browse files Browse the repository at this point in the history
utime includes guest_time, %wait formula was completely wrong.

Minor consistency tweak while at it.
  • Loading branch information
myllynen committed Apr 17, 2024
1 parent b9573fb commit 08b9645
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/pmrep/conf/pidstat.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ colxrow = " PID"
proc.id.uid = UID,,,,11
upct = proc.psinfo.cpu.util.user
upct.label = %%usr
upct.formula = 100 * rate(proc.psinfo.utime)
upct.formula = 100 * (rate(proc.psinfo.utime) - rate(proc.psinfo.guest_time))
upct.width = 7
spct = proc.psinfo.cpu.util.sys
spct.label = %%system
Expand All @@ -35,12 +35,11 @@ gpct.formula = 100 * rate(proc.psinfo.guest_time)
gpct.width = 7
wpct = proc.schedstat.waitpct
wpct.label = %%wait
wpct.formula = (rate(proc.schedstat.cpu_time) - rate(proc.schedstat.run_delay)) / rate(proc.schedstat.cpu_time)
wpct.formula = 100 * rate(proc.schedstat.run_delay)
wpct.width = 7
allcpu = proc.psinfo.alltime
allcpu.label = %%CPU
allcpu.formula = 100 * (proc.psinfo.utime + proc.psinfo.stime + proc.psinfo.guest_time)
allcpu.unit = s
allcpu.formula = 100 * (rate(proc.psinfo.utime) + rate(proc.psinfo.stime))
allcpu.width = 7
proc.psinfo.processor = CPU,,,,5
proc.psinfo.cmd = Command,,,,12
Expand Down Expand Up @@ -127,7 +126,7 @@ colxrow = " PID"
proc.id.uid = UID,,,,8
upct = proc.psinfo.cpu.util.user
upct.label = %%usr
upct.formula = 100 * rate(proc.psinfo.utime)
upct.formula = 100 * (rate(proc.psinfo.utime) - rate(proc.psinfo.guest_time))
upct.width = 7
spct = proc.psinfo.cpu.util.sys
spct.label = %%system
Expand All @@ -139,12 +138,11 @@ gpct.formula = 100 * rate(proc.psinfo.guest_time)
gpct.width = 7
wpct = proc.schedstat.waitpct
wpct.label = %%wait
wpct.formula = (rate(proc.schedstat.cpu_time) - rate(proc.schedstat.run_delay)) / rate(proc.schedstat.cpu_time)
wpct.formula = 100 * rate(proc.schedstat.run_delay)
wpct.width = 7
allcpu = proc.psinfo.alltime
allcpu.label = %%CPU
allcpu.formula = 100 * (proc.psinfo.utime + proc.psinfo.stime + proc.psinfo.guest_time)
allcpu.unit = s
allcpu.formula = 100 * (rate(proc.psinfo.utime) + rate(proc.psinfo.stime))
allcpu.width = 7
proc.psinfo.processor = CPU,,,,5
proc.psinfo.cmd = Command,,,,12
Expand Down

0 comments on commit 08b9645

Please sign in to comment.