Commit Graph

18 Commits (e21baf6f1de8da03e8501385d2502253e5d6ca73)

Author SHA1 Message Date
Steve Zhang ccb11cf45e reuse the context.Context instead of creating a new Context 2 years ago
Steve Zhang cf62eac8f9 The current codes miss below statistic data under solaris/illumos:
1. the disk io statistic data as: nread, nwritten, reads, writes, rtime, wtime;
2. the free memory under global zone;
3. the net io statistic data as: rbytes64, ipackets64, idrops64, ierrors, obytes64, opackets64, odrops64, oerrors.

The new feature branch adds the above missing statistic data based on the psutil project (https://psutil.readthedocs.io/), it has been tested under solaris ( Oracle Solaris 11.4 X86) and illumos (OmniOS v11 r151044).
2 years ago
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.
3 years ago
mmorel-35 1e6b445a8a gofumpt 3 years ago
shirou 0969c9436b delete v2 directory, move v3 to top #1078 3 years ago
Ville Skyttä 09c3ba3896 [mem][solaris] simplify regular expressions 3 years ago
Ville Skyttä 093e68cb91 [mem][solaris] improve prtconf memory size scraping
Accept uppercase Memory, that's how it appears to be at least in Solaris
11.3 and OpenIndiana oi_151a7.
3 years ago
Ville Skyttä 768c3b1888 [mem][solaris] don't hardcode path to prtconf in error message 3 years ago
shirou 7ae41c1f40 [v2][solaris][mem] fix invoke ctx. 3 years ago
shirou 3e7da36a46 [mem][solaris] fix wrong variable name. 3 years ago
Punya Biswal 32b14a3723 Use invoke.CommandWithContext 4 years ago
Punya Biswal 7c1aa06a5e Respond to review comments
* use LookPath for better error messages
* support procfs in containers
4 years ago
Tom Barker 84a665b712 Add mem.SwapDevices() method. 4 years ago
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.
6 years ago
shirou 145dca90f7 change to use CommandContext. 7 years ago
shirou 4c73494c78 Add WithContext functions. 7 years ago
WAKAYAMA Shirou f8ef680a47 error strings change to lowercase 8 years ago
James Nugent b7760bb5a6 memory: Add basic Solaris VirtualMemory() support
This commit adds support for VirtualMemory() in package mem. The support
only extends to total memory capcity, since that is all that is required
in Nomad. It does take into account global versus non-global zones, and
does not use cgo.

This has been tested inside a zone in the Joyent public cloud for a
non-global zone, and in the global zone of a SmartOS virtual machine.
8 years ago