mmorel-35
1e6b445a8a
gofumpt
2021-12-22 21:54:41 +00:00
mmorel-35
eb5f6203d8
gofmt
2021-12-22 21:46:33 +00:00
shirou
d2e27c1712
fix dependabot v2 deletion.
2021-12-01 00:12:55 +00:00
shirou
0969c9436b
delete v2 directory, move v3 to top #1078
2021-11-30 23:47:59 +00:00
shirou
0fdf65fa3e
Change to use yusufpapurcu/wmi from StackExchange/wmi.
2021-11-20 11:36:30 +00:00
Huan Wang
6a572952f0
fix slow cpuinfo on multisocket config
...
updated win32_Processor struct to exclude loadpercentage field.
The loadpercentage takes linearly more time as the # of sockets
increases. By default vSphere maps 1 vCPU to 1 socket, resulting in very
poor performance when getting CPU info against, saying, 40 vCPU VM
(basically 40 sockets as seen by the VM).
2021-06-14 22:00:22 -06:00
renaynay
0e9462eed2
renamed CLK_TCK variables for consistency across OSs
2020-05-12 15:36:18 +02:00
Lomanic
71adb75383
[cpu][windows] Add support for logical arg in Counts #640 #628
2019-08-14 23:52:41 +02:00
Lomanic
e6aa38bec2
[cpu][windows] WIP Add support for logical arg in Counts #640 #628
2019-08-14 23:35:31 +02:00
Lomanic
c0ca431bf1
[cpu][linux] Add support for logical arg in Counts #640 #628
2019-03-03 14:44:21 +01:00
nikita-vanyasin
59b002e5c2
Fix function naming
2019-02-22 11:19:56 +03:00
nikita-vanyasin
4ef0ddafc7
Eliminate WMI queries when calling cpu.Times with percpu=True
...
based on e89f2c5fad/internal/monitors/cpu/cpu_windows.go
2019-02-22 09:51:24 +03:00
marcospedreiro
d47801b68b
revert imports
2018-11-19 22:06:05 -08:00
marcospedreiro
3cc34ebf18
windows cpu time (true) should return cpu time not percentages
2018-11-19 21:51:27 -08:00
marcospedreiro
45aeaebda5
test windows cpu.Time(true) returning time instead of percentages
2018-11-18 22:30:47 -08:00
Lomanic
79f8a73e23
Fix #551 Filter out '_Total' results from PerfInfoWithContext and unexport this function
...
Also propagate context in perCPUTimes (renamed to perCPUTimesWithContext)
and unexport Win32_PerfFormattedData_Counters_ProcessorInformation.
2018-11-05 12:28:39 +01:00
shirou
32a44bdc39
Merge pull request #488 from sadag/master
...
windows: fix WithContext functions
2018-02-14 21:00:39 +09:00
shirou
9a74b6fe2e
[cpu]windows: fix retrun value.
2018-02-13 22:21:27 +09:00
sada
8dd42707e2
windows: fix WithContext functions
...
set timeout only if parent context doesn't set.
2018-02-12 13:26:17 -08:00
Jaime Fullaondo
178e5ce997
[host] fix race condition to ret
2018-02-12 15:46:11 +01:00
shirou
4c73494c78
Add WithContext functions.
2017-12-31 15:25:49 +09:00
leaf
65598d98cc
To prevent hang if wmi.Query hangs, add a context-aware wrapper for it.
2017-11-20 10:13:27 -08:00
HeChuan
c818f7b647
set win cpu total name to "cpu-total"
...
set the name of windows cpu total percent to "cpu-total"
keep the same with Linux, Freebsd system
2017-07-20 11:47:15 +08:00
shirou
3dd8bd46d9
Merge pull request #376 from ContinuumLLC/win_percpu_feature
...
Windows: Read processor performance metrics overall, per cpu and per core
2017-06-05 22:30:45 +09:00
Rajkumar Gupta
b657e83fed
Added comments for structs and functions
2017-06-05 15:46:35 +05:30
Rajkumar Gupta
2d2db4203f
Change to adapt current cpu.Times API for per cpu and core time stats
2017-06-05 14:18:20 +05:30
Sean Chittenden
635b971c0e
Move from the `syscall` package to the `golang.org/x/sys/{unix,windows}`
2017-06-02 13:51:00 -07:00
Rajkumar Gupta
ea683cd370
Read processor performance metrics per cpu and per core
2017-05-25 17:54:43 +05:30
Hilko Bengen
832dcb96c8
cpu.Percent (Windows): Use the same implementation as on Unix
...
WMI is way too slow.
2016-09-27 18:15:05 +02:00
Shirou WAKAYAMA
613a8a90e1
fixed by golint.
2016-04-01 21:34:39 +09:00
Shirou WAKAYAMA
ea152ea901
[BREAKING CHANGE] rename functions to pass golint. ex) net.NetIOCounters -> net.IOCounters
2016-03-22 23:09:12 +09:00
Shirou WAKAYAMA
7288e9a5af
common[all]: add internal
2015-10-20 00:04:57 +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
mayowa
6fa0704dbf
fixed: ProcessorId doesnt return a value
2015-08-28 06:56:05 +01: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
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
4694ce0e4d
cpu: use wmic to get CPUInfo on Windows
2015-02-15 21:25:33 +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
13cd195a7e
change package name.
2014-12-30 22:09:05 +09:00
WAKAYAMA Shirou
9f2c985a28
fix windows build.
2014-11-27 22:28:05 +09:00
Shirou WAKAYAMA
a4671fcc2a
move subdirectories. refer to issue #24
2014-11-27 10:18:15 +09:00