Commit Graph

83 Commits (25b4a07b1628381bf46f8aea4d122fbe84aa82f6)

Author SHA1 Message Date
Tobias Klauser 25b4a07b16 Update github.com/tklauser/go-sysconf to v0.3.6
List of changes: https://github.com/tklauser/go-sysconf/compare/v0.3.4...v0.3.6
4 years ago
shirou b49f37e9f3
Merge pull request #1076 from scop/feat-arm-cpuinfo
[cpu][linux] more info for ARM processors
4 years ago
Ville Skyttä 47f2f0eee5 [cpu][linux] add more ARM hw implementers 4 years ago
shirou 9bd4bc70ae [process][linux] fix 1056 test and copy to v2 4 years ago
shirou 3a48fa3629
Merge pull request #1077 from shirou/feature/1010_port_to_v3
[host][openbsd][v3] Fix wrong OpenBSD user count
4 years ago
shirou bade702712
Merge pull request #1056 from sakateka/splitProcStat
add a reliable way to get fields from /prod/PID/stat
4 years ago
shirou ddef7ea64d [host][openbsd][v3] Fix wrong OpenBSD user count 4 years ago
shirou b76e0ffe7a
Merge pull request #1074 from scop/feat/solaris-load-procsrunning
[load][solaris] support MiscStat.ProcsRunning
4 years ago
shirou 7ffa844cd5
Merge pull request #1075 from scop/feat/improve-solaris-exe
[process][solaris] improve Exe portability
4 years ago
Lomanic 8775def991
Merge pull request #1072 from djs55/externproc-arm64
process: fix ExternProc on Apple Silicon / Darwin arm64
4 years ago
David Scott 0a281012db process: change all pointers to uint64 in ExternProc for darwin arm64
This is the arm64 version of the change in
20c3ddbfe5

Before this patch:
```
dave@m1 process % GO111MODULE=off CGO_ENABLED=0 go test
--- FAIL: Test_Process_Name (0.00s)
    process_test.go:312: invalid Exe
--- FAIL: Test_Process_Long_Name_With_Spaces (0.22s)
    process_test.go:357: loooong name with spaces.go.exe !=
--- FAIL: Test_Process_Long_Name (0.22s)
    process_test.go:402: looooooooooooooooooooong.go.exe !=
--- FAIL: Test_Username (0.00s)
    process_test.go:593:
        	Error Trace:	process_test.go:593
        	Error:      	Not equal:
        	            	expected: "dave"
        	            	actual  : "root"

        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-dave
        	            	+root
        	Test:       	Test_Username
    process_test.go:595: root
FAIL
exit status 1
FAIL	github.com/shirou/gopsutil/process	9.955s
```

After this patch:
```
dave@m1 process % GO111MODULE=off CGO_ENABLED=0 go test
PASS
ok  	github.com/shirou/gopsutil/process	9.784s
dave@m1 process % GO111MODULE=off CGO_ENABLED=1 go test
PASS
ok  	github.com/shirou/gopsutil/process	3.180s
```

Signed-off-by: David Scott <dave@recoil.org>
4 years ago
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
4 years ago
Ville Skyttä f43138a3ff [process][solaris] improve Exe portability
Resolving from path/a.out seems more portable than from execname.
4 years ago
Ville Skyttä eab3aea46b [load][solaris] support MiscStat.ProcsRunning 4 years ago
shirou 3af73eac22
Merge pull request #1064 from scop/fix/solaris-cpu
[cpu][solaris] psrinfo parsing fixes
4 years ago
shirou 9a5f86a30e
Merge pull request #1065 from scop/feat/solaris-process-some
Basic Solaris process support
4 years ago
Sergey Kacheev 44d3907f9d
Merge branch 'master' into splitProcStat 4 years ago
Lomanic 37678fe053
Merge pull request #1067 from shirou/feature/add_testdata_process_linux_fillfrom
[process][linux] add test to parse fillFromStatus
4 years ago
Ville Skyttä e35ae34dce [process][solaris] process basics 4 years ago
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.
4 years ago
shirou 3d97fc18f4 add check if it runs on CI 4 years ago
shirou c6bd05a3e9 relax net/NetIOCountersAll test.
It often fails in CI.
4 years ago
shirou 2fa855f295 add MockEnv as more generic function. 4 years ago
shirou abacce2177 [process][linux] add test to parse fillFromStatus 4 years ago
shirou 008b5a41ef
Merge pull request #1060 from heptalium/master
Fix fillFromStatusWithContext() on systems with 128 bit signal masks.
4 years ago
Ville Skyttä 7598518443 [v3][cpu][solaris] psrinfo parsing fixes 4 years ago
Sergey Kacheev 716cf26984 add parsing of real data from testdata with the splitProcStat function 4 years ago
Jens Meißner 14a1f64e7e
[v3][process][linux] Fix fillFromStatusWithContext() on systems with 128 bit signal masks. 4 years ago
Damilola Bello 61c36c7b8c Make limitToUint parse to uint instead of int 4 years ago
Lomanic c7a38de76e
Merge pull request #1052 from gballet/openbsd-arm-support
add support for OpenBSD arm64
4 years ago
Lomanic d447f9f7ed
Merge pull request #1039 from Lomanic/issue1037
[cpu][linux] Fix #1037 only count logical cores where 2nd field is a number
4 years ago
Sergey Kacheev b3a9d75932 add file for linux specific tests 4 years ago
Sergey Kacheev 07a870e63b clarify test 4 years ago
Sergey Kacheev 306f6d104b add a reliable way to get fields from /prod/PID/stat 4 years ago
shirou 79048ccbfa
Merge pull request #1035 from jblesener/fixmacosspaces
Fix spaces on long process names for MacOS
4 years ago
John Blesener 07797b12d3
Make cmdNameWithContext lower-case to avoid exporting it
Signed-off-by: John Blesener <jblesener@reactivelabs.com>
4 years ago
Guillaume Ballet 992d17af94 add support for OpenBSD arm64 4 years ago
shirou 76779af909
Merge pull request #1051 from Lomanic/issue1049
[process][posix] Fix #1049 check if procfs is mounted before checking if pid exists there
4 years ago
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
4 years ago
shirou c177d23a33 [v3][host][linux] add suse to v3 following #1047 4 years ago
shirou 2623881709
Merge pull request #1042 from bobrik/ivan/missing-conditionals
Add missing TargetConditionals.h include, closes #976
4 years ago
Lomanic 62d8920abb [process][windows] Fix #714 call OpenProcess with PROCESS_QUERY_INFORMATION on WinXP 4 years ago
Ivan Babrou 19ac85b504 Add missing TargetConditionals.h include, closes #976 4 years ago
shirou a5a07ae83c [process][linux] apply #1033 to v3. 4 years ago
Lomanic 6589c5c274 [cpu][linux] Fix #1037 only count logical cores where 2nd field is a number 4 years ago
shirou a44e7585f9
Merge pull request #1030 from pawelz/master
Clarify the godoc of the Children function.
4 years ago
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.
4 years ago
John Blesener e8b2bea47f
Fix spaces on long process names for MacOS 4 years ago
shirou 6d324b0586 [v3][cpu] remove accidentally added GPL files. 4 years ago
Johannes Drummer 76fb312c4b delete unused PdhAddCounterW 4 years ago