Commit Graph

12 Commits (92e037d58cc4d2b6e62455d19bfb41fce7bded74)

Author SHA1 Message Date
shirou bc060cc227 add SPDX License, remove old build tag, and replace import
mmorel-35 1e6b445a8a gofumpt
James Bebbington 79e9a07263 Add ProcsCreated stat for openbsd
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.
WAKAYAMA shirou 1ba77cdb3d [load] freebsd: change to use x/sys/unix.SysctlRaw.
This implementation is borrowed from NodeExporter.
https://github.com/prometheus/node_exporter/blob/master/collector/loadavg_freebsd.go
Shirou WAKAYAMA 613a8a90e1 fixed by golint.
Shirou WAKAYAMA ea152ea901 [BREAKING CHANGE] rename functions to pass golint. ex) net.NetIOCounters -> net.IOCounters
Shirou WAKAYAMA 821a0141b1 [load]: add comments.
Shirou WAKAYAMA f9effa497e [load]all: add Misc in load to get miscellaneous host info from /proc/stat
Shirou WAKAYAMA 7288e9a5af common[all]: add internal
Shirou WAKAYAMA 13cd195a7e change package name.
Shirou WAKAYAMA a4671fcc2a move subdirectories. refer to issue #24