Skip to content

Commit

Permalink
add amd cpu suport
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkLeong committed Sep 11, 2023
1 parent 3aea945 commit fa62c65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion route/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
func InitFunction() {
go InitNetworkMount()
go InitInfo()
go InitZerotier()
//go InitZerotier()
}

func InitInfo() {
Expand Down
6 changes: 5 additions & 1 deletion service/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ func GetCPUThermalZone() string {
break
}
}

Cache.SetDefault(keyName, path)
return path
}
Expand All @@ -483,7 +484,10 @@ func (s *systemService) GetCPUTemperature() int {
if len(path) > 0 {
outPut = string(file.ReadFullFile(path + "/temp"))
} else {
outPut = "0"
outPut = string(file.ReadFullFile("/sys/class/hwmon/hwmon0/temp1_input"))
if len(outPut) == 0 {
outPut = "0"
}
}

celsius, _ := strconv.Atoi(strings.TrimSpace(outPut))
Expand Down

0 comments on commit fa62c65

Please sign in to comment.