Is there any way to view the full contents of the command field when using ps -elf? I'm running a java process which has 4 lines worth of arguments. When i ps -elf no matter how much cut i use it will only display the first line of the command.
Thanks,
Since you have posted in the Linux forum, I will assume that your OS is linux.
Get the PID of the java process.
Replace the PID with its value in the following command.
cat /proc/PID/cmdline
It will show you all args passed to the java process.
All the procs will be in 1 single line with no visible spaces between them. Infact all of them are separated by NUL. You might want to replace the NUL with a whitespace and then view them. Ofcourse, this will have to be done programatically.
Look at this URL - The /proc File System
Vino
Thanks very much for that. I have also now found that ps -xw -w reveals all of the command line field.