Operating System - HP-UX
1754322 Members
2646 Online
108813 Solutions
New Discussion юеВ

Hardware Information in HP-UX (programming language: C++)

 
SOLVED
Go to solution
MariaS
New Member

Hardware Information in HP-UX (programming language: C++)

Hello,

I hope you can help me! I need some hardware information for making my programm run on only a few computers.
The last week I was searching the internet for possibilities to get hardware information in HP-UX within my C++ programm. It wasn't very successful. I found a few calls, which I can use for the command line, but I wanted to avoid system calls.

In Linux I could use the /proc folder for most information. But as far as I know, in HP-UX doesn't exist such a folder, am I right? Does anybody know how I could get access to system and hardware information otherwise? Are there any usefull libraries?

I found already the "sys/pstat.h" library and i could use it to get the number of cpu's, but that is all ;-(

These are the information I would need:

- Hard disk info like the caption of it
- Bios: caption/manufacturer
- Mainboard information (the caption, too)
- CPU ID
- Video/sound card information
- Mac-Address (I found an example for HP-UX to use "#include sys/kinfo.h" But I couldn't use it because it doesn't exist within my HP-UX..)

I hope you can help me, I am totally new to this operating system..

Thank you and best regards,
Maria
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Hardware Information in HP-UX (programming language: C++)

Shalom Maria,

Keep in mind HP stopped selling PA-RISC servers end of last year and now sells Intel/Itanium IA64 servers.

Here is something to look at.

http://linux.softpedia.com/get/System/System-Administration/SysInfo-DC-for-HP-UX-26419.shtml

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Torsten.
Acclaimed Contributor

Re: Hardware Information in HP-UX (programming language: C++)

BTW, you won't find a BIOS at all in hp-ux servers, in very rare cases a video card and sometimes up to 80 MAC addresses or more ...

The serial number would be very unique ...

# getconf MACHINE_SERIAL

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
James R. Ferguson
Acclaimed Contributor
Solution

Re: Hardware Information in HP-UX (programming language: C++)

Hi Maria:

> I found a few calls, which I can use for the command line, but I wanted to avoid system calls.

You aren't going to avoid system calls :-) Command-line commands or a C/C++/Perl programs are still going to rely on underlying system and library interfaces.

> In Linux I could use the /proc folder for most information. But as far as I know, in HP-UX doesn't exist such a folder, am I right?

That's correct. HP-UX does not have a '/proc' filesystem.

You can use system and library calls like 'sysconf(2)' and 'confstr(3C)' to fetch various machine properties. The manpages for these will guide you.

http://www.docs.hp.com/en/B2355-60130/index.html

Regards!

...JRF...
MariaS
New Member

Re: Hardware Information in HP-UX (programming language: C++)

Thank you all for your answers! I will work off all your answers and I hope I can implement useful solutions..

Thanks a lot! :-)

Best regards,
Maria

James R. Ferguson
Acclaimed Contributor

Re: Hardware Information in HP-UX (programming language: C++)

Hi Maria:

If you are satistied with the answers you have received, please read:

http://forums.itrc.hp.com/service/forums/helptips.do?#28

Assigning points is both a way of saying "thank you" and a way of showing future readers of your thread what helped you solve your problem.

Regards!

...JRF...