Commit Graph

138 Commits

Author SHA1 Message Date
Daniel Theophanes 69221741e8 cpu: allow override of /sys dir. Fix CPUInfo /proc + cpuinfo combine. 2015-10-18 09:46:21 -07:00
Daniel Theophanes ab2cba55ee Merge branch 'master' of https://github.com/shirou/gopsutil into cpu_arm 2015-10-18 09:29:54 -07:00
Daniel Theophanes 9f2e6a74cc cpu: support ARM CPUs.
ARM CPUs don't include the same fields as  x86 and amd64 CPUs in
the /proc/cpuinfo list. Pull information from the /sys/...
device tree as well as updating when a CPU is done in cpuinfo.

Fixes #88
2015-10-17 12:25:18 -07:00
Jonathan Chauncey 0461c50666 chore(*): Fixes #94
Added the ability to fetch an alternative location for /proc via an
environment variable. If the env var is not set it will return /proc as
the default value.
2015-10-17 11:34:41 -06:00
Shirou WAKAYAMA a95dde9672 cpu[darwin]: separetes cpu_darwin to cgo and nocgo to get CPUTimes. 2015-10-10 22:13:38 +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
WAKAYAMA Shirou 4696985e84 cpu[windows]: skip if could not get cpu.LoadPercentage. 2015-09-03 21:48:18 +09: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 6fa0704dbf fixed: ProcessorId doesnt return a value 2015-08-28 06:56:05 +01:00
Shirou WAKAYAMA 0d7ff2eb40 cpu[darwin]: convert cpu frequency to Mhz. 2015-08-27 15:50:35 +09:00
Chris Bednarski d5fa4f880f Read Darwin CPU frequency from sysctl hw.cpufrequency 2015-08-26 11:45:09 -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 WAKAYAMA cbe10d6761 cpu[darwin]: move helper path to under the HOME dir. 2015-07-29 22:25:42 +09:00
Shirou WAKAYAMA c195d77ce3 cpu[darwin]: enable cpu helper only the environemnetal variable set. 2015-07-25 12:49:02 +09:00
Shirou WAKAYAMA 755d3a4119 cpu[darwin]: change default tick to 100. 2015-07-24 15:01:22 +09:00
Shirou WAKAYAMA 12843632ca cpu[darwin]: experimental implemtation to get CPU times on darwin. 2015-07-24 14:49:35 +09:00
Shirou WAKAYAMA 5854011870 cpu: Steal, Guest, and GuestNice are not divided by CPU_TICK. 2015-07-17 22:11:30 +09:00
WAKAYAMA shirou 4bc631921f cpu: fix command output trim problem. 2015-07-17 21:52:43 +09:00
Shirou WAKAYAMA 8c17a750c6 get CLOCK TICK by using getconf. 2015-07-17 21:46:26 +09:00
gwind a750762737 Fix interpretation error about /proc/stat 2015-07-15 16:20:12 +08:00
WAKAYAMA shirou 64357f04e7 use StackExchange/wmi instead of invoking wmic process.
Note: This may not work on some old Windows XP.
2015-04-20 00:05:31 +09:00
WAKAYAMA Shirou 5f8b99aa65 windows: GetWmic returns [][]string where string split by "," 2015-03-20 22:48:58 +09:00
Shirou WAKAYAMA 170390c0df cpu: fix build option on unix. 2015-03-11 23:06:00 +09:00
WAKAYAMA Shirou ead8393137 cpu: use wmic to get CPU usage on Windows. 2015-03-11 23:00:06 +09:00
WAKAYAMA Shirou ec2b509dda cpu: skip percpu percent test if windows. Windows can only get one CPU info currently. 2015-03-07 21:52:43 +09:00
WAKAYAMA Shirou 4694ce0e4d cpu: use wmic to get CPUInfo on Windows 2015-02-15 21:25:33 +09:00
WAKAYAMA shirou b8dc51929a forget to change float32 to float64 2015-02-15 20:48:29 +09:00
Shirou WAKAYAMA 753ea1bb48 fix when converting CPUTimes to JSON, sometimes idel have exponent 2015-02-13 23:11:27 +09:00
Shirou WAKAYAMA 4b5bf22b88 change CPUTimes type from float32 to float64 to resolve precision issue. 2015-02-13 22:45:12 +09:00
Shirou WAKAYAMA 18ab22b6fc cpu: should be divided by CPU_TICK 2015-02-13 14:55:42 +09:00
codeskyblue 3b43a3f496 change cpu_linux.go: on some android, runtime.NumCPU() will not return right number of cpu cores 2015-01-13 18:32:25 +08:00
Shirou WAKAYAMA 13cd195a7e change package name. 2014-12-30 22:09:05 +09:00
Shirou WAKAYAMA 16de570414 merge 039b9defab 2014-12-27 23:42:00 +09:00
WAKAYAMA Shirou 9f2c985a28 fix windows build. 2014-11-27 22:28:05 +09:00
WAKAYAMA shirou d11680c773 fix bugs on FreeBSD. 2014-11-27 10:25:14 +09:00
Shirou WAKAYAMA a4671fcc2a move subdirectories. refer to issue #24 2014-11-27 10:18:15 +09:00