Ville Skyttä
b8ac60acc1
[cpu][linux] more info for ARM processors
...
https://developer.arm.com/documentation/ddi0337/h/system-control/register-descriptions/cpuid-base-register--cpuid
2021-05-20 19:35:01 +03:00
Ville Skyttä
f43138a3ff
[process][solaris] improve Exe portability
...
Resolving from path/a.out seems more portable than from execname.
2021-05-19 22:29:21 +03:00
Ville Skyttä
eab3aea46b
[load][solaris] support MiscStat.ProcsRunning
2021-05-19 21:57:49 +03:00
shirou
3af73eac22
Merge pull request #1064 from scop/fix/solaris-cpu
...
[cpu][solaris] psrinfo parsing fixes
2021-05-19 22:08:59 +09:00
shirou
9a5f86a30e
Merge pull request #1065 from scop/feat/solaris-process-some
...
Basic Solaris process support
2021-05-19 22:08:00 +09:00
Sergey Kacheev
44d3907f9d
Merge branch 'master' into splitProcStat
2021-05-11 09:43:55 +07:00
Lomanic
37678fe053
Merge pull request #1067 from shirou/feature/add_testdata_process_linux_fillfrom
...
[process][linux] add test to parse fillFromStatus
2021-05-09 11:24:02 +02:00
Ville Skyttä
e35ae34dce
[process][solaris] process basics
2021-05-08 16:54:12 +03:00
Ville Skyttä
b7d717ba80
[process][posix] use os.Lstat for symlink check
...
unix.DT_LNK is not portable; per glibc docs it's a BSD extension. It is
not available e.g. in Solaris.
https://www.gnu.org/software/libc/manual/html_node/Directory-Entries.html#index-DT_005fLNK
As a side effect, fixes incorrect equality comparison against
Stat_t.Mode, a bitmask.
2021-05-08 16:46:56 +03:00
shirou
3d97fc18f4
add check if it runs on CI
2021-05-08 22:31:05 +09:00
shirou
c6bd05a3e9
relax net/NetIOCountersAll test.
...
It often fails in CI.
2021-05-08 21:25:16 +09:00
shirou
2fa855f295
add MockEnv as more generic function.
2021-05-08 21:18:46 +09:00
shirou
abacce2177
[process][linux] add test to parse fillFromStatus
2021-05-08 20:56:46 +09:00
shirou
008b5a41ef
Merge pull request #1060 from heptalium/master
...
Fix fillFromStatusWithContext() on systems with 128 bit signal masks.
2021-05-08 18:52:36 +09:00
Ville Skyttä
7598518443
[v3][cpu][solaris] psrinfo parsing fixes
2021-05-03 23:01:01 +03:00
Sergey Kacheev
716cf26984
add parsing of real data from testdata with the splitProcStat function
2021-05-03 00:00:44 +07:00
Jens Meißner
14a1f64e7e
[v3][process][linux] Fix fillFromStatusWithContext() on systems with 128 bit signal masks.
2021-04-25 17:35:07 +02:00
Damilola Bello
61c36c7b8c
Make limitToUint parse to uint instead of int
2021-04-23 21:30:29 -04:00
Lomanic
c7a38de76e
Merge pull request #1052 from gballet/openbsd-arm-support
...
add support for OpenBSD arm64
2021-04-19 02:08:35 +02:00
Lomanic
d447f9f7ed
Merge pull request #1039 from Lomanic/issue1037
...
[cpu][linux] Fix #1037 only count logical cores where 2nd field is a number
2021-04-14 00:58:15 +02:00
Sergey Kacheev
b3a9d75932
add file for linux specific tests
2021-04-05 12:42:44 +07:00
Sergey Kacheev
07a870e63b
clarify test
2021-04-05 12:29:51 +07:00
Sergey Kacheev
306f6d104b
add a reliable way to get fields from /prod/PID/stat
2021-04-05 12:11:15 +07:00
shirou
79048ccbfa
Merge pull request #1035 from jblesener/fixmacosspaces
...
Fix spaces on long process names for MacOS
2021-04-01 20:21:38 +09:00
John Blesener
07797b12d3
Make cmdNameWithContext lower-case to avoid exporting it
...
Signed-off-by: John Blesener <jblesener@reactivelabs.com>
2021-03-27 17:14:18 +09:00
Guillaume Ballet
992d17af94
add support for OpenBSD arm64
2021-03-23 15:29:27 +01:00
shirou
76779af909
Merge pull request #1051 from Lomanic/issue1049
...
[process][posix] Fix #1049 check if procfs is mounted before checking if pid exists there
2021-03-21 10:09:41 +09:00
Lomanic
0881c11a9a
[process][posix] Fix #1049 check if procfs is mounted before checking if pid exists there
...
Benchmark before this change (process.NewProcess() calls process.PidExistsWithContext()
internally)
go test -bench=BenchmarkNewProcess github.com/shirou/gopsutil/process
goos: linux
goarch: amd64
pkg: github.com/shirou/gopsutil/process
BenchmarkNewProcess-4 14722 78751 ns/op
PASS
ok github.com/shirou/gopsutil/process 3.685s
Benchmark with this change applied
go test -bench=BenchmarkNewProcess github.com/shirou/gopsutil/process
goos: linux
goarch: amd64
pkg: github.com/shirou/gopsutil/process
BenchmarkNewProcess-4 14835 80180 ns/op
PASS
ok github.com/shirou/gopsutil/process 3.761s
2021-03-18 23:55:59 +01:00
shirou
c177d23a33
[v3][host][linux] add suse to v3 following #1047
2021-03-17 22:32:10 +09:00
shirou
2623881709
Merge pull request #1042 from bobrik/ivan/missing-conditionals
...
Add missing TargetConditionals.h include, closes #976
2021-03-17 10:03:37 +09:00
Lomanic
62d8920abb
[process][windows] Fix #714 call OpenProcess with PROCESS_QUERY_INFORMATION on WinXP
2021-03-06 22:53:54 +01:00
Ivan Babrou
19ac85b504
Add missing TargetConditionals.h include, closes #976
2021-03-01 09:41:31 -08:00
shirou
a5a07ae83c
[process][linux] apply #1033 to v3.
2021-03-01 20:23:37 +09:00
Lomanic
6589c5c274
[cpu][linux] Fix #1037 only count logical cores where 2nd field is a number
2021-02-22 00:28:56 +01:00
shirou
a44e7585f9
Merge pull request #1030 from pawelz/master
...
Clarify the godoc of the Children function.
2021-02-20 23:01:48 +09:00
Tobias Klauser
ee12f66e4d
cpu, v3/cpu: use sysconf package instead of exec'ing getconf
...
Currently, ClocksPerSec is determined by exec'ing getconf in func init,
i.e. on startup of every program importing the package. getconf might
not be present on some systems or is not executable by the current user.
To avoid this hard to control dependency, use the
github.com/tklauser/go-sysconf package which implements sysconf(3)
entirely in Go without cgo. The package is supported on all platforms
currently supported by the cpu and v3/cpu package of gopsutil.
2021-02-19 12:20:10 +01:00
John Blesener
e8b2bea47f
Fix spaces on long process names for MacOS
2021-02-16 14:51:44 +09:00
shirou
6d324b0586
[v3][cpu] remove accidentally added GPL files.
2021-02-08 20:08:50 +09:00
Johannes Drummer
76fb312c4b
delete unused PdhAddCounterW
2021-02-06 13:11:41 +01:00
Paweł Zuzelski
17c03b3b2d
Clarify the godoc of the Children function.
...
The previous godoc string was slightly confusing and only described information that can be deduced from the function signature.
2021-02-04 18:03:52 +01:00
Johannes Drummer
6e7f4ffe99
Fix windows counters on non english systems
2021-02-01 10:32:53 +01:00
shirou
a9a6146c93
[process] fix MemoryInfo comment. remove Swap
...
fixes #1012
2021-01-14 19:00:55 +09:00
shirou
be483f0a78
Merge pull request #1017 from rishabh-arya95/hotfix/smap-parser
...
[process][linux] Fixing smaps parser
2021-01-14 18:46:38 +09:00
MashaSamoylova
7631bb0e5e
Fix lsof args for udp4 in unix
2021-01-11 17:08:18 +07:00
Rishabh Arya
5b1d8ecae7
fix smap parser
2021-01-03 21:06:54 +05:30
Lomanic
a6ed12aa0e
Merge pull request #998 from shirou/feature/implement_load_windows_v3
...
[v3][load][windows] implement load.Avg on windows
2020-12-01 23:58:24 +01:00
Lomanic
cd25417bd7
[mem][linux] Fix #1002 only try to parse /proc/meminfo numeric values on fields we're interested in
2020-11-29 18:03:50 +01:00
Lomanic
07887a9e9f
[mem][linux] Add mocked test for VirtualMemory() and fix SReclaimable SUnreclaim retrieval
2020-11-29 17:54:17 +01:00
Antoine Jacoutot
0178a24563
v3/process: unbreak on OpenBSD
...
Fix camel case: GetpageSizeWithContext -> GetPageSizeWithContext
2020-11-29 11:53:05 +01:00
Shirou Wakayama
74e1643f82
[load][windows] implement load on windows.
2020-11-19 22:58:49 +09:00
shirou
34412e0b7f
[net] relax NetIOCounterAll test
2020-11-19 22:24:36 +09:00
shirou
6286bea32a
Merge pull request #989 from Lomanic/issue734tests
...
[ci] Implement automatic tests on GH Actions on linux, windows and darwin
2020-11-19 21:46:19 +09:00
shirou
2c0ad9dfac
Merge pull request #988 from Lomanic/cpu-remove-windows-specific-dead-code
...
[v3][cpu][windows] Remove exported windows-specific dead code
2020-11-12 21:39:05 +09:00
Lomanic
318614d7ed
[v3][process][darwin] Fix test Test_Pids_Fail missing testdata folder
2020-11-08 17:26:21 +01:00
Lomanic
995610e109
[process][windows] Fix Nice() test expecting Unix values
2020-11-08 17:13:56 +01:00
Lomanic
5641beec4c
[process][darwin] Fix Parent() when lsof returns warnings
...
Same as #867 , the error being:
error strconv.Atoi: parsing " Output information may be incomplete.": invalid syntax
2020-11-08 17:13:56 +01:00
Lomanic
148a662b06
[process][darwin] Remove Groups() as it's non-functional
2020-11-08 17:13:56 +01:00
Lomanic
64e16cc8c3
[net][darwin] Fix tests with mismatched types
2020-11-08 17:13:56 +01:00
Lomanic
7f0ba43398
[net][darwin][freebsd] Fix tests with func not returning common.ErrNotImplementedError
2020-11-08 17:13:56 +01:00
Lomanic
907e475a45
[v3][process] Fix Test_Process_Status test with new Status() API
2020-11-08 17:13:56 +01:00
Lomanic
976679ee00
[cpu][linux] Get logical cores in Counts() with non-deprecated kernel API first
...
Implementing https://github.com/giampaolo/psutil/pull/1727#issuecomment-707624964
and bfae1fc4a3
2020-11-07 00:48:53 +01:00
Lomanic
e1b5db2987
Merge pull request #984 from bi-zone/udp6-fix
2020-11-05 20:31:19 +01:00
Lomanic
186fbc7fb4
[v3][cpu][windows] Remove exported windows-specific dead code
...
Users wanting to use this Windows-specific feature can still use github.com/StackExchange/wmi by themselves.
2020-11-05 20:16:23 +01:00
MashaSamoylova
860f332c22
Fix getting udp6 ports
2020-11-04 09:32:02 +07:00
shirou
9e51e095ad
[cpu][windows] fix CPU struct name on windows.
2020-11-02 22:01:27 +09:00
shirou
8e2446b0ac
[v3][process] apply #962
2020-10-31 23:39:29 +09:00
shirou
b7e74218ca
[v3 migration] change process.Status returns []string with no letter status string.
2020-10-31 23:29:25 +09:00
shirou
4b5a200e71
[v3 migration] change return type to CgroupCPUStat
2020-10-31 23:29:24 +09:00
shirou
6920de8509
[v3 migration] Fixed temperature sensors detection in Linux #905
2020-10-31 23:29:24 +09:00
shirou
05fef68f42
[v3 migration] change net.[]InterfaceAddr to net.InterfaceAddrList
2020-10-31 23:29:24 +09:00
shirou
33e4b67dfc
[v3] rename Label and SerialNumber to all platform from linux specific.
2020-10-31 23:29:24 +09:00
shirou
005a35c436
[v3 migartion] add v3 sourcodes, and change disk.opts to []string
2020-10-31 23:29:24 +09:00