Compare commits

...

6 Commits

@ -260,7 +260,7 @@ Some code is ported from Ohai. Many thanks.
|children |x |x |x |x |x |
|connections |x | |x |x | |
|is\_running | | | | | |
|page\_faults |x | | | | |
|page\_faults |x | | | |x |
### gopsutil Original Metrics

@ -652,7 +652,17 @@ func (p *Process) MemoryInfoExWithContext(ctx context.Context) (*MemoryInfoExSta
}
func (p *Process) PageFaultsWithContext(ctx context.Context) (*PageFaultsStat, error) {
return nil, common.ErrNotImplementedError
mem, err := getMemoryInfo(p.Pid)
if err != nil {
return nil, err
}
ret := &PageFaultsStat{
// Since Windows does not distinguish between Major and Minor faults, all faults are treated as Major
MajorFaults: uint64(mem.PageFaultCount),
}
return ret, nil
}
func (p *Process) ChildrenWithContext(ctx context.Context) ([]*Process, error) {

Loading…
Cancel
Save