1830899 Members
3421 Online
110017 Solutions
New Discussion

Ps command

 
Chartier Jerome
Frequent Advisor

Ps command

Hello,

When I launch the ps command with several switches (-eaf for example), the output on the screen is truncated (command path). My term is vt220 or 320. Have you got any idea to output the full path in the output.

Thanks in advance

REgards

J??r??me
J@Y
7 REPLIES 7
Sridhar Bhaskarla
Honored Contributor

Re: Ps command

Hi J??r??me,

Depending on what Terminal you use, there would an option to "unwrap" the lines. You will need to enable it.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Robin Wakefield
Honored Contributor

Re: Ps command

Hi Jerome,

If you mean that the command associated with each process is not shown in full, please refer to:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x400557bd90a9d611abdb0090277a778c,00.html

rgds, Robin
James R. Ferguson
Acclaimed Contributor

Re: Ps command

Hi:

I addition to Sri's comments, remember that
the kernel saves only a finite subset of the command line (args). Hence, even after line-wrap, you may not see the complete command line.

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: Ps command

Jerome,

Have a look at this thread about showing all the command line args via ps:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x3b6142308663d611abdb0090277a778c,00.html

Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: Ps command

Hi (again) Jerome:

I should add that on 11.0 you're limited to 64-characters. On 11.11, add the '-x' option to the 'ps' arguments to extend your command display to 1024 characters.

Regards!

...JRF...
Dietmar Konermann
Honored Contributor

Re: Ps command

Just an additional hint... 11.00 with PHCO_26274, PHKL_26008 and PHKL_28202 offers the same ps -x option.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
T. M. Louah
Esteemed Contributor

Re: Ps command

Try UNIX95 ps implementation, you can control the nbr of colums in ur output, e.g. I use the following command to sort memory consumption per process :

# UNIX95= ps -eo vsz,ruser,ppid,pid,comm |sort -rn |more
16872 root 3344 3475 monconfig
7968 root 1 1840 prm3d
4444 root 1 1413 rpcd
2952 root 1 1868 swagentd


vsz: Memory in KBytes
PPID: Parent Process ID
Comm: Command can be replaced by `args` for more path details. here when ruser is omitted:
#UNIX95= ps -eo vsz,ppid,pid,args |sort -rn |more
16872 3344 3475 ./monconfig
7968 1 1840 /opt/prm/bin/prm3d
4444 1 1413 /opt/dce/sbin/rpcd
2952 1 1868 /usr/sbin/swagentd -r
2928 1 1805 /opt/perf/bin/midaemon
..

UNIX95 specifies to use the XPG4 behavior for ps(1). Please refer to EXTERNAL INFLUENCES in ps manpages.
Cheers,
T??
PAP! (a.k.a. PLIZ ASSIGN POINTS)
Little learning is dangerous!