Help needed understanding lshw parsing (aka, what is needed)

70 views
Skip to first unread message

Johannes Ziemke

unread,
Aug 19, 2016, 3:11:02 PM8/19/16
to Collins
Hi,

I have a bit of a uncommon use case: I want to manage a bunch of macs[1] with collins and currently looking into how to get hw data for them. I started writing a python script to gather data from system_profiler and sysctl but struggle to create a lshw file that gets parsed properly by collins. This is what I got so far: https://gist.github.com/discordianfish/e0f3a19524ebfd5c37842cf10f556ed0
Collins accepts that, but the asset in the UI doesn't show any hw details saying 'This asset is(sic!) does not report any CPUs in LSHW'.

I tried understanding the parser code.. it's an parser and it's scala so not much success. Maybe someone knows right away which fields/nodes are important and which not? Or point me to the actual code that is pointing to the lshw xml fields etc.

Can also release the script later, maybe we're not the only ones rackin' macs :)


Reply all
Reply to author
Forward
0 new messages