[process io][linux] add ReadChars and WriteChars to IOCounterStat, collected from /proc/${pid}/io rchar and wchar

pull/673/head
roccowong95 6 years ago
parent 2cbc9195c8
commit 5cfe482ffc

@ -70,6 +70,8 @@ type IOCountersStat struct {
WriteCount uint64 `json:"writeCount"` WriteCount uint64 `json:"writeCount"`
ReadBytes uint64 `json:"readBytes"` ReadBytes uint64 `json:"readBytes"`
WriteBytes uint64 `json:"writeBytes"` WriteBytes uint64 `json:"writeBytes"`
ReadChars uint64 `json:"readChars"`
WriteChars uint64 `json:"writeChars"`
} }
type NumCtxSwitchesStat struct { type NumCtxSwitchesStat struct {

@ -950,6 +950,10 @@ func (p *Process) fillFromIOWithContext(ctx context.Context) (*IOCountersStat, e
ret.ReadBytes = t ret.ReadBytes = t
case "write_bytes": case "write_bytes":
ret.WriteBytes = t ret.WriteBytes = t
case "rchar":
ret.ReadChars = t
case "wchar":
ret.WriteChars = t
} }
} }

Loading…
Cancel
Save