-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: cpu.Info() doesn't work on OpenBSD (7.5) #1710
Comments
afaik, direct syscalls as done in https://github.com/shirou/gopsutil/blob/master/cpu/cpu_openbsd.go#L59 are forbidden |
Sorry I don't reproduce on an openbsd 7.5 VM under VirtualBox package main
import (
"log"
"github.com/shirou/gopsutil/v4/cpu"
)
func main() {
log.Println("cpu.Info()")
log.Println(cpu.Info())
}
Are you restricting your Go program with something like plegde/unveil maybe? |
FYI golang/go#63900
|
I was also testing with What's the result of this shell oneliner (sysctl values from here)? for I in hw.cpuspeed hw.ncpuonline hw.model; do printf "%s: " "$I"; sysctl "$I"; done |
Running on OpenBSD 7.6 (arm64), which is a VM guest inside VMware Fusion (MacBook Pro with Apple M3 Pro chip):
|
Describe the bug
cpu.Info()
doesn't work on OpenBSD, version 7.5, MacBook Pro with M3 Pro chip (arm64).To Reproduce
It reports error
operation not supported
.Expected behavior
Expect it collects at least number of CPU cores.
Environment (please complete the following information):
ver
]/etc/os-release
and the result ofuname -a
]sw_vers
anduname -a
freebsd-version -k -r -u
anduname -a
]uname -a
]The text was updated successfully, but these errors were encountered: