diff --git a/process/process.go b/process/process.go index 807c85d..a9d10e0 100644 --- a/process/process.go +++ b/process/process.go @@ -77,6 +77,13 @@ type NumCtxSwitchesStat struct { Involuntary int64 `json:"involuntary"` } +type PageFaultsStat struct { + MinorFaults uint64 `json:"minorFaults"` + MajorFaults uint64 `json:"majorFaults"` + ChildMinorFaults uint64 `json:"childMinorFaults"` + ChildMajorFaults uint64 `json:"childMajorFaults"` +} + // Resource limit constants are from /usr/include/x86_64-linux-gnu/bits/resource.h // from libc6-dev package in Ubuntu 16.10 const ( diff --git a/process/process_linux.go b/process/process_linux.go index a3a7403..00fdd33 100644 --- a/process/process_linux.go +++ b/process/process_linux.go @@ -59,13 +59,6 @@ type MemoryMapsStat struct { Swap uint64 `json:"swap"` } -type PageFaultsStat struct { - MinorFaults uint64 `json:"minorFaults"` - MajorFaults uint64 `json:"majorFaults"` - ChildMinorFaults uint64 `json:"childMinorFaults"` - ChildMajorFaults uint64 `json:"childMajorFaults"` -} - // String returns JSON value of the process. func (m MemoryMapsStat) String() string { s, _ := json.Marshal(m)