kepler: getKernelVersion doesn't work at all
Describe the bug A clear and concise description of what the bug is.
https://github.com/sustainable-computing-io/kepler/blob/main/pkg/config/config.go#L65
paste those to https://go.dev/play/ and run it
package main
import (
"encoding/json"
"fmt"
"github.com/zcalusic/sysinfo"
)
func main() {
var si sysinfo.SysInfo
si.GetSysInfo()
data, err := json.MarshalIndent(&si, "", " ")
if err == nil {
var result map[string]map[string]string
if err = json.Unmarshal(data, &result); err != nil {
fmt.Println("----")
fmt.Println(err)
fmt.Println("----")
}
}
fmt.Println("done")
}
----
json: cannot unmarshal number into Go value of type string
----
done
To Reproduce Steps to reproduce the behavior:
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (2 by maintainers)
I don’t think we should use this library (at least for now) at all as you can see , they just read a file and we should get from that file directly https://github.com/zcalusic/sysinfo/blob/99e836ba64f229922382eecd8a346e6b3d1b560a/kernel_linux.go#L22