From owner-freebsd-questions@FreeBSD.ORG Wed Mar 7 18:34:15 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7C9816A400 for ; Wed, 7 Mar 2007 18:34:15 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by mx1.freebsd.org (Postfix) with ESMTP id 9410E13C442 for ; Wed, 7 Mar 2007 18:34:15 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from relay6.apple.com (a17-128-113-36.apple.com [17.128.113.36]) by mail-out4.apple.com (8.13.8/8.13.8) with ESMTP id l27IYFGc009244; Wed, 7 Mar 2007 10:34:15 -0800 (PST) Received: from relay6.apple.com (unknown [127.0.0.1]) by relay6.apple.com (Symantec Mail Security) with ESMTP id 5F013100FA; Wed, 7 Mar 2007 10:34:15 -0800 (PST) X-AuditID: 11807124-9c41ebb0000007df-32-45ef05a7b532 Received: from [17.214.13.96] (cswiger1.apple.com [17.214.13.96]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by relay6.apple.com (Apple SCV relay) with ESMTP id 458BB1009A; Wed, 7 Mar 2007 10:34:15 -0800 (PST) In-Reply-To: <5A82D35B-AF37-4D57-B4DF-D90CFA9C84E6@shire.net> References: <5A82D35B-AF37-4D57-B4DF-D90CFA9C84E6@shire.net> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Wed, 7 Mar 2007 10:34:14 -0800 To: "Chad Leigh -- Shire.Net LLC" X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== Cc: User Questions Subject: Re: ps showing [appname] for some things -- how to get whole thing? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2007 18:34:15 -0000 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 ``'', and a process which is blocked while trying to exit is listed as ``''. 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