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

18 Commits

Author SHA1 Message Date
shirou
ab0d977709 [sensors] move Temperatures from host to sensors. 2024-05-28 22:27:17 +09:00
shirou
bc060cc227 add SPDX License, remove old build tag, and replace import 2024-05-28 22:27:17 +09:00
shirou
0665cafa1b chore: replace deprecated ioutil package to os and io 2023-09-08 17:05:14 +00:00
mmorel-35
1e6b445a8a gofumpt 2021-12-22 21:54:41 +00:00
shirou
0969c9436b delete v2 directory, move v3 to top #1078 2021-11-30 23:47:59 +00:00
fG!
ab33d5ec89
Fix wrong user count
There are empty entries in OpenBSD's utmp that have a line and time entry but no user logged in (the entry is "cleared" after user logs out but not totally as expected in the code here). Current checks are insufficient so check if Name field is empty and skip in that case.
2020-12-13 00:34:27 +00:00
Sergey Vinogradov
5209442b3c Refactor "host" package 2020-09-11 18:54:53 +03: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
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