Commit Graph

633 Commits

Author SHA1 Message Date
Shirou WAKAYAMA d6ac361a24 process[darwin,linux]: implements Parent using lsof. 2015-09-16 13:06:07 +09:00
Shirou WAKAYAMA eb7739a6a5 process: forget to add guard. 2015-09-16 12:10:39 +09:00
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.
2015-09-16 11:58:02 +09:00
shirou 026d4a3519 Merge pull request #75 from jinto/jinto
Detect error in CPUTimes fails on callPs, and modify comments on ReadLines
2015-09-13 21:05:06 +09:00
jay park 2984accfa1 return error when CPUTimes fails on callPs, modify comments on ReadLines 2015-09-13 13:05:09 +09:00
Shirou WAKAYAMA a00c5af817 process[linux]: return up-to-date information when invoked. 2015-09-11 15:54:10 +09:00
shirou e10ccf9971 Merge pull request #74 from choplin/patch-2
Ensure that process.MemoryInfo returns a up-to-date value.
2015-09-11 14:22:35 +09:00
choplin cc3a104593 Ensure that process.MemoryInfo returns a up-to-date value. 2015-09-11 13:47:03 +09:00
Shirou WAKAYAMA 6bb6762470 net[darwin]: add drop count to NetIOCounter. 2015-09-11 12:18:33 +09:00
Shirou WAKAYAMA e0b1d62a4d net[darwin]: add netstat -idbn example in the comment. 2015-09-11 11:24:03 +09:00
shirou b1a9b3a5f3 Merge pull request #73 from influxdb/net-darwin-fix
Fix net stat reporting for Darwin
2015-09-11 11:22:27 +09:00
Cameron Sparr c57e866f91 Fix net stat reporting for Darwin 2015-09-10 13:53:53 -06:00
WAKAYAMA Shirou 773d9d3caa disk[windows]: change to use WMI to get disk io counter information. 2015-09-05 22:53:18 +09:00
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
2015-09-05 21:45:53 +09:00
shirou 502be48c80 Merge pull request #71 from vrecan/patch-1
Fix cpu percent on windows
2015-09-05 21:37:56 +09:00
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.
2015-09-04 18:48:20 -06:00
Ben Aldrich 0fab61e73e remove log message 2015-09-04 13:41:08 -06:00
Ben Aldrich 6c000b035d don't fail if cd is not in a drive
add used and usedPercent back in
2015-09-04 11:51:34 -06:00
WAKAYAMA Shirou 5c8a03100e process[windows]: take common function to get Win32_Processes. 2015-09-03 22:07:24 +09:00
WAKAYAMA Shirou cbd943016a process[windows]: implement CreateTime. 2015-09-03 21:59:24 +09:00
WAKAYAMA Shirou 4696985e84 cpu[windows]: skip if could not get cpu.LoadPercentage. 2015-09-03 21:48:18 +09:00
WAKAYAMA shirou bb04b692c3 disk[freebsd]: update devstat mib. 2015-09-03 10:38:21 +09:00
WAKAYAMA shirou 6365c902e7 disk[freebsd]: fix typo. 2015-09-03 09:49:48 +09:00
shirou af29b38440 Merge pull request #69 from vrecan/fix_build
Fix windows compile issues
2015-09-03 09:30:59 +09:00
Ben Aldrich 85a89e707b fix compile fail 2015-09-02 11:27:47 -06:00
Shirou WAKAYAMA 47f6760cf3 cpu[darwin]: use CGO to get CPUTimes. This is breaking. see #66. 2015-08-28 17:01:43 +09:00
shirou 3c958a8ee6 Merge pull request #60 from mayowa/master
Bug fix and HostStatInfo.Platform* windows implementation
2015-08-28 16:26:02 +09:00
mayowa bf16d0a6a7 modified PlatformVersion and PlatformFamily string to (somewhat) match the output from sysinfo 2015-08-28 07:39:20 +01:00
mayowa 6fa0704dbf fixed: ProcessorId doesnt return a value 2015-08-28 06:56:05 +01:00
shirou 3a625ab13f Merge pull request #64 from influxdb/master
Fix memory reporting for linux systems
2015-08-28 07:45:56 +09:00
Cameron Sparr 1a037fddb1 Fix disk usage stats for windows 2015-08-27 09:51:03 -06:00
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!
2015-08-27 09:41:19 -06:00
Shirou WAKAYAMA 0d7ff2eb40 cpu[darwin]: convert cpu frequency to Mhz. 2015-08-27 15:50:35 +09:00
shirou b1a93c4e33 Merge pull request #61 from cbednarski/f-darwin-cpu
Read Darwin CPU frequency from sysctl hw.cpufrequency
2015-08-27 15:47:26 +09:00
Chris Bednarski d5fa4f880f Read Darwin CPU frequency from sysctl hw.cpufrequency 2015-08-26 11:45:09 -07:00
mayowa ee43e655c2 implemented GetPlatformInfo and refactored HostInfo() to use it 2015-08-25 23:27:25 -07:00
mayowa 56d70ecc5e implemented HostStatInfo.Platform* for windows 2015-08-25 23:03:25 -07:00
mayowa 7889ce3e03 changed ProccessorId type to *string, cause wmi sometimes returns nil for it 2015-08-25 22:21:10 -07:00
mayowa 6a2bc5afe8 removed l2CacheSize as its not present in all wmi databases 2015-08-25 22:08:35 -07:00
shirou c715bd1b0b Merge pull request #59 from mjkim/master
return value of "sysctl hw.memsize" is memory size in bytes.
2015-08-16 21:40:38 +09:00
Myungjun Kim c5b94d3e4c memory[darwin]: return value of "sysctl hw.memsize" is memory size in bytes. 2015-08-16 16:32:53 +09:00
WAKAYAMA shirou c64c974c1a Merge branch 'master' of github.com:shirou/gopsutil 2015-08-15 01:21:27 +09:00
WAKAYAMA shirou abb4086531 host[freebsd]: change to use utmpx for 9.0 or later. 2015-08-15 01:20:56 +09:00
Shirou WAKAYAMA 59c4b4ca75 disk[linux]: fix fstype map. 2015-08-14 20:37:35 +09:00
Shirou WAKAYAMA 7fb126f1bf disk[linux]: fix fstype dup. 2015-08-14 18:18:34 +09:00
Shirou WAKAYAMA ad6c3f60a7 disk[freebsd,darwin,windows]: add fstype to DiskUsageStat. 2015-08-14 18:08:43 +09:00
Shirou WAKAYAMA 1223e28905 docker[linux]: change docker error valiable and add cgroup error. 2015-08-07 10:16:06 +09:00
shirou a365e17869 Merge pull request #58 from influxdb/docker-non-linux
Allow gopsutil docker to build on non-linux boxes by stubbing out non…
2015-08-07 07:56:35 +09:00
Cameron Sparr 7a2d225b30 Allow gopsutil docker to build on non-linux boxes by stubbing out non-linux libraries 2015-08-05 10:19:36 -06:00
Shirou WAKAYAMA cbe10d6761 cpu[darwin]: move helper path to under the HOME dir. 2015-07-29 22:25:42 +09:00