sysinfo
sysinfo copied to clipboard
Sysinfo is a Go library providing Linux OS / kernel / hardware system information.
Following this below of code block, there only accept/get first BANK information into memory structure (each DMI type 17 record is describe for a single BANK), but there may be...
Is it possible to detect hardware needed kernel modules for example to initialize NIC / HDD? Extend information with kernel module, dependencies and if firmware ist needed?
Now we can call `sysinfo.GetCPUInfo` to get cpu info instead of getting a full `SysInfo` which contains extra information that we don't need. This make `sysinfo` more flexible.
``` go version go1.21.4 linux/amd64 set -e;\ source ./env/stage; \ while read spec; \ do\ distro=$(echo ${spec} | cut -d/ -f1);\ goarch=$(echo ${spec} | cut -d/ -f2);\ arch=$(echo ${goarch} |...
- Win10 x64 - Go 1.22.4 create an empty project, only one main.go, code from readme.md ```go package main import ( "encoding/json" "fmt" "log" "os/user" "github.com/zcalusic/sysinfo" ) func main() {...
I see https://github.com/zcalusic/sysinfo/blob/85a453a29eca5b2812dd05007d78ce9522ad0eef/os.go#L32 uses the Linux distro-specific interfaces. If the [LSB](https://wiki.linuxfoundation.org/lsb/about) is utilized, this would bring a degree of automatic extensibility to any Linux distro that implements this interface. I'm...
I see https://github.com/zcalusic/sysinfo/blob/85a453a29eca5b2812dd05007d78ce9522ad0eef/os.go#L32 uses the Linux distro-specific interfaces. If [systemd's `/etc/os-release`](https://0pointer.de/blog/projects/os-release) were consulted first, any Linux distro that uses systemd would be automatically detectable.
Hello, The Rocky linux version number is not correctly handled, For example, consider this: ``` NAME="Rocky Linux" VERSION="9.4 (Blue Onyx)" ID="rocky" ID_LIKE="rhel centos fedora" VERSION_ID="9.4" PLATFORM_ID="platform:el9" PRETTY_NAME="Rocky Linux 9.4 (Blue...