mirror of
https://github.com/shirou/gopsutil.git
synced 2025-05-02 22:17:08 +08:00
commit
faf242fefc
@ -33,6 +33,7 @@ const (
|
|||||||
type MemoryInfoExStat struct {
|
type MemoryInfoExStat struct {
|
||||||
RSS uint64 `json:"rss"` // bytes
|
RSS uint64 `json:"rss"` // bytes
|
||||||
VMS uint64 `json:"vms"` // bytes
|
VMS uint64 `json:"vms"` // bytes
|
||||||
|
HWM uint64 `json:"hwm"` . // bytes
|
||||||
Shared uint64 `json:"shared"` // bytes
|
Shared uint64 `json:"shared"` // bytes
|
||||||
Text uint64 `json:"text"` // bytes
|
Text uint64 `json:"text"` // bytes
|
||||||
Lib uint64 `json:"lib"` // bytes
|
Lib uint64 `json:"lib"` // bytes
|
||||||
@ -1083,6 +1084,13 @@ func (p *Process) fillFromStatusWithContext(ctx context.Context) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
p.memInfo.Swap = v * 1024
|
p.memInfo.Swap = v * 1024
|
||||||
|
case "VmHWM":
|
||||||
|
value := strings.Trim(value, " kB") // remove last "kB"
|
||||||
|
v, err := strconv.ParseUint(value, 10, 64)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
p.memInfo.HWM = v * 1024
|
||||||
case "VmData":
|
case "VmData":
|
||||||
value := strings.Trim(value, " kB") // remove last "kB"
|
value := strings.Trim(value, " kB") // remove last "kB"
|
||||||
v, err := strconv.ParseUint(value, 10, 64)
|
v, err := strconv.ParseUint(value, 10, 64)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user