1846607 Members
1338 Online
110256 Solutions
New Discussion

Re: nkthread

 
SOLVED
Go to solution
HPIT_UX_MPE
New Member

nkthread

Hi,

How can I check the current usage of nkthread on HP-UX B.11.00 U?
4 REPLIES 4
Peter Godron
Honored Contributor
Solution

Re: nkthread

Hi,
and welcome to the forums !

Please see:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=940966

If you want to read about performance:
h21007.www2.hp.com/dspp/files/unprotected/devresource/Docs/TechPapers/UXPerfCookBook.pdf

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.
HPIT_UX_MPE
New Member

Re: nkthread

Hi,

But this does not work on 11.00

cc aaa.c
(Bundled) cc: "aaa.c", line 12: error 1588: "psd_numkthreadsallocd" undefined.
(Bundled) cc: "aaa.c", line 12: error 1531: Invalid member of struct or union.
(Bundled) cc: "aaa.c", line 13: error 1588: "psd_maxkthreads" undefined.
(Bundled) cc: "aaa.c", line 13: error 1531: Invalid member of struct or union.
(Bundled) cc: "aaa.c", line 14: error 1588: "psd_numprocsallocd" undefined.
(Bundled) cc: "aaa.c", line 14: error 1531: Invalid member of struct or union.
(Bundled) cc: "aaa.c", line 15: error 1588: "psd_maxprocs" undefined.
(Bundled) cc: "aaa.c", line 15: error 1531: Invalid member of struct or union.



cat aaa.c
#include
#include
#include

int main()
{
struct pst_dynamic dyn;
int error;

if ( pstat_getdynamic( &dyn, sizeof(dyn), 1, 0) == 1 )
{
printf("Thread usage: %d of %d\n", dyn.psd_numkthreadsallocd,
dyn.psd_maxkthreads);
printf("Proc usage: %d of %d\n", dyn.psd_numprocsallocd,
dyn.psd_maxprocs);
}
else
perror("pstat_getdynamic:");
}
Sandman!
Honored Contributor

Re: nkthread

That's because you are using the bundled C compiler that comes standard with the operating system. It's not ANSI C compliant and is primarily used for doing kernel builds. You need to purchase HP's ANSI-C product in order to compile and execute the C program successfully.
Sheriff Andy
Trusted Contributor

Re: nkthread