diff --git a/proc_stat.go b/proc_stat.go index 06a8d931..3328556b 100644 --- a/proc_stat.go +++ b/proc_stat.go @@ -101,6 +101,12 @@ type ProcStat struct { RSS int // Soft limit in bytes on the rss of the process. RSSLimit uint64 + // The address above which program text can run. + StartCode uint64 + // The address below which program text can run. + EndCode uint64 + // The address of the start (i.e., bottom) of the stack. + StartStack uint64 // CPU number last executed on. Processor uint // Real-time scheduling priority, a number in the range 1 to 99 for processes @@ -177,9 +183,9 @@ func (p Proc) Stat() (ProcStat, error) { &s.VSize, &s.RSS, &s.RSSLimit, - &ignoreUint64, - &ignoreUint64, - &ignoreUint64, + &s.StartCode, + &s.EndCode, + &s.StartStack, &ignoreUint64, &ignoreUint64, &ignoreUint64, diff --git a/proc_stat_test.go b/proc_stat_test.go index 8abd67f6..6cfa1cc4 100644 --- a/proc_stat_test.go +++ b/proc_stat_test.go @@ -55,6 +55,9 @@ func TestProcStat(t *testing.T) { have uint64 }{ {name: "RSS Limit", want: 18446744073709551615, have: s.RSSLimit}, + {name: "Start Code", want: 4194304, have: s.StartCode}, + {name: "End Code", want: 6294284, have: s.EndCode}, + {name: "Start Stack", want: 140736914091744, have: s.StartStack}, {name: "delayacct_blkio_ticks", want: 31, have: s.DelayAcctBlkIOTicks}, } { if test.want != test.have {