1753797 Members
7267 Online
108805 Solutions
New Discussion юеВ

Output from ps command

 
Donald Osbourne
Occasional Advisor

Output from ps command

How do I prevent truncation of the COMMAND field when using the ps -ef command.

Apparently there is a limit on the width of the output fields, since lengthy process names are generally printed in a truncated format. Can this me modified?

Thank You
Don Osbourne
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: Output from ps command

The short answer is no; you gets what you gets and that's all that you gets. That is all that is available to the kernel.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: Output from ps command

Hi Donald:

The kernel keeps only a finite amount of the command line, and hence you are "stuck" with what you can see.

Regards!

...JRF...
S.K. Chan
Honored Contributor

Re: Output from ps command

Unless you're running HP-UX 11i, I don't think this behavior can be changed. On 11.i if you use "-x" option in the "ps" command it'll display up to 1024 chars in the command field vs the usual 64 chars. Do "man ps" for details (on an 11.i system of course).
Wodisch_1
Honored Contributor

Re: Output from ps command

Hi Donald,

AFAIK there is a new(er) patch out permitting you to show more than the standard up-to-64 characters of the command-line.
IIRC then it is PHCO_26274, so go to the ITRC main page, and from there click on "individual patches", then select "HP-UX", enter "ps(1)" as search string and check "exact phrase".

HTH,
Wodisch