Hi folks,

I need to get information about hwloc objects, particularly processor. I would 
love to get 

NUMANode number
Socket number
Core number

for given processor. 

Currently, I'm parsing lstopo output but it's awkward:

GREPLINES=$(lstopo --physical --cpuset - | wc -l)
lstopo --physical --cpuset - | grep -B${GREPLINES} "PU p#1\b" | grep Core | 
tail -1

With first grep I will get all lines before the line with processor I'm 
interested in. 

With second grep I will get information about Cores and finally I will pick up 
the last line. (So it's first line with keyword Core before the line with 
processor.)

Is there a better way to do it? Something like

hwloc-info proc:1 ???

Or perhaps some c-api function to easily accomplish it?

Thanks a lot!
Jirka

Reply via email to