shirou
shirou
I think `cache` can fascinate other users to use `AllProcesses`. Perhaps #286 might be helpful.
*Note: this version of netlink does NOT return FD and ProcessID from inode* ``` func BenchmarkGetConnectionsInet(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { Connections("inet") }...
So getting Pid and FD from inodes IS a bottleneck. ``` goos: linux goarch: amd64 pkg: github.com/shirou/gopsutil/net netlink: BenchmarkGetConnectionsInet-2 66 20531232 ns/op 3297398 B/op 39004 allocs/op BenchmarkGetConnectionsAll-2 57 19901569 ns/op...
When I run your code for 10 minutes, it does not increase memory. - Linux 5.4.0-174-generic - go version go1.21.4 linux/amd64 Could you get a memory profile? Thank you.
Could you show us the ignored error?
From [the document](https://pkg.go.dev/github.com/shirou/gopsutil/[email protected]/cpu#Percent), > If an interval of 0 is given it will compare the current cpu times against the last call. Therefore, first `cpu.Percent(0, true)` returns 0 values. If...
merged. Thank you for your contribution!
That is why we introduced `xxxWithContext`. We can avoid waiting indefinitely by setting a timeout for a `context` . Further, as the author of the library, we cannot set the...
Close for not updating. Feel free to reopen if you have more questions.
On Windows, we use WMI to get ProcInfo and PerfInfo and WMI is not so fast.