parent
37c114fe6c
commit
b6da2bd76e
|
@ -146,7 +146,7 @@ func Info() ([]InfoStat, error) {
|
||||||
func parseDmesgBoot(fileName string) (InfoStat, int, error) {
|
func parseDmesgBoot(fileName string) (InfoStat, int, error) {
|
||||||
c := InfoStat{}
|
c := InfoStat{}
|
||||||
lines, _ := common.ReadLines(fileName)
|
lines, _ := common.ReadLines(fileName)
|
||||||
var cpuNum int
|
cpuNum := 1 // default cpu num is 1
|
||||||
for _, line := range lines {
|
for _, line := range lines {
|
||||||
if matches := cpuEnd.FindStringSubmatch(line); matches != nil {
|
if matches := cpuEnd.FindStringSubmatch(line); matches != nil {
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue