Thursday, December 27, 2007

Check all arguments of a running process

Many Java processes have long command lines, and as as a regular user, I may wish to determine that my java processes are running with the correct arguments or not.
unfortunately with the ps (/usr/bin/ps) command, users can only see the first 80 characters of command line, rest are ignored. So the user can not see the all command line arguments.

Solution:
1. Use pargs argument (ex. ps -eaf | pargs -a <pid>)
or
2. Use /usr/ucb/ps command ( /usr/ucb/ps -awwx | grep <pid>)

No comments: