Commit Graph

9 Commits (93a90ccfca5bee70259f038bf53db67f5c998a5c)

Author SHA1 Message Date
Chad Harp 8c6072d111 Cast bytes to string
Chad Harp 16b37cc9c2 Modify cpu_solaris to support Sorlais 10
Chad Harp 354718bdd8 Add support for Solaris CPU times
Segflow 86c7289ccc Fix: use filename in exec.LookPath instead of full path
exec.LookPath searches for the file in the $PATH, which mean giving it an absolute path is against it's own purposes.
Lomanic c0ca431bf1 [cpu][linux] Add support for logical arg in Counts #640 #628
shirou 145dca90f7 change to use CommandContext.
shirou 4c73494c78 Add WithContext functions.
WAKAYAMA Shirou f8ef680a47 error strings change to lowercase
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.