Commit Graph

1135 Commits (97b2ed891d75a1ec2758b6b659d22072e4a113fa)
 

Author SHA1 Message Date
Shirou WAKAYAMA 8d21be591e net[linux]: implements NetConnections() using lsof.
Shirou WAKAYAMA c50db4f462 net[darwin]: implement NetConnections().
Shirou WAKAYAMA d6ac361a24 process[darwin,linux]: implements Parent using lsof.
Shirou WAKAYAMA eb7739a6a5 process: forget to add guard.
Shirou WAKAYAMA fc513b6f9a proces[darwin]: change exec.Command to interface to enable mocking.
Add common.invoker interface to mock exec.Command. common.FakeInvoker returns
expected file if exists instead of invoke exec.Command.
Currenly, mocking is enabled only process.Pids(). I will expand to other funcs incrementally.
shirou 026d4a3519 Merge pull request #75 from jinto/jinto
Detect error in CPUTimes fails on callPs, and modify comments on ReadLines
jay park 2984accfa1 return error when CPUTimes fails on callPs, modify comments on ReadLines
Shirou WAKAYAMA a00c5af817 process[linux]: return up-to-date information when invoked.
shirou e10ccf9971 Merge pull request #74 from choplin/patch-2
Ensure that process.MemoryInfo returns a up-to-date value.
choplin cc3a104593 Ensure that process.MemoryInfo returns a up-to-date value.
Shirou WAKAYAMA 6bb6762470 net[darwin]: add drop count to NetIOCounter.
Shirou WAKAYAMA e0b1d62a4d net[darwin]: add netstat -idbn example in the comment.
shirou b1a9b3a5f3 Merge pull request #73 from influxdb/net-darwin-fix
Fix net stat reporting for Darwin
Cameron Sparr c57e866f91 Fix net stat reporting for Darwin
WAKAYAMA Shirou 773d9d3caa disk[windows]: change to use WMI to get disk io counter information.
shirou 20ad984599 Merge pull request #70 from vrecan/win_disk
DiskPartitions Fails if cd not in drive And used and usedPercent are missing in windows
shirou 502be48c80 Merge pull request #71 from vrecan/patch-1
Fix cpu percent on windows
Ben Aldrich a4ec4177a6 Fix cpu percent on windows
Tested on windows 7:

When divided by 100 you get cpu percentage of  %0.14 when task manager shows %14. Once this is removed they match.
Ben Aldrich 0fab61e73e remove log message
Ben Aldrich 6c000b035d don't fail if cd is not in a drive
add used and usedPercent back in
WAKAYAMA Shirou 5c8a03100e process[windows]: take common function to get Win32_Processes.
WAKAYAMA Shirou cbd943016a process[windows]: implement CreateTime.
WAKAYAMA Shirou 4696985e84 cpu[windows]: skip if could not get cpu.LoadPercentage.
WAKAYAMA shirou bb04b692c3 disk[freebsd]: update devstat mib.
WAKAYAMA shirou 6365c902e7 disk[freebsd]: fix typo.
shirou af29b38440 Merge pull request #69 from vrecan/fix_build
Fix windows compile issues
Ben Aldrich 85a89e707b fix compile fail
Shirou WAKAYAMA 47f6760cf3 cpu[darwin]: use CGO to get CPUTimes. This is breaking. see #66.
shirou 3c958a8ee6 Merge pull request #60 from mayowa/master
Bug fix and HostStatInfo.Platform* windows implementation
mayowa bf16d0a6a7 modified PlatformVersion and PlatformFamily string to (somewhat) match the output from sysinfo
mayowa 6fa0704dbf fixed: ProcessorId doesnt return a value
shirou 3a625ab13f Merge pull request #64 from influxdb/master
Fix memory reporting for linux systems
Cameron Sparr 1a037fddb1 Fix disk usage stats for windows
Cameron Sparr ce70817f55 Fix memory reporting for linux systems
/proc/meminfo reports memory in KiloBytes and so needs a multiplier of
1024 instead of 1000.
The kernel reports in terms of pages and the proc filesystem is left
shifting by 2 for 4KB pages to get KB. Since this is a binary shift,
Bytes will need to shift by 10 and so get multiplied by 1024.

From the kernel code. PAGE_SHIFT = 12 for 4KB pages
"MemTotal:       %8lu kB\n", K(i.totalram)

Thanks to @subhachandrachandra!
Shirou WAKAYAMA 0d7ff2eb40 cpu[darwin]: convert cpu frequency to Mhz.
shirou b1a93c4e33 Merge pull request #61 from cbednarski/f-darwin-cpu
Read Darwin CPU frequency from sysctl hw.cpufrequency
Chris Bednarski d5fa4f880f Read Darwin CPU frequency from sysctl hw.cpufrequency
mayowa ee43e655c2 implemented GetPlatformInfo and refactored HostInfo() to use it
mayowa 56d70ecc5e implemented HostStatInfo.Platform* for windows
mayowa 7889ce3e03 changed ProccessorId type to *string, cause wmi sometimes returns nil for it
mayowa 6a2bc5afe8 removed l2CacheSize as its not present in all wmi databases
shirou c715bd1b0b Merge pull request #59 from mjkim/master
return value of "sysctl hw.memsize" is memory size in bytes.
Myungjun Kim c5b94d3e4c memory[darwin]: return value of "sysctl hw.memsize" is memory size in bytes.
WAKAYAMA shirou c64c974c1a Merge branch 'master' of github.com:shirou/gopsutil
WAKAYAMA shirou abb4086531 host[freebsd]: change to use utmpx for 9.0 or later.
Shirou WAKAYAMA 59c4b4ca75 disk[linux]: fix fstype map.
Shirou WAKAYAMA 7fb126f1bf disk[linux]: fix fstype dup.
Shirou WAKAYAMA ad6c3f60a7 disk[freebsd,darwin,windows]: add fstype to DiskUsageStat.
Shirou WAKAYAMA 1223e28905 docker[linux]: change docker error valiable and add cgroup error.
shirou a365e17869 Merge pull request #58 from influxdb/docker-non-linux
Allow gopsutil docker to build on non-linux boxes by stubbing out non…