We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1d8290 commit 205fa29Copy full SHA for 205fa29
internal/master.go
@@ -934,9 +934,8 @@ func getLinuxSysInfo() SystemInfo {
934
idle1, total1 := readStat()
935
time.Sleep(baseDuration)
936
idle2, total2 := readStat()
937
- numCPU := runtime.NumCPU()
938
- if deltaIdle, deltaTotal := idle2-idle1, total2-total1; deltaTotal > 0 && numCPU > 0 {
939
- info.CPU = min(int((deltaTotal-deltaIdle)*100/deltaTotal/uint64(numCPU)), 100)
+ if deltaIdle, deltaTotal := idle2-idle1, total2-total1; deltaTotal > 0 {
+ info.CPU = min(int((deltaTotal-deltaIdle)*100/deltaTotal), 100)
940
}
941
942
// RAM占用:解析/proc/meminfo
0 commit comments