1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-28 13:48:49 +08:00

11 Commits

Author SHA1 Message Date
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
Lomanic
4bf185067d [host] Fix #737 add KernelArch field in InfoStat struct returning 'uname -m' result 2019-08-08 23:11:41 +02:00
Lomanic
7e9e36b568 [host][openbsd] Remove calls to sysctl binary in host/host_openbsd.go #639 2019-03-02 23:22:53 +01:00
Lomanic
8294f67566 [host][openbsd] Remove external calls to uname in PlatformInformation() 2018-12-29 14:56:23 +01:00
shirou
145dca90f7 change to use CommandContext. 2018-03-31 21:35:53 +09:00
shirou
4c73494c78 Add WithContext functions. 2017-12-31 15:25:49 +09:00
WAKAYAMA Shirou
114c78c777 [host]: add not implemented methods. 2017-08-03 11:08:35 +09:00
WAKAYAMA Shirou
dfbb3e40da fix build bugs. 2017-04-10 22:24:36 +09:00
Eric Gourlaouen
8b08ca5fdc added temperatures 2017-03-19 02:08:19 +01:00
tycho garen
22c56d292e close open files 2017-02-22 08:46:23 -05:00
Marco Pfatschbacher
b4846b445b Add support for OpenBSD/amd64
This code is based on the FreeBSD version
and implements roughly the same feature set.
2016-11-24 22:30:29 +01:00