Merge pull request #415 from rjnagal/diskinfo
Fix reading cache info for machines with unused packages.
This commit is contained in:
commit
64f42cf686
@ -179,7 +179,7 @@ func getTopology(sysFs sysfs.SysFs, cpuinfo string) ([]info.Node, int, error) {
|
|||||||
return nil, numCores, fmt.Errorf("could not detect any cores")
|
return nil, numCores, fmt.Errorf("could not detect any cores")
|
||||||
}
|
}
|
||||||
for idx, node := range nodes {
|
for idx, node := range nodes {
|
||||||
caches, err := sysinfo.GetCacheInfo(sysFs, node.Cores[0].Id)
|
caches, err := sysinfo.GetCacheInfo(sysFs, node.Cores[0].Threads[0])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, -1, fmt.Errorf("failed to get cache information for node %d: %v", node.Id, err)
|
return nil, -1, fmt.Errorf("failed to get cache information for node %d: %v", node.Id, err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user