Link to home
Start Free TrialLog in
Avatar of schubduese
schubdueseFlag for Switzerland

asked on

SuSE hwinfo - Structure of output for all hardware items needed

I would like to build up a database to save the output from hwinfo on SuSE. Unfortunatelly my system does not cover all hwitems which could be gathered by hwinfo. I need the Structure of all hw-items since the software might run on a machine which have hw-items my machine does not have.

Any Idea where to get that from?
Avatar of torimar
torimar
Flag of Germany image

You should be able to get the available items from this listing:
http://tech-zilla.com/man_pages/h/hwinfo.html
Or did I misunderstand what you mean by "structure"?
Avatar of schubduese

ASKER

This only shows the possible probes (hw-items) but not the structure of the output. Unfortunately I need the output structure to build up the database...
Wouldn't the hwinfo sourcecode show the output structure?
I don't know... that might be!
Well, the structure of the output must be defined - and that can only be done in the code itself. I for my part don't see any other way, unless hwinfo only calls routines that are handled and structured by other tools or scripts. In that case, the code of those tools or scripts would have to hold the info.

One of the many great advantages of being open-source :)
okay, so I need to check the source code then... I guess that is written in C... not the language I know....
Where do I find the source code for hwinfo?
http://download.opensuse.org/factory/repo/src-oss/suse/src/hwinfo-16.10-3.14.src.rpm

I'll have a look at it as well, but since it's x-mas today this will have to wait until the family celebration is over.
Okay I have downloaded it and looked into the Source Code.... I definitely would appreciate help here since I am not a C Programmer...
Okay I have downloaded it and looked into the Source Code.... I definitely would appreciate help here since I am not a C Programmer...
ASKER CERTIFIED SOLUTION
Avatar of torimar
torimar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here's the data:
hwinfo.txt
Thanks for the file

This looks completely different to my output. Could you do me a favour and call it again with the following command:

/usr/sbin/hwinfo --all --listmd

and post the output afterwards again. If the structures are still different, I need to switch to another solution to gather the hardware stuff on the box.

Thanks in advance
Here's the new file. The "listmd" command made it look a bit different.
It's a lot smaller now, plus a quick glance seems to indicate that this time only hardware was listed that actually exists on that machine.
hwinfo2.txt
Thank you for the output, I will compare it and hopefully identify some entries which do not exist in my file...