SUMMARY: ps and process with path greater than 80 characters

From: Dan O'Callaghan <ocalld_at_cogent-dsn.com>
Date: Tue Aug 24 2004 - 06:08:56 EDT
Thanks to Mike, Vincent, Daniel and Anthony for the quick and easy
answer.
just add additional "w" to ps, i.e:
ps -auxwww

cheers
Dan.

On Tue, 2004-08-24 at 10:41, Mike Bennett wrote:
> How about /usr/ucb/ps -auxww (note the 2 w's).
> 
> Mike
> 
> -----Original Message-----
> From: sunmanagers-bounces@sunmanagers.org
> [mailto:sunmanagers-bounces@sunmanagers.org] On Behalf Of Dan
> O'Callaghan
> Sent: 24 August 2004 10:30
> To: Sunmanagers LIST
> Subject: ps and process with path greater than 80 characters
> 
> 
> Hi
> i'm trying to use ps to and grep a line of information ready to gawk the
> pid. Unfortunately the process is a long pathed java app and ps
> truncates the process.
> 
> output of ps as below:
> 
> bash-2.03# /usr/bin/ps -eaf
>      UID   PID  PPID  C    STIME TTY      TIME CMD
>      root   329   322  0   Aug 10 ?        3:14 /usr/bin/java -cp
> .:../lib/Fositex.jar:../lib/commons-net-1.1.0.jar cogent.corm
> 
> 
> 
> bash-2.03# /usr/ucb/ps -auxw
> root       329  0.1  4.25623220840 ?        S   Aug 10  3:14
> /usr/bin/java -cp .:../lib/Fositex.jar:../lib/commons-net-1.1.0.jar
> cogent.cormorant.evsm.evsme.EVPMain
> 
> /usr/ucb/ps returns the full path of the file.
> I need to grep EVPMain but 
> bash-2.03# /usr/ucb/ps -auxw |grep EVPMain dosen't return anything. it
> ignores everythinb after "commons-net-1.1.0.jar co" which would be the
> final entry if i used "/usr/ucb/ps -aux" redirecting screen output to a
> file produces the same result, all listings truncated even though to
> screen it produces the full path.
> 
> Is there anyway to grep process that have a path greater than 80
> characters?
> 
> is there a better way to trap the pid, i need it for a startup script. I
> can't use pkill as there are other java apps running.
> 
> cheers
> Dan.
> _______________________________________________
> sunmanagers mailing list
> sunmanagers@sunmanagers.org
> http://www.sunmanagers.org/mailman/listinfo/sunmanagers
> 
> ________________________________________________________________________
> In order to protect our email recipients, Betfair use SkyScan from 
> MessageLabs to scan all Incoming and Outgoing mail for viruses.
> 
> ________________________________________________________________________
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Tue Aug 24 06:08:49 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:36 EST