From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MM2eX-0006O1-9c for qemu-devel@nongnu.org; Wed, 01 Jul 2009 12:27:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MM2eS-0006Kn-If for qemu-devel@nongnu.org; Wed, 01 Jul 2009 12:27:20 -0400 Received: from [199.232.76.173] (port=44562 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MM2eS-0006Ke-BE for qemu-devel@nongnu.org; Wed, 01 Jul 2009 12:27:16 -0400 Received: from mail2.shareable.org ([80.68.89.115]:55496) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MM2eR-0002mP-Dv for qemu-devel@nongnu.org; Wed, 01 Jul 2009 12:27:16 -0400 Date: Wed, 1 Jul 2009 17:27:10 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH] Allow setting qemu process name Message-ID: <20090701162710.GB4555@shareable.org> References: <20090701093251.GA12447@basil.fritz.box> <4A4B64B2.3040106@codemonkey.ws> <20090701134344.GT6760@one.firstfloor.org> <4A4B6B5B.5000106@codemonkey.ws> <20090701140644.GV6760@one.firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090701140644.GV6760@one.firstfloor.org> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andi Kleen Cc: qemu-devel@nongnu.org Andi Kleen wrote: > On Wed, Jul 01, 2009 at 08:57:47AM -0500, Anthony Liguori wrote: > > Andi Kleen wrote: > > >On Wed, Jul 01, 2009 at 08:29:22AM -0500, Anthony Liguori wrote: > > > > > >It's only default with -name. I don't think anyone would look through > > >/proc matching for process names, that would be too broken anyways. > > >If they look through ps ax they would still work. > > > > > > > If someone has a script today that uses top -n 1 | grep > > qemu-system-x86_64 that script will break. > > That would already break if qemu-system-x86_64 is by chance not in > the ~20 or so processes that take the most CPU time. That is what I meant > with already broken. I consider it very likely that the scripts > all use ps at least, which is not affected. These's also ps's "c" option: "Show the true command name. This is derived from the name of the executable file, rather than from the argv value. Command arguments and any modifications to them (see setproctitle(3)) are thus not shown." Looks liks Linux has 3 different command names to choose from: - argv[0] - PR_SET_NAME - Name derived from /proc/self/exe -- Jamie