feat(machine): add OS and kernel version information to machine info, show in 'machine ls'

This commit is contained in:
Pasha Sviderski committed 2026-06-24 17:57:20 +10:00
1 parent 9ea30e6ee9
commit ad43569fe5
8 files changed
+574 -230

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
package osinfo
import "golang.org/x/sys/unix"
// KernelVersion returns the running Linux kernel release, e.g. "6.8.0-31-generic".
func KernelVersion() string {
var un unix.Utsname
if err := unix.Uname(&un); err != nil {
return ""
}
return unix.ByteSliceToString(un.Release[:])
}