On Mar 7, 2007, at 2:49 AM, Chad Leigh -- Shire.Net LLC wrote:
On my 6.1 system I have a script that launches some java programs [jdk142] and when I do a "ps -auxwww" I get the whole java command line that was used in launching.

On my 6.2 system with jdk15 teh scame scripts launch the same java programs but I just get [java] in the ps output. Nothing in the ps manpage jumped out at me. I would like to be able to get the whole commandline when I do the ps

From the manpage:

When printing using the command keyword, a process that has exited and has a parent that has not yet waited for the process (in other words, a zombie) is listed as ``<defunct>'', and a process which is blocked while trying to exit is listed as ``<exiting>''. If the command vector cannot be located (usually because it has not been set, as is the case of system processes and/or kernel threads) the command name is printed within square brackets. The ps utility makes an educated guess as to the file name and arguments given when the process was created by examining memory or the swap area. The method is inherently somewhat unreliable and in any event a process is entitled to destroy this information, so the names cannot be depended on too much. The ucomm (accounting) keyword can, how-
     ever, be depended on.

In other words, the process is allowed to over-write the environment (aka, the command line args & exported env variables) and that will prevent ps from reliably returning that info. All you can be sure of it getting argv[0], which is used for accounting in the ucomm variable....

--
-Chuck

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to