Commit Graph

1779 Commits (73fee847e650ff307eb25f8fcac6500b5ab18a31)
 

Author SHA1 Message Date
Jens Meißner 14a1f64e7e
[v3][process][linux] Fix fillFromStatusWithContext() on systems with 128 bit signal masks.
shirou 539c0d52c0
Merge pull request #1063 from damilola-bello/master
Make limitToUint parse to uint instead of int
Damilola Bello 61c36c7b8c Make limitToUint parse to uint instead of int
Lomanic c7a38de76e
Merge pull request #1052 from gballet/openbsd-arm-support
add support for OpenBSD arm64
Lomanic d447f9f7ed
Merge pull request #1039 from Lomanic/issue1037
[cpu][linux] Fix #1037 only count logical cores where 2nd field is a number
Jens Meißner fc074343f8
[process][linux] Fix fillFromStatusWithContext() on systems with 128 bit signal masks.
Sergey Kacheev b3a9d75932 add file for linux specific tests
Sergey Kacheev 07a870e63b clarify test
Sergey Kacheev 306f6d104b add a reliable way to get fields from /prod/PID/stat
shirou 79048ccbfa
Merge pull request #1035 from jblesener/fixmacosspaces
Fix spaces on long process names for MacOS
John Blesener 07797b12d3
Make cmdNameWithContext lower-case to avoid exporting it
Signed-off-by: John Blesener <jblesener@reactivelabs.com>
Guillaume Ballet 992d17af94 add support for OpenBSD arm64
shirou 76779af909
Merge pull request #1051 from Lomanic/issue1049
[process][posix] Fix #1049 check if procfs is mounted before checking if pid exists there
Lomanic f69e79f6b0
Merge pull request #1050 from shirou/feature/v3_add_suse
[v3][host][linux] add suse to v3 following #1047
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
shirou c177d23a33 [v3][host][linux] add suse to v3 following #1047
shirou 59c1f43d3e
Merge pull request #1047 from m-terel/missing-suse-distributions
Added missing distributions to the suse platform family
shirou 2623881709
Merge pull request #1042 from bobrik/ivan/missing-conditionals
Add missing TargetConditionals.h include, closes #976
Mykola Terelia 84e8e51bf9 Added missing distributions to the suse platform family
shirou c637487c2c
Merge pull request #1045 from Lomanic/issue714
[process][windows] Fix #714 call OpenProcess with PROCESS_QUERY_INFORMATION on WinXP
Lomanic 62d8920abb [process][windows] Fix #714 call OpenProcess with PROCESS_QUERY_INFORMATION on WinXP
Ivan Babrou 19ac85b504 Add missing TargetConditionals.h include, closes #976
shirou 2d13269306
Merge pull request #1041 from shirou/feature/erik-reduce-memory
[process][linux] apply #1033 to v3.
shirou a5a07ae83c [process][linux] apply #1033 to v3.
shirou a5834f48c4
Merge pull request #1033 from eriknordmark/erik-reduce-memory
Avoid returning slice into buffer from Readfile
Lomanic 6589c5c274 [cpu][linux] Fix #1037 only count logical cores where 2nd field is a number
shirou a44e7585f9
Merge pull request #1030 from pawelz/master
Clarify the godoc of the Children function.
shirou a346c31dc3
Merge pull request #1036 from tklauser/drop-getconf
cpu, v3/cpu: use sysconf package instead of exec'ing getconf
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.
John Blesener e8b2bea47f
Fix spaces on long process names for MacOS
eriknordmark 0e13743b77 Avoid returning slice into buffer from Readfile
Signed-off-by: eriknordmark <erik@zededa.com>
shirou 3585d276bc
Merge pull request #1032 from shirou/remove_smc_files
[v3][cpu] remove accidentally added GPL files.
shirou 6d324b0586 [v3][cpu] remove accidentally added GPL files.
shirou d765dfc473
Merge pull request #1027 from it-novum/fixwindowscounter
Fixes #1026 windows counters on non english systems
Johannes Drummer 76fb312c4b delete unused PdhAddCounterW
Johannes Drummer 7f11ad65d9 Merge branch 'master' into fixwindowscounter
Johannes Drummer 82b235c9f5 v2 windows counters on non english systems
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.
Johannes Drummer 6e7f4ffe99 Fix windows counters on non english systems
shirou a9a6146c93 [process] fix MemoryInfo comment. remove Swap
fixes #1012
shirou be483f0a78
Merge pull request #1017 from rishabh-arya95/hotfix/smap-parser
[process][linux] Fixing smaps parser
Lomanic 8fd13bfa55
Merge pull request #1019 from MashaSamoylova/unix-udp4-fix
Fix lsof args for udp4 in unix
MashaSamoylova 7631bb0e5e Fix lsof args for udp4 in unix
Rishabh Arya 5b1d8ecae7 fix smap parser
fG! ab33d5ec89
Fix wrong user count
There are empty entries in OpenBSD's utmp that have a line and time entry but no user logged in (the entry is "cleared" after user logs out but not totally as expected in the code here). Current checks are insufficient so check if Name field is empty and skip in that case.
shirou afe0c04c5d
Merge pull request #1008 from imsodin/patch-1
use rest syntax not markdown
Simon Frei 72d4813f24
use rest syntax not markdown
Lomanic ebd8102702
Merge pull request #897 from james-bebbington/load-processes-created
Lomanic 94e574749b
Merge pull request #995 from Lomanic/fix-mktypessh-v3
Lomanic a6ed12aa0e
Merge pull request #998 from shirou/feature/implement_load_windows_v3
[v3][load][windows] implement load.Avg on windows