Commit Graph

11 Commits (2bbcfbde4a2ce2bc07b3cf29f09f973f94e886bd)

Author SHA1 Message Date
Justin Yang 4a46201e00 cpu && host: fix compile time errors
mmorel-35 1e6b445a8a gofumpt
shirou d2e27c1712 fix dependabot v2 deletion.
shirou 0969c9436b delete v2 directory, move v3 to top #1078
Guillaume Ballet 56d9e0b7be cpu: support for DragonflyBSD
Lomanic c0ca431bf1 [cpu][linux] Add support for logical arg in Counts #640 #628
shirou 4c73494c78 Add WithContext functions.
WAKAYAMA Shirou dfbb3e40da fix build bugs.
James Nugent 49ed700c0d cpu: Implement Solaris support for Info()
This commit adds Solaris(^1) support for the Info() function of package
cpu, with the exception of the L2 cache size which is not trivially
available(^2).

Support is implemented by parsing the output of `isainfo -b -v` (for the
instruction set flags), and `psr-info -p -v` for other information.
Example outputs from a range of different size VMs and Joyent containers
are included as part of the tests.

(^1): This has only been tested with Illumos in the form of SmartOS. I
believe it to be portable to other Illumos distributions but have not
tested on Oracle Solaris.

(^2): Enough support is added here to be usable for my port of
HashiCorp's Nomad to SmartOS.
Marco Pfatschbacher b4846b445b Add support for OpenBSD/amd64
This code is based on the FreeBSD version
and implements roughly the same feature set.
Lukas Fittl da9fa1162b Add fallback code for all unsupported operating systems.
This enables using gopsutil in a codebase that gets built on other OSes
than the ones supported. Instead of a build failure as before, due to
the build tags, gopsutil will now throw an "not implemented" runtime
error.

Fixes #234.