1
0
mirror of https://github.com/ceph/ceph-csi.git synced 2024-12-18 19:10:21 +00:00

util: log kernel version on start

It is useful to have the kernel version logged while starting binaries.
Some functionality depends on the version of the kernel, debugging
issues related to this will be easier.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-06-17 20:31:10 +02:00 committed by mergify[bot]
parent 209a5e5602
commit 1b0b26a7a6

View File

@ -111,6 +111,9 @@ func main() {
fmt.Println("Go Version:", runtime.Version())
fmt.Println("Compiler:", runtime.Compiler)
fmt.Printf("Platform: %s/%s\n", runtime.GOOS, runtime.GOARCH)
if kv, err := util.KernelVersion(); err == nil {
fmt.Println("Kernel:", kv)
}
os.Exit(0)
}