Commit Graph

4 Commits (539c0d52c022dd05770517674d4f0cd3eaa311da)

Author SHA1 Message Date
Lomanic 6589c5c274 [cpu][linux] Fix #1037 only count logical cores where 2nd field is a number 4 years ago
Tobias Klauser ee12f66e4d cpu, v3/cpu: use sysconf package instead of exec'ing getconf
Currently, ClocksPerSec is determined by exec'ing getconf in func init,
i.e. on startup of every program importing the package. getconf might
not be present on some systems or is not executable by the current user.
To avoid this hard to control dependency, use the
github.com/tklauser/go-sysconf package which implements sysconf(3)
entirely in Go without cgo. The package is supported on all platforms
currently supported by the cpu and v3/cpu package of gopsutil.
4 years ago
Lomanic 976679ee00 [cpu][linux] Get logical cores in Counts() with non-deprecated kernel API first
Implementing https://github.com/giampaolo/psutil/pull/1727#issuecomment-707624964
and bfae1fc4a3
4 years ago
shirou 005a35c436 [v3 migartion] add v3 sourcodes, and change disk.opts to []string 4 years ago