1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-05-10 19:29:14 +08:00

1719 Commits

Author SHA1 Message Date
Jens Meißner
14a1f64e7e
[v3][process][linux] Fix fillFromStatusWithContext() on systems with 128 bit signal masks. 2021-04-25 17:35:07 +02:00
Jens Meißner
fc074343f8
[process][linux] Fix fillFromStatusWithContext() on systems with 128 bit signal masks. 2021-04-13 21:24:39 +02:00
shirou
79048ccbfa
Merge pull request #1035 from jblesener/fixmacosspaces
Fix spaces on long process names for MacOS
v3.21.3
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
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
f69e79f6b0
Merge pull request #1050 from shirou/feature/v3_add_suse
[v3][host][linux] add suse to v3 following #1047
2021-03-20 00:13:39 +01: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
59c1f43d3e
Merge pull request #1047 from m-terel/missing-suse-distributions
Added missing distributions to the suse platform family
2021-03-17 10:30:33 +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
Mykola Terelia
84e8e51bf9 Added missing distributions to the suse platform family 2021-03-16 18:16:30 +02:00
shirou
c637487c2c
Merge pull request #1045 from Lomanic/issue714
[process][windows] Fix #714 call OpenProcess with PROCESS_QUERY_INFORMATION on WinXP
2021-03-07 17:15: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
2d13269306
Merge pull request #1041 from shirou/feature/erik-reduce-memory
[process][linux] apply #1033 to v3.
v3.21.2
2021-03-01 20:50:23 +09:00
shirou
a5a07ae83c [process][linux] apply #1033 to v3. 2021-03-01 20:23:37 +09:00
shirou
a5834f48c4
Merge pull request #1033 from eriknordmark/erik-reduce-memory
Avoid returning slice into buffer from Readfile
2021-02-26 23:12:05 +09: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
shirou
a346c31dc3
Merge pull request #1036 from tklauser/drop-getconf
cpu, v3/cpu: use sysconf package instead of exec'ing getconf
2021-02-20 23:00:25 +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
eriknordmark
0e13743b77 Avoid returning slice into buffer from Readfile
Signed-off-by: eriknordmark <erik@zededa.com>
2021-02-08 19:21:22 +01:00
shirou
3585d276bc
Merge pull request #1032 from shirou/remove_smc_files
[v3][cpu] remove accidentally added GPL files.
2021-02-08 20:14:27 +09:00
shirou
6d324b0586 [v3][cpu] remove accidentally added GPL files. 2021-02-08 20:08:50 +09:00
shirou
d765dfc473
Merge pull request #1027 from it-novum/fixwindowscounter
Fixes #1026 windows counters on non english systems
2021-02-06 21:21:39 +09:00
Johannes Drummer
76fb312c4b delete unused PdhAddCounterW 2021-02-06 13:11:41 +01:00
Johannes Drummer
7f11ad65d9 Merge branch 'master' into fixwindowscounter 2021-02-06 11:02:11 +01:00
Johannes Drummer
82b235c9f5 v2 windows counters on non english systems 2021-02-06 11:01:29 +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
v3.21.1
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
Lomanic
8fd13bfa55
Merge pull request #1019 from MashaSamoylova/unix-udp4-fix
Fix lsof args for udp4 in unix
2021-01-11 20:29:18 +01: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
shirou
afe0c04c5d
Merge pull request #1008 from imsodin/patch-1
use rest syntax not markdown
v3.20.12
2020-12-10 22:46:52 +09:00
Simon Frei
72d4813f24
use rest syntax not markdown 2020-12-10 14:12:43 +01:00
Lomanic
ebd8102702
Merge pull request #897 from james-bebbington/load-processes-created 2020-12-02 01:17:29 +01:00
Lomanic
94e574749b
Merge pull request #995 from Lomanic/fix-mktypessh-v3 2020-12-02 00:00:57 +01:00
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
shirou
478eb4c76a
Merge pull request #1004 from Lomanic/issue1002
[mem][linux] Fix #1002 only try to parse /proc/meminfo numeric values on fields we're interested in
v3.20.11
2020-11-30 22:16:23 +09: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
Lomanic
ca10f91f44
Merge pull request #1003 from ajacoutot/v3-process-openbsd
v3/process: unbreak on OpenBSD
2020-11-29 15:05:56 +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
340db113de
Merge pull request #997 from shirou/feature/remove_circle_ci
remove circleci testing
2020-11-19 22:57:46 +09:00
shirou
34412e0b7f [net] relax NetIOCounterAll test 2020-11-19 22:24:36 +09:00
shirou
fd963e2e16 remove circleci, change to use go 1.13 for testing.
and badge.
2020-11-19 21:53:41 +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