[load]: add comments.

pull/162/head
Shirou WAKAYAMA 9 years ago
parent c973fdbc46
commit 821a0141b1

@ -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 {

@ -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 {

@ -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)

Loading…
Cancel
Save