[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1033
  • Last Modified:

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?
0
schubduese
Asked:
schubduese
  • 8
  • 8
1 Solution
 
torimarCommented:
You should be able to get the available items from this listing:
http://tech-zilla.com/man_pages/h/hwinfo.html
0
 
torimarCommented:
Or did I misunderstand what you mean by "structure"?
0
 
schubdueseAuthor Commented:
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...
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
torimarCommented:
Wouldn't the hwinfo sourcecode show the output structure?
0
 
schubdueseAuthor Commented:
I don't know... that might be!
0
 
torimarCommented:
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 :)
0
 
schubdueseAuthor Commented:
okay, so I need to check the source code then... I guess that is written in C... not the language I know....
0
 
schubdueseAuthor Commented:
Where do I find the source code for hwinfo?
0
 
torimarCommented:
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.
0
 
schubdueseAuthor Commented:
Okay I have downloaded it and looked into the Source Code.... I definitely would appreciate help here since I am not a C Programmer...
0
 
schubdueseAuthor Commented:
Okay I have downloaded it and looked into the Source Code.... I definitely would appreciate help here since I am not a C Programmer...
0
 
torimarCommented:
Well, I studied some of the source files, but there are difficulties:
a) I still don't really know what exactly it is that you are looking for;
b) I find it extremely troublesome and time-intensive to look through practically all of the probed items;
c) Hwinfo also uses shell libraries; if I should start looking though them, there would be no end to the job.

I then went to a Suse 11.1 box that I happen to have around here and captured the output.
I received 98 "structures" (if I got it right and this is what you are after), quite a few of which do not seem to correspond to any hardware in that machine - at first glance at least.

I'll attach the information here.
Maybe you could compare it with your own output, importing from me what you did not yet have.
Then, once you know what you already have and what it is that you are still missing, you could post your results here. I'd then have another look at the source code trying to extract the missing info.

btw:
If you have access to more than one computer (desktop, laptop, office, school, friends, family), wouldn't you be able to cary a live version of SuSE on a flash stick around with you, that you could boot those computers with in order to just run the command once and collect the data?
This would even more reduce the number of missing structures.
0
 
torimarCommented:
Here's the data:
hwinfo.txt
0
 
schubdueseAuthor Commented:
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
0
 
torimarCommented:
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
0
 
schubdueseAuthor Commented:
Thank you for the output, I will compare it and hopefully identify some entries which do not exist in my file...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 8
  • 8
Tackle projects and never again get stuck behind a technical roadblock.
Join Now