ps grep suggest.

srikanthrad
srikanthrad used Ask the Experts™
on
grep is showing only half of the output. It should supposedly show the full-output,. Please suggest.

I need to grep newyork-bridge from the result.

server 22:27 uid:uid> ps -Aef | grep 26030
uid   26030     1  0 21:33 ?        00:00:10 /sbcimp/run/tp/sun/jre/v1.6.0_10/bin/java -Xms256M -Xmx256M -classpath :lib/aopalliance-1.0.jar:lib/avalon-framework-4.1.3.jar:lib/common-cfg-0.1.291.jar:lib/commons-logging-1.1.jar:lib/commons-pool-1.3.jar:lib/connector-1.0.jar:lib/dhbcore-DH000-L50920.jar:lib/jms-1.1.ja


uid   26030     1  0 21:33 ?        00:00:10 /sbcimp/run/tp/sun/jre/v1.6.0_10/bin/java -Xms256M -Xmx256M -classpath :lib/aopalliance-1.0.jar:lib/avalon-framework-4.1.3.jar:lib/common-cfg-0.1.291.jar:lib/commons-logging-1.1.jar:lib/commons-pool-1.3.jar:lib/connector-1.0.jar:lib/dhbcore-DH000-L50920.jar:lib/jms-1.1.jar:lib/jta-1.0.1B.jar:lib/junit-3.8.1.jar:lib/log4j-1.2.14.jar:lib/logkit-1.0.1.jar:lib/london-bridge-0.1.137.jar:lib/mq-6.0.2.1.jar:lib/mqjms-6.0.2.1.jar:lib/servlet-api-2.3.jar:lib/slf4j-api-1.5.6.jar:lib/slf4j-log4j12-1.5.6.jar:lib/spring-2.5.6.jar:lib/spring-aop-2.5.6.jar:lib/spring-beans-2.5.6.jar:lib/spring-context-2.5.6.jar:lib/spring-context-support-2.5.6.jar:lib/spring-core-2.5.6.jar:lib/spring-integration-adapter-1.0.3.RELEASE.jar:lib/spring-integration-core-1.0.3.RELEASE.jar:lib/spring-integration-jms-1.0.3.RELEASE.jar:lib/spring-jms-2.5.6.jar:lib/spring-test-2.5.6.jar:lib/spring-tx-2.5.6.jar:lib/tibjms-4.4.jar:lib/utils-0.1.162.jar:lib/xpp3_min-1.1.3.4.O.jar:lib/xstream-1.2-patched.jar -Djava.endorsed.dirs=lib/endorsed com.ubs.etdet.skore.Launcher newyork-bridge-context.xml com/ubs/etdet/skore/dev-context.xml


This is a GNU Linux system.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Nem SchlechtIT Supervisor
Top Expert 2009
Commented:
Actually, I think this is still 'ps' - it just knows that its piping its output and thus truncating it.   Add the '-w' flag to prevent this:

   ps -wAef | grep 26030

Author

Commented:
server 22:43 uid:uid> ps -wAef | grep 26030
uid 26030     1  0 21:33 ?        00:00:12 /sbcimp/run/tp/sun/jre/v1.6.0_10/bin/java -Xms256M -Xmx256M -classpath :lib/aopalliance-1.0.jar:lib/avalon-framework-4.1.3.jar:lib/common-cfg-0.1.291.jar:lib/commons-logging-1.1.jar:lib/commons-pool-1.3.jar:lib/connector-1.0.jar:lib/dhbcore-DH000-L50920.jar:lib/jms-1.1.ja
skedev    3343 31018  0 22:43 pts/14   00:00:00 grep 26030

Still the same.... Please suggest.
Nem SchlechtIT Supervisor
Top Expert 2009

Commented:
Hmmm.. actually, I'm seeing the opposite.  I'm getting truncated results when I *don't* pipe.  When, I do, I always see everything.

Which flavor UNIX are you running?  (If you're not sure, do a 'cat /etc/*release*' in a terminal).
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Author

Commented:
Red Hat Enterprise Linux AS release 3 (Taroon Update 9)
2.4.21-50.EL:RHEL3:026:i686:IB-dev
Nem SchlechtIT Supervisor
Top Expert 2009

Commented:
What's also odd is that its truncating at 350 characters.  You'd think 80 or maybe 160, but 350?  Doesn't make much sense to me.
Nem SchlechtIT Supervisor
Top Expert 2009

Commented:
How are you getting the long/full version?  You're just running the 'ps -Aef' (without the grep) and getting the full command line args?

Author

Commented:
Increase the size of font, drag my putty window to two Desktops, change window appearance and then I get the total classpath. Still can't grep though.
Most Valuable Expert 2013
Top Expert 2013
Commented:
Try
ps -Aefwww ...
or mabe
ps -Aef --cols=1024
if your ps supports it.
wmp

Author

Commented:
ps -efwww worked perfectly fine. This is brilliant. Why is www working? Please suggest.
Most Valuable Expert 2013
Top Expert 2013

Commented:
"-w" means "wide", so "-ww" means "extra wide" and "-www" means "extra extra wide"  :-)
More than three "w"s do not have further effect, as I've seen so far.
Thx for the points!
wmp

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial