Commit Graph

28 Commits (master)

Author SHA1 Message Date
shirou 37f531010d fix golangcilint errors, ignore gosec G115 7 months ago
shirou bc060cc227 add SPDX License, remove old build tag, and replace import 10 months ago
mmorel-35 1e6b445a8a gofumpt 3 years ago
shirou 0969c9436b delete v2 directory, move v3 to top #1078 3 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
Segflow 86c7289ccc Fix: use filename in exec.LookPath instead of full path
exec.LookPath searches for the file in the $PATH, which mean giving it an absolute path is against it's own purposes.
6 years ago
Lomanic c0ca431bf1 [cpu][linux] Add support for logical arg in Counts #640 #628 6 years ago
shirou 4c73494c78 Add WithContext functions. 7 years ago
Steven Hartland 6450c60b61 Eliminate use of sysctl command on FreeBSD
In order to improve performance and help prevent crashes due to the outstanding fork crash bug:
https://github.com/golang/go/issues/15658

Replace string parsed values from the sysctl command with native reads of sysctl values using unix.SysctlRaw and unix.SysctlUint32.

This also merges OpenBSD and FreeBSD load implementations which are identical.
8 years ago
WAKAYAMA shirou b6da2bd76e [freebsd] cpu: fix CPUInfo on 10.3R
Related: #307
8 years ago
WAKAYAMA Shirou f8ef680a47 error strings change to lowercase 8 years ago
WAKAYAMA shirou eb5bfca902 [cpu]freebsd: cpu.Info() now returns CPUInfos same number as CPU nums. 8 years ago
WAKAYAMA shirou 7783018b9d [cpu]freebsd: CPU.CPU now indicates CPU num instead of MHz. 8 years ago
shirou 5c1bfed855 Merge pull request #219 from sean-/freebsd-cpu-info
Improve FreeBSD's CPU InfoStat collection
9 years ago
Sean Chittenden 14b2ce8b81
Don't be lossy re: CPU model number. 9 years ago
Sean Chittenden 606680edc5
Improve the accuracy of CPU detection on FreeBSD. 9 years ago
Sean Chittenden d2ca7e8d2c
Remove redundant build tag 9 years ago
Shirou WAKAYAMA 57f6aebc7e add Timeout to invoke command and use common.Invoke refs: #201 9 years ago
Shirou WAKAYAMA d21ed2b40d search path via exec.LookPath before actual invoke. 9 years ago
Shirou WAKAYAMA ea152ea901 [BREAKING CHANGE] rename functions to pass golint. ex) net.NetIOCounters -> net.IOCounters 9 years ago
Shirou WAKAYAMA 7288e9a5af common[all]: add internal 10 years ago
WAKAYAMA shirou 4bc631921f cpu: fix command output trim problem. 10 years ago
Shirou WAKAYAMA 8c17a750c6 get CLOCK TICK by using getconf. 10 years ago
WAKAYAMA shirou b8dc51929a forget to change float32 to float64 10 years ago
Shirou WAKAYAMA 4b5bf22b88 change CPUTimes type from float32 to float64 to resolve precision issue. 10 years ago
Shirou WAKAYAMA 13cd195a7e change package name. 10 years ago
WAKAYAMA shirou d11680c773 fix bugs on FreeBSD. 10 years ago
Shirou WAKAYAMA a4671fcc2a move subdirectories. refer to issue #24 10 years ago