1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

19 Commits

Author SHA1 Message Date
shirou
bc060cc227 add SPDX License, remove old build tag, and replace import 2024-05-28 22:27:17 +09:00
Steve Zhang
ccb11cf45e reuse the context.Context instead of creating a new Context 2022-11-28 22:30:09 -07:00
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).
2022-11-21 21:28:36 -07: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
mmorel-35
1e6b445a8a gofumpt 2021-12-22 21:54:41 +00:00
shirou
0969c9436b delete v2 directory, move v3 to top #1078 2021-11-30 23:47:59 +00:00
Ville Skyttä
09c3ba3896 [mem][solaris] simplify regular expressions 2021-10-22 18:28:52 +03:00
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.
2021-10-22 18:27:43 +03:00
Ville Skyttä
768c3b1888 [mem][solaris] don't hardcode path to prtconf in error message 2021-10-22 18:22:07 +03:00
shirou
7ae41c1f40 [v2][solaris][mem] fix invoke ctx. 2021-10-17 13:20:16 +00:00
shirou
3e7da36a46 [mem][solaris] fix wrong variable name. 2021-10-17 10:13:04 +00:00
Punya Biswal
32b14a3723 Use invoke.CommandWithContext 2021-09-28 10:09:43 -04:00
Punya Biswal
7c1aa06a5e Respond to review comments
* use LookPath for better error messages
* support procfs in containers
2021-09-08 16:15:26 -04:00
Tom Barker
84a665b712 Add mem.SwapDevices() method. 2021-08-19 10:16:30 -04:00
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.
2019-05-05 20:45:07 +01:00
shirou
145dca90f7 change to use CommandContext. 2018-03-31 21:35:53 +09:00
shirou
4c73494c78 Add WithContext functions. 2017-12-31 15:25:49 +09:00
WAKAYAMA Shirou
f8ef680a47 error strings change to lowercase 2017-03-15 22:43:20 +09:00
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.
2017-03-14 16:28:50 -05:00