Skip to content

Commit

Permalink
Add support for gtime and cgtime stats. (#597)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Barrett <tbarrett@crusoeenergy.com>
Co-authored-by: Thomas Barrett <tbarrett@crusoeenergy.com>
  • Loading branch information
thomasbarrett and Thomas Barrett committed Feb 15, 2024
1 parent f5f033b commit d254b01
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions proc_stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ type ProcStat struct {
Policy uint
// Aggregated block I/O delays, measured in clock ticks (centiseconds).
DelayAcctBlkIOTicks uint64
// Guest time of the process (time spent running a virtual CPU for a guest
// operating system), measured in clock ticks.
GuestTime int
// Guest time of the process's children, measured in clock ticks.
CGuestTime int

proc FS
}
Expand Down Expand Up @@ -189,6 +194,8 @@ func (p Proc) Stat() (ProcStat, error) {
&s.RTPriority,
&s.Policy,
&s.DelayAcctBlkIOTicks,
&s.GuestTime,
&s.CGuestTime,
)
if err != nil {
return ProcStat{}, err
Expand Down

0 comments on commit d254b01

Please sign in to comment.