Commit Graph

15 Commits

Author SHA1 Message Date
James Rasell
3bffe443ac chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
Tim Gross
14568b3e00 deps: bump gopsutil to v3.21.2 2021-03-30 16:02:51 -04:00
Charlie Voiselle
b2fe392cfb Extend timeout based on user feedback
Closes https://github.com/hashicorp/nomad/issues/4439.
2018-06-21 15:27:56 -04:00
Charlie Voiselle
41b71b6138 Added deferred cancel to prevent context leaks 2018-05-10 18:52:54 -04:00
Charlie Voiselle
43765af758 Merge branch 'master' into b-extend-win-cpu-fingerprint-timeout 2018-05-09 16:23:14 -04:00
Charlie Voiselle
2220b12446 Addressed review comments 2018-05-09 13:21:35 -04:00
Charlie Voiselle
db19b177ad Override 3 sec. WMI timeout in gopsutil
The default timeout is too short for some overburdened or resource
constrained machines to complete the WMI query before the context
deadline expires.  This causes them to be unable to fingerprint the CPU
properly.
2018-05-08 17:00:31 -04:00
Charlie Voiselle
c648159521 Fix the CPU Information error message
The new version of gopsutil introduces a 3 second timeout that could come up as an error here; however, we are outputting the wrong variable and eating the error.
2018-05-08 14:11:29 -04:00
Alex Dadgar
d15bb76538 Refactor 2018-02-15 13:59:00 -08:00
Michael Schurter
887c7b0bfb Don't fail on first error detecting cpu stats
Since cpu.Counts() never returns an error this doesn't functionally
change anything today.
2017-07-03 14:51:02 -07:00
Alex Dadgar
36dc330737 Various fixes
This PR:
* Uses Go 1.8 executable lookup
* Stores any err message from stats init method
* Allows overriding of Cpu Compute for hosts where it can't be detected
2017-03-14 12:56:31 -07:00
Alex Dadgar
d87d988491 Floor CPU MHz and total compute and mark hostname as unique 2016-06-22 15:01:36 -07:00
Sean Chittenden
e26606acfd Memoize the CPU stats. Error if CPU fingerprinting fails. 2016-06-17 12:13:53 -07:00
Diptanu Choudhury
d1fdd27f86 Moving the clkspeed code to helper 2016-06-11 17:31:49 +02:00
Diptanu Choudhury
17a0e30068 Checking in the stats helper package 2016-06-10 23:46:33 +02:00