Martin Reindl
1d89235f34
host: add support for OpenBSD/armv7
2022-04-15 21:11:36 +02:00
Ville Skyttä
f7e1f36418
refactor: remove unnecessary exec.LookPath calls
...
Executing the command does the lookup if needed and returns the same
error when not found, no need to do it separately.
2022-03-04 18:56:33 +02:00
Ville Skyttä
7a8feb155b
[host][solaris] implement SensorsTemperaturesWithContext
2022-02-05 23:20:11 +02:00
Lammert Hellinga
001699bed7
Let almalinux be part of the rhel family
2022-01-19 22:37:51 +01:00
Matthieu MOREL
4671e649aa
enable revive linter
2021-12-22 23:49:50 +01:00
mmorel-35
1e6b445a8a
gofumpt
2021-12-22 21:54:41 +00:00
mmorel-35
eb5f6203d8
gofmt
2021-12-22 21:46:33 +00:00
shirou
b1186a68ed
Merge pull request #1191 from shirou/feature/update_mac_cgo
...
[disk][host][mac] fix deprecated code in macOS Monterey
2021-12-22 21:54:48 +09:00
Matthieu MOREL
b673968d5d
enable errorlint linter
2021-12-04 22:29:38 +01:00
shirou
4c3edcfe56
[mac] fix deprecated code in macOS Monterey
2021-12-04 03:37:03 +00:00
shirou
d2e27c1712
fix dependabot v2 deletion.
2021-12-01 00:12:55 +00:00
shirou
0969c9436b
delete v2 directory, move v3 to top #1078
2021-11-30 23:47:59 +00:00
shirou
0fdf65fa3e
Change to use yusufpapurcu/wmi from StackExchange/wmi.
2021-11-20 11:36:30 +00:00
shirou
e032a1c81d
Merge pull request #1059 from d1ss0nanz/issue1058
...
use ioreg to read IOPlatformUUID as HostID
2021-10-30 17:43:32 +09:00
Lars Meyer
a7d936d0a4
[host][windows] Fix Windows 11 reporting
...
While ProductName remains "Windows 10", versions with Build no. >= 22000
are Windows 11.
2021-10-08 09:36:28 +02:00
odinje
a3e22baec0
Ensure rhel platform family for Rocky Linux
2021-07-21 23:04:09 +02:00
shirou
2782a109dc
Merge pull request #1010 from gdbinit/openbsd-wrong-users-number-patch
...
Fix wrong OpenBSD user count
2021-05-29 13:39:08 +09:00
Daniel Stutz
9916462c47
use ioreg to read IOPlatformUUID as HostID
2021-04-13 10:31:23 +02:00
Guillaume Ballet
992d17af94
add support for OpenBSD arm64
2021-03-23 15:29:27 +01:00
Mykola Terelia
84e8e51bf9
Added missing distributions to the suse platform family
2021-03-16 18:16:30 +02: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
shirou
f377a07e5a
fix test and openbsd errors.
2020-10-25 19:06:59 +09:00
Ryan Fitzpatrick
8046134504
Fix VirtualizationWithContext() race in linux
2020-10-06 17:03:49 +00:00
shirou
6c9f3bdcae
[host][linux] Change to use unix.SysInfo_t to get Uptime in Linux
2020-09-19 11:12:05 +09:00
Sergey Vinogradov
5209442b3c
Refactor "host" package
2020-09-11 18:54:53 +03:00
Lomanic
8a625ec054
[host][process][darwin] Go-fmt code from mktypes.sh from #917
2020-09-07 21:12:17 +02:00
Lomanic
2e4fcbb8c4
Merge pull request #917 from amdprophet/darwin-arm64
...
Add support for Darwin/ARM64
2020-09-07 21:10:27 +02:00
Lomanic
4cfc60d68b
Merge pull request #928 from Lomanic/skip-tests-when-not-implemented
2020-09-06 13:33:31 +02:00
Lomanic
e1925b853e
Merge pull request #935 from Lomanic/issue900
...
[linux] Fix #900 , skip or fix failing tests in docker
2020-09-02 10:35:27 +02:00
Lomanic
1b3e0c6643
[linux] Fix #900 , skip or fix failing tests in docker
...
TestGetProcInodesAll: create a server so there are some opened inodes
TestUsers: skip if Users is empty, because of an empty /var/run/utmp
Test_Process_Groups: skip if Groups is empty
TestConnectionsMax: skip on CI, not only CircleCI
2020-09-02 01:06:17 +02:00
Lomanic
84afaae670
[host][mem][process][openbsd] Add 386 const and types definitions
...
Continuation of #721 , this type using mktypes.sh that I didn't know at the time.
Weirdly, `go tool cgo -godefs` doesn't produce propery go-fmt-ed code, had to do run go-fmt manually afterwards.
2020-09-01 02:02:21 +02:00
Lomanic
8110480793
[host] Skip tests on non-implemented platforms #446
2020-08-29 18:39:44 +02:00
Justin Kolberg
53ffb0cece
Add support for Darwin/ARM64
...
Signed-off-by: Justin Kolberg <amd.prophet@gmail.com>
2020-08-10 21:26:24 -07: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
1e61ed79fa
host: add support for linux/riscv64
2020-06-30 11:34:17 +02:00
Lomanic
42c6875555
[host][darwin][cgo] Fix #832 work around once-again broken go modules not including C files
...
Supersedes #885 by @afontaine
2020-05-31 20:40:36 +02:00
shirou
a81cf97fce
Merge pull request #861 from Lomanic/issue391
...
[host][linux] Fix #391 retrieve sensors temps on OSes lacking hwmon
2020-05-01 22:02:23 +09:00
Tobias Klauser
7bee6a934d
host: fix TestHostInfoStat_String
...
TestHostInfoStat_String has been broken since kernelArch has been
introduced. Fix it.
Also adjust the error message to show the wanted string, aligned with
the gotten string so it's easier to spot differences.
2020-02-13 14:41:11 +01:00
Tim Gross
c69ef749eb
fix host.Info() panic if /etc/debian_version is empty
...
The ReadLines helper function doesn't guarantee that the length of
lines is non-zero or that the lines have contents. Most callers
include a check for length but this was missing for version
fingerprinting on Debian if `/etc/debian_version` was empty, leading
to a panic.
2020-01-17 14:23:27 -05:00
shirou
f4fc0580b8
Merge pull request #802 from dmgk/master
...
Add support for freebsd/arm64
2019-12-21 10:01:17 +09:00
Dmitri Goutnik
270f6afc22
Add support for freebsd/arm64
2019-12-17 03:12:29 -05:00
Alessandro De Angelis
b7ac341eac
fix compilation warnings
2019-12-16 11:24:55 +01:00
Alessandro De Angelis
65a2e0e9bb
Restored temperature info for macOS
2019-12-13 16:03:44 +01:00
Lomanic
c58a1e8ec7
[host][linux] Fix #391 retrieve sensors temps on OSes lacking hwmon
2019-08-18 20:48:31 +02:00
Aman Gupta
25be4d08fe
Trim null bytes from kernel arch
2019-08-12 13:32:14 -07:00
Aman Gupta
62a406ec1b
Trim null bytes from kernel version
2019-08-12 13:30:54 -07:00
shirou
8a5bcfdb53
Merge pull request #739 from Lomanic/issue738
...
[host][linux] Fix #738 use uname syscall to get version in KernelVersion()
2019-08-11 21:57:14 +09: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
98c779765f
[host] go-fmt and propagate context on Windows in Info()
2019-08-07 22:34:36 +02:00
Lomanic
8c28c3ba17
[host][linux] Fix #738 use uname syscall to get version in KernelVersion()
2019-08-03 18:36:36 +02:00