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

24 Commits

Author SHA1 Message Date
shirou
9d35f6e749 fix(github): change v4 to v4 in github actions and README 2024-06-01 08:39:55 +09:00
shirou
bc060cc227 add SPDX License, remove old build tag, and replace import 2024-05-28 22:27:17 +09:00
Dylan Myers
125da53703 Update the README charts with the AIX information 2024-05-22 08:53:41 -04:00
Dylan Myers
df9c9bf340 Update min version in the readme to match new required min version. 2024-05-21 19:18:11 -04:00
vlnaum
d3057c252f cwd support windows doc 2024-02-19 16:23:27 +00:00
Jonathan Matthew
6ccc60519e update list OpenBSD arch list 2024-02-11 16:21:34 +10:00
shirou
b10acd4894 [host]: add EnableBootTimeCache function 2024-01-11 00:49:11 +09:00
Chris Gianelloni
a8418dfd73 feat: use lsof for net_connections on FreeBSD
Use net.ConnectionsPidWithContext on FreeBSD, similarly to how it is done
on Darwin. This uses common.CallLsofWithContext underneath the hood, which
will use lsof under the hood, if available.

Tested on FreeBSD 13.2-RELEASE

Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
2023-11-09 18:19:10 -05:00
Elfranne
b41de48761
cpu_percent and memory_percent update 2023-06-29 13:40:34 +02:00
shirou
341d501dce add(README): add passing context value document
which is introduced by #1439.
2023-06-04 08:11:13 +00:00
syyyj
39770901ac
English case error
m to M
2023-03-04 02:58:54 +08:00
shirou
46c4ce3ffc chore(README): add HOST_ROOT introduced by #1400 2022-12-30 08:12:01 +00:00
shirou
1499bf63a6 feat: drop darwin/i386 from README and Makefile 2022-07-30 02:11:39 +00:00
Lomanic
5439492ad9 [README] Update godoc links to /v3 and add godocs.io alternative 2022-07-20 00:44:10 +02:00
Jamie Strandboge
9e6e627ec8 [disk][linux] add HOST_PROC_MOUNTINFO, closes #1271
The changes to gopsutil for reading /proc/1/mountinfo affected
applications running under restricted environments that disallows access
to /proc/1/mountinfo. #1159 was filed for android but other restricted
environments are also affected (eg, snaps)). The fix for #1159 addressed
the application behavior to work under confinement for non-android as
well. However, depending on the system, the attempt to read
/proc/1/mountinfo could cause a sandbox denial in the logs which can be
quite noisy if using gopsutil as part of a monitoring solution that
polls often.

This introduces HOST_PROC_MOUNTINFO to force reading from the parent dir
of the specified path instead of first trying /proc/1. When unset,
retain the current behavior with fallback. This allows people, for
example, to set HOST_PROC_MOUNTINFO=/proc/self/mountinfo when gopsutil
is running under these restricted environments.

This change updates the private readMountFile() to use a root path
instead of a root subpath, and adjusts PartitionsWithContext() to set
the root path to /proc/1 initially and falling back to /proc/self. When
HOST_PROC_MOUNTINFO is not empty, set the root path to the parent
directory of HOST_PROC_MOUNTINFO.
2022-03-29 08:20:28 -05:00
Ville Skyttä
1e56c6f421 Spelling and grammar fixes 2022-01-30 22:48:09 +02:00
Ville Skyttä
d92d114f90 [load][solaris] implement AvgWithContext 2022-01-10 23:49:07 +02:00
shirou
35e404b9b4 remove terminal for macOS on README 2021-10-30 09:44:37 +00:00
shirou
00ff5a1a07 change minimum version to 1.16 on README 2021-10-30 09:32:47 +00:00
shirou
f029ac1904 add cwd to macOSX 2021-10-30 09:25:01 +00:00
lufia
0617d71557 [v3][cpu] add plan9 support 2021-10-14 22:34:52 +09:00
lufia
0eae055018 [v3][mem] add plan9 support 2021-10-09 07:44:59 +09:00
Ross Smith II
5f0e37d823
Fix minor typos, formatting tweaks 2021-09-25 07:11:07 -07:00
Yoshiki Shibukawa
05e51b6d4b convert README from reStructuredText to Markdown 2021-09-02 21:29:46 +09:00