feat: add kernel version reporting for all platforms

This commit is contained in:
JohnsonRan
2025-08-02 22:20:42 +08:00
parent d9d9c4b606
commit a0437e9b7b
5 changed files with 58 additions and 0 deletions

View File

@@ -156,3 +156,13 @@ func detectProxmoxVE() string {
return "Proxmox VE"
}
// KernelVersion returns the kernel version on Linux systems
func KernelVersion() string {
out, err := exec.Command("uname", "-r").Output()
if err != nil {
return "Unknown"
}
return strings.TrimSpace(string(out))
}