From: Dan O'Callaghan (ocalld@cogent-dsn.com)
Date: Tue Aug 24 2004 - 05:29:36 EDT
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
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:29:20 EDT