1753427 Members
4807 Online
108793 Solutions
New Discussion юеВ

pstat_getproc problem

 
pedro_17
New Member

pstat_getproc problem

We have got an application that calls the system call pstat_getproc, and then the application returns the following:
pstat_getproc:Value too large to be stored in data type. We are using HP_UX 11.00, is there any reported error for this system call.

Thanks.
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor

Re: pstat_getproc problem

I assume that you are using an array of struct pst_status and are using sizeof(struct pst_status) for your elemsize and the number of elements in your array for elemcount.
If it ain't broke, I can fix that.
doug hosking
Esteemed Contributor

Re: pstat_getproc problem

HP-UX 11.00 supports both 32 and 64 bit processes. If a 32 bit program asks about a 64 bit process, it is possible that the resulting values will be too large to fit in the available space. (For example, a size or address may no longer fit in a 32 bit variable.)

Please see the 11.00 release notes, available in /usr/share/doc, for details on changes to the pstat interfaces. Quoting in part:

pstat(2) provides a number of wrappers and corresponding structures
to get information from the kernel. In a few cases, the values from a
64-bit kernel cannot be returned in 32-bit fields of these structures.
A new error EOVERFLOW is returned.

...

There is much more information available in that section that should be helpful to you.