Lomanic
Lomanic
Can you share the content of `/proc/cpuinfo`? Your post is missing the result of your test program, can you add it back there?
I may guess that `ps` is more efficient than gopsutil because it knows before-hand which information to gather from `/proc/$PID/status` in a single file read while gopsutil first creates a...
> what did you mean, "benchmark before this change?" Do you want me to fix the version at the commit prior to #821 and benchmark that? Exactly, just out of...
> We are seeing a major performance regression on linux between [2.20.4 and 2.20.5](https://github.com/shirou/gopsutil/compare/v2.20.4..v2.20.5). With CPU jumping in a test case from 14% with about 280 processes in 2.20.4, to...
That depends, what's the result of `sysctl vm.swapusage` (see [ https://github.com/shirou/gopsutil/blob/6918006d351cdca8e725243abf3e10a9968771ce/mem/mem_darwin.go#L41](https://github.com/shirou/gopsutil/blob/6918006d351cdca8e725243abf3e10a9968771ce/mem/mem_darwin.go#L41))? If your host is not under huge load, I guess it won't swap
Adding a fallback to dmidecode to get cpu frequencies was previously discussed in https://github.com/shirou/gopsutil/issues/282#issuecomment-287474911 It has too many drawbacks in my opinion to be valuable to add it as a...
Thanks for your investigation and your report, but WMI is indeed used in [cpu.Info](https://github.com/shirou/gopsutil/blob/e146c2e08a4527e58c240fb43f9184bb63d17bc8/cpu/cpu_windows.go#L103) and [disk.IOCounters](https://github.com/shirou/gopsutil/blob/e146c2e08a4527e58c240fb43f9184bb63d17bc8/disk/disk_windows.go#L142). Solution should be to remove calls to WMI (as always…) as they are slow...
Thanks for your research, I hope to be able to exploit NtQuerySystemInformationEx, the calling convention is different compared to NtQuerySystemInformation, with two more parameters, an input buffer and its length....
Would you share with us the contents of your `/proc/filesystems`, `/proc/self/mountinfo` or if missing `/proc/self/mounts`?
Might be doable with `/sys/block/*/stat` on Linux (and parsing of diskutil on darwin) https://stackoverflow.com/a/46637611 This link has some hints also https://unix.stackexchange.com/a/4563 For Windows https://stackoverflow.com/a/37346879 (other interesting answers also).