1753774 Members
6232 Online
108799 Solutions
New Discussion юеВ

HPUX kernel version

 
yck
Advisor

HPUX kernel version

Hi all,

Is that possible to get kernel version of HPUX machine at runtime by using C/C++ code or API? If yes, how could we do it? Thanks.

-ck
ck
11 REPLIES 11
harry d brown jr
Honored Contributor

Re: HPUX kernel version

man sysconf


live free or die
harry
Live Free or Die
harry d brown jr
Honored Contributor

Re: HPUX kernel version

and man getconf


live free or die
harry
Live Free or Die
A. Clay Stephenson
Acclaimed Contributor

Re: HPUX kernel version

There are 2 system calls that can be of use: uname() and sysconf. Man 2 sysconf and man 2 uname for details. You should be warned that you may be writing non-portable code.
If it ain't broke, I can fix that.
harry d brown jr
Honored Contributor

Re: HPUX kernel version

Clay, you can if/def it, right?

live free or die
harry
Live Free or Die
yck
Advisor

Re: HPUX kernel version

Hi all,

Actually I'm trying to refer to sysconf, getconf but there is no parameter to let me get kernel version of a local HPUX machine. Do I miss out somethings?

- ck
ck
T G Manikandan
Honored Contributor

Re: HPUX kernel version

How about using the

uname -r

THanks
yck
Advisor

Re: HPUX kernel version

That is operating system version... Not kernel version.

-ck
ck
Michael Tully
Honored Contributor

Re: HPUX kernel version

Hi CK,

# what /stand/vmunix

This gives lots of kernel related information.

Michael
Anyone for a Mutiny ?
yck
Advisor

Re: HPUX kernel version

However, I need to retrieve the kernel version of HPUX machine by using C/++ API..
Could it be possible to do it?

Thanks

-ck

ck