1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-29 13:49:21 +08:00

6 Commits

Author SHA1 Message Date
shirou
4db4dc09a0 [v3] fix Signal import on dragonfly OS in fallback 2021-10-17 13:13:57 +00:00
lufia
0eae055018 [v3][mem] add plan9 support 2021-10-09 07:44:59 +09: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
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
005a35c436 [v3 migartion] add v3 sourcodes, and change disk.opts to []string 2020-10-31 23:29:24 +09:00