1. 22 2月, 2016 1 次提交
    • J
      Document + add tests for for mem.VirtualMemory() · 44381591
      Johan Walles 提交于
      This change changes and documents the (previously undocumented) behavior of Used
      to "RAM used by programs".
      
      We also remove the undocumented and unused Shared field of that struct.
      
      So with this change in place, the VirtualMemoryStruct contains:
      * three human-consumable fields for Total, Used and Available memory
      * one human-consumable UsedPercentage field
      * a number of kernel specific fields
      44381591
  2. 21 2月, 2016 2 次提交
  3. 20 2月, 2016 4 次提交
  4. 17 2月, 2016 3 次提交
  5. 12 2月, 2016 16 次提交
  6. 11 2月, 2016 2 次提交
    • S
      Merge pull request #152 from walles/walles/total-cpu-time · 70b7a99f
      shirou 提交于
      Make a public function for computing total CPU time
      70b7a99f
    • J
      Make a public function for computing total CPU time · ebaa641e
      Johan Walles 提交于
      This function used to be a private part of process.go.
      
      Since I needed that functionality however I think it's better to make it public
      than for me to copy it into my own code.
      
      As a side effect of this change, I also fixed a bug in the function where Stolen
      was not part of the sum. Having the function close to the CPUTimesStat
      declaration will make problems like this less likely to re-occur in the future.
      ebaa641e
  7. 10 2月, 2016 2 次提交
  8. 09 2月, 2016 2 次提交
  9. 07 2月, 2016 1 次提交
  10. 06 2月, 2016 1 次提交
    • E
      try to fix diskio stats on FreeBSD-10.x · d1380cba
      elij 提交于
      FreeBSD apparently changed the magic sysctl mib values for devstats.
      
          --- FAIL: TestDisk_io_counters (0.00s)
          disk_test.go:39: error no such file or directory
          disk_test.go:42: ret is empty, map[]
      
      This code uses an undocumented, but exported, go stdlib method to fetch
      the sysctl by string instead of mib.
      d1380cba
  11. 05 2月, 2016 3 次提交
  12. 02 2月, 2016 3 次提交
    • S
      Merge pull request #139 from rburchell/master · cc040ddf
      shirou 提交于
      host_linux: Skip everything that isn't a normal process.
      cc040ddf
    • R
      host_darwin: Use a named constant for USER_PROCESS. · 55cacb47
      Robin Burchell 提交于
      Matches the host_linux change.
      55cacb47
    • R
      host_linux: Skip everything that isn't a normal process. · 3fc7bc1e
      Robin Burchell 提交于
      host_darwin does the same filtering. Not doing this gives us some rather strange
      entries that likely aren't what we want.
      
      Before:
          {"user":"reboot","terminal":"~","host":"3.10.0-327.4.5.el7.x86_64","started":1454378260}
          {"user":"LOGIN","terminal":"ttyS0","host":"","started":1454378270}
          {"user":"LOGIN","terminal":"tty1","host":"","started":1454378270}
          {"user":"runlevel","terminal":"~","host":"3.10.0-327.4.5.el7.x86_64","started":1454378276}
          {"user":"root","terminal":"pts/0","host":"vpn","started":1454404513}
      
      After:
          {"user":"root","terminal":"pts/0","host":"vpn","started":1454404513}
      3fc7bc1e