Operating System - HP-UX
1828490 Members
2668 Online
109978 Solutions
New Discussion

pst_processor compiler problem

 
eric wang_2
Frequent Advisor

pst_processor compiler problem

When I compile a program ,would like to get cpu usage ,compile
Referenced object 'psp_logical_id' is
not a member of struct pst_processor
["/usr/include/sys/pstat/global_pstat_body.h", line 316].
cpu[i].id = (int)s_pst_processor.psp_logical_id;

Error 187: "cpuusage3.cpp", line 123 # Referenced object 'psp_processor_state'
is not a member of struct pst_processor
["/usr/include/sys/pstat/global_pstat_body.h", line 316].
cpu[i].online = s_pst_processor.psp_processor_state==P

how to solved this problem
is any patch to install,
thanks
6 REPLIES 6
Dennis Handly
Acclaimed Contributor

Re: pst_processor compiler problem

What are the fields in struct pst_processor? Is there some intermediate struct?

>is any patch to install?

Why should there be? This is a user problem.
James R. Ferguson
Acclaimed Contributor

Re: pst_processor compiler problem

hi Eric:

I presume that this thread is really a continuation of your earlier one:

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1432820

You really should have continued your discussion there or linked this thread to it when you opened it.

That said, I previously pointed you to not only the 'pstat(2)' manpages but also suggested you look at the various 'pstat()' header files that exist:

# 'ls -l /usr/include/sys/pstat*

Note the "*" in the above. It exposes more than just 'pstat.h'. The manpages note that the various structures, and identifiers are found in and .

Have you confirmed that you correctly included all of the necessary header files?

Regards!

...JRF...

eric wang_2
Frequent Advisor

Re: pst_processor compiler problem

I have solved my problem by add define
thanks
James R. Ferguson
Acclaimed Contributor

Re: pst_processor compiler problem

Hi (again):

> I have solved my problem by add define
thanks

It would still be appropriate for you to assign points to your threads for the suggestions you received. Please see:

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

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

http://forums.itrc.hp.com/service/forums/pageList.do?userId=WW161729&listType=unassigned&forumId=1

...JRF...
Dennis Handly
Acclaimed Contributor

Re: pst_processor compiler problem

>I have solved my problem by add define

Which define was that? Other than -D_PSTAT64 or some of the namespace macros, you shouldn't need some defines.
Dennis Handly
Acclaimed Contributor

Re: pst_processor compiler problem

You must be on 11.11 and you would need to use -D_ICOD_BASE_INFO to get to that field.