Commit Graph

13 Commits

Author SHA1 Message Date
Max Altgelt 3ce14ac1bb
chore: Update golang.org/x/sys to NTStatus support
Update the requested version for golang.org/x/sys to the commit
that introduces support for NTStatus which is now used.
2021-07-22 07:53:12 +02:00
Tobias Klauser 25b4a07b16 Update github.com/tklauser/go-sysconf to v0.3.6
List of changes: https://github.com/tklauser/go-sysconf/compare/v0.3.4...v0.3.6
2021-06-02 14:11:09 +02:00
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.
2021-02-19 12:20:10 +01:00
Lomanic 32d4603d01 [disk][darwin] fix build with latest golang.org/x/sys/unix
Fixes #958
2020-10-15 23:59:25 +02:00
Tobias Klauser 28890b0482 Use common implementation for BootTime/Uptime on all BSDs
All BSDs use the same implementation to get BootTime{,WithContext} and
Uptime{,WithContext} based on the kern.boottime sysctl. Move this
implementation to a separate host/host_bsd.go file shared by darwin,
freebsd and openbsd. Also use SysctlTimeval to get
the boot time directly as a type Timeval instead of manually
extracting it using package unsafe. It will also allow for easier reuse
to support package host on e.g. Dragonfly BSD or NetBSD.

This requires updating the golang.org/x/sys/unix dependency to the
latest revision.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2020-07-23 13:23:20 +02:00
Tobias Klauser d5eecd689d Fix FreeBSD build with latest x/sys/unix
There was a breaking change in upstream golang.org/x/sys/unix which
changed the type of some Statvfs members, see #853. As it looks like
this change won't be reverted, adjust gopsutil to work with it and allow
to build against the latest version of x/sys/unix.
2020-06-22 23:41:01 +02:00
Lomanic e9ecebec5a [disk][freebsd] Work around #853, pin x/sys with dep to the hash just before upstream breaking change 2020-05-31 20:36:42 +02:00
Tobias Klauser 214c5bdb50 Use MNT_* consts from golang.org/x/sys/unix on freebsd and openbsd
Update vendored version of golang.org/x/sys/unix and use the MNT_*
constants there to replace the locally generated ones.
2019-12-23 13:31:05 +01:00
shirou 61b5bf8cef
Merge branch 'master' into use-x-sys-windows 2019-12-21 10:20:23 +09:00
Dmitri Goutnik 270f6afc22
Add support for freebsd/arm64 2019-12-17 03:12:29 -05:00
Tobias Klauser a61c905252 Use golang.org/x/windows functions instead of github.com/shirou/w32
All functions used from github.com/shirou/w32 are also available from
golang.org/x/sys/windows which is already used in other places. Convert
the remaining usages to use the functions from x/sys/windows.
2019-11-10 17:34:52 +01:00
shirou 4db8c21d1e update Gopkg.lock 2019-07-28 22:07:05 +09:00
shirou 77e5abb6f0
migrate to circleci2 (#587)
* add circleci 2.0 config, which has golang 1.9 image.
2018-09-16 17:40:02 +09:00