Operating System - HP-UX
1832864 Members
2837 Online
110048 Solutions
New Discussion

Re: How to get the complete process name

 
Fabrizio Rossi
New Member

How to get the complete process name

Hi all,
I need to read from C/C++ the list of processes on a HP-UX (11.00/11.11) with the full name of the executable. pstat() truncates the name at 14 chars. On the other side 'top' displays the full length name (and also 'ps' with UNIX95 environment variable set).
What calls are used by 'top' to do this ?

(BTW: on some installations of HP-UX 11.11 pstat truncates at 13 chars. Do you know if there is a patch for this ?)
4 REPLIES 4
Robert-Jan Goossens
Honored Contributor

Re: How to get the complete process name

Fabrizio Rossi
New Member

Re: How to get the complete process name

What I need is a way to get that information from C code. How do top and UNIX95= ps this 'trick' ?
In the thread reported by Robert-Jan it's mentioned the patch PHCO_26274, in the description it's written: "Now pstat(2) is enhanced to give command names upto 1024 bytes"
I couldn't find how to get these 1024 bytes. Is there a documentation/sample code on this pstat() version ?

TIA,
Fabrizio
Alex Lavrov
Regular Advisor

Re: How to get the complete process name

Hey,
I saw man messages about this topic, as I know, there is no way to get the complete data about the process. in Linux for example, there is fs /proc, where u can find all the information about each process, in HPUX there is no such thing ...

Wodisch
Honored Contributor

Re: How to get the complete process name

Hi,

there is a newer API out for this, but AFAIK only for 11i...

You should check on the HP Developers Site!

FWIW,
Wodisch