diff --git a/load/load_darwin.go b/load/load_darwin.go index 2b2fe7d..a603750 100644 --- a/load/load_darwin.go +++ b/load/load_darwin.go @@ -38,6 +38,11 @@ func LoadAvg() (*LoadAvgStat, error) { return ret, nil } + +// Misc returnes miscellaneous host-wide statistics. +// darwin use ps command to get process running/blocked count. +// Almost same as FreeBSD implementation, but state is different. +// U means 'Uninterruptible Sleep'. func Misc() (*MiscStat, error) { bin, err := exec.LookPath("ps") if err != nil { diff --git a/load/load_freebsd.go b/load/load_freebsd.go index 814eb4a..cd85085 100644 --- a/load/load_freebsd.go +++ b/load/load_freebsd.go @@ -38,6 +38,9 @@ func LoadAvg() (*LoadAvgStat, error) { return ret, nil } +// Misc returnes miscellaneous host-wide statistics. +// darwin use ps command to get process running/blocked count. +// Almost same as Darwin implementation, but state is different. func Misc() (*MiscStat, error) { bin, err := exec.LookPath("ps") if err != nil { diff --git a/load/load_linux.go b/load/load_linux.go index 4d437a8..e2b8c56 100644 --- a/load/load_linux.go +++ b/load/load_linux.go @@ -41,6 +41,9 @@ func LoadAvg() (*LoadAvgStat, error) { return ret, nil } + +// Misc returnes miscellaneous host-wide statistics. +// Note: the name should be changed near future. func Misc() (*MiscStat, error) { filename := common.HostProc("stat") out, err := ioutil.ReadFile(filename)