Skip to content

Commit b2e06de

Browse files
authored
Merge pull request #410 from infastin/model
Add more attributes that match CPU model on Linux
2 parents 9e879f1 + 8bfbc92 commit b2e06de

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: pkg/cpu/cpu_linux.go

+6
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ func processorsGet(ctx *context.Context) []*Processor {
101101
}
102102
if len(lp.Attrs["model name"]) != 0 {
103103
proc.Model = lp.Attrs["model name"]
104+
} else if len(lp.Attrs["Processor"]) != 0 { // ARM
105+
proc.Model = lp.Attrs["Processor"]
106+
} else if len(lp.Attrs["cpu model"]) != 0 { // MIPS, ARM
107+
proc.Model = lp.Attrs["cpu model"]
108+
} else if len(lp.Attrs["Model Name"]) != 0 { // LoongArch
109+
proc.Model = lp.Attrs["Model Name"]
104110
} else if len(lp.Attrs["uarch"]) != 0 { // SiFive
105111
proc.Model = lp.Attrs["uarch"]
106112
}

0 commit comments

Comments
 (0)