AuthorityBase is an IT knowledgebase dedicated to the world of databses and RDBMS systems by David Yahalom. Here you'll find articles, tips and general knowledge about Oracle, DB2 LUW, Sql Server, MySql and more. I hope you'll enjoy your stay.
31st
JUL
Show full process name / path / string in Solaris using ps
Posted by David Yahalom under Solaris
Let’s say you have a JAVA process running on an old Sun Solaris machine. You want to see the full path of the process running including any run-time variables that were passed to it.
Using ps -eaf | grep -i java gives us this:
[root@hostname ~]# which ps /bin/ps [root@hostname ~]# ps -eaf | grep -i java nobody 4589 4588 0 14:26:35 ? 0:21 /usr/java1.4/bin/java -Djava.awt.headless=true -Xms200m -Xmx300m org.apache.jse
As you can see the process name is trimmed and you can’t see all parameters passed to Java. No matter what parameters or scripting you’ll try and do, using /bin/ps (default) will crop your process name.
There is, however, an entriely different ps program we can use.
[root@hostname ~]#/usr/ucb/ps -auxwww | grep -i java nobody 4589 0.1 4.228480842528 ? S 14:26:35 0:21 /usr/java1.4/bin/java -Djava.awt.headless=true -Xms200m -Xmx300m org.apache.jserv.JServ /jserv/etc/jserv.properties
Fantastic!
Reader's Comments
Leave a Reply
Post Meta
-
July 31, 2008 -
Solaris -
One Comments
-
Comments Feed
AuthorityBase by David Yahalom is powered by Wordpress. Designed by Free WordPress Themes.

[…] - Show full process name / path / string in Solaris using ps saved by xmcrxangelx2008-09-14 - Yay for Zones! saved by veerenmaristeam32008-08-25 - Installing […]