Commit Graph

5 Commits (80c890dc4cff972ac82bc8708c2b899aa99a665e)

Author SHA1 Message Date
mmorel-35 1e6b445a8a gofumpt 3 years ago
Ville Skyttä 2278747969 [v2][cpu][solaris] psrinfo parsing fixes 4 years ago
Michal Rostecki 7c7dec96c6 cpu: Check for error object 7 years ago
WAKAYAMA Shirou 30ebb9ca3a rename expected dir to testdata. 8 years ago
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.
8 years ago