From 1b0b26a7a6641ede2e693a651b2e8a438f5833bc Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Wed, 17 Jun 2020 20:31:10 +0200 Subject: [PATCH] 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 --- cmd/cephcsi.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/cephcsi.go b/cmd/cephcsi.go index 950a1b917..94b5e8aed 100644 --- a/cmd/cephcsi.go +++ b/cmd/cephcsi.go @@ -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) }