From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=-0.6 required=5.0 tests=AWL,FREEMAIL_FROM, MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD,T_DKIM_INVALID shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Jeremy Evans Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: Setting app name for process list Date: Thu, 8 Jul 2010 22:44:14 -0700 Message-ID: References: <4C36418F.4010209@whitepages.com> <20100708214209.GA7500@dcvr.yhbt.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1278654263 17548 80.91.229.12 (9 Jul 2010 05:44:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 9 Jul 2010 05:44:23 +0000 (UTC) To: unicorn list Original-X-From: mongrel-unicorn-bounces@rubyforge.org Fri Jul 09 07:44:22 2010 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=7dwSGJuUTkPW4qJs1TtTzIZTCn/5m0H81abhFVeCg54=; b=Ds4sd4LZwbXJgll3V963+0tc6NtNAJL94AVxpgj9Pwpoa0JGhXTHwei/1wEqzR5SHs LnELgUVyuwtYff/VZfwV/KVQsGOZGMtplB8RblqwlKCjKrE4ShuxK/rvLmMU+3uYkyy2 n4srm2RXrGUo+Hn+VHSBvjl0tH2vTh/bm8Vic= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=j5BDWLQFbAUAIERZboS4o1hlV5tcAOLB0PoCTE7Zvof6a5hHIKtcHyLNXSt0SUhKpS SINeS803D6fFzxi26DCWJ6BjMJ+mh9joRWpckT1gCQQoyQ/44bkHBOUEyqpb50cy83m0 uSAxSDDrPO4ynFmhBV5IGgdsvODXa6pw4Rau4= In-Reply-To: X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org Xref: news.gmane.org gmane.comp.lang.ruby.unicorn.general:628 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OX6Np-0000hj-D5 for gclrug-mongrel-unicorn@m.gmane.org; Fri, 09 Jul 2010 07:44:21 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 5CDFE185838D; Fri, 9 Jul 2010 01:44:20 -0400 (EDT) Received: from mail-iw0-f178.google.com (mail-iw0-f178.google.com [209.85.214.178]) by rubyforge.org (Postfix) with ESMTP id 06BEE1858391 for ; Fri, 9 Jul 2010 01:44:17 -0400 (EDT) Received: by iwn9 with SMTP id 9so2176951iwn.23 for ; Thu, 08 Jul 2010 22:44:17 -0700 (PDT) Received: by 10.231.85.206 with SMTP id p14mr7226031ibl.89.1278654256530; Thu, 08 Jul 2010 22:44:16 -0700 (PDT) Received: by 10.231.183.134 with HTTP; Thu, 8 Jul 2010 22:44:14 -0700 (PDT) On Thu, Jul 8, 2010 at 10:09 PM, Paul Dlug wrote: > On Thu, Jul 8, 2010 at 5:42 PM, Eric Wong wrote: >> Devin Ben-Hur wrote: >>> On 7/8/10 1:55 PM, Paul Dlug wrote: >>>> Is there a way to set an application name for unicorn processes? >>>> Basically an arbitrary name which would then show up in the process >>>> list to identify unicorn processes, like what thin does with --tag. >>> >>> A patch to do something like that was recently rejected. Instead the >>> documentation was updated with Eric's recommendated solution to instance >>> identification: >>> http://rubyforge.org/pipermail/mongrel-unicorn/2010-July/000620.html >>> >>> + =A0 =A0Using an absolute path for for CONFIG_FILE is recommended as it >>> + =A0 =A0makes multiple instances of Unicorn easily distinguishable when >>> + =A0 =A0viewing ps(1) output. >> >> Lawrence Pit also recommends running each app as a separate user, >> which is also a great idea (IMHO, though some ops people I know >> dislike this): >> >> =A0 http://mid.gmane.org/4C32926D.5080400@gmail.com > > I think both of these solutions are undesirable, relying on the config > file path is not ideal and running with different users is practical > in my environment. Both these point out the need for some feature to > distinguish running applications, I think adding a configurable > application name/tag would be very useful, not sure how much work it > would be but I can look at adding a patch if there is interest. The patch was already submitted and rejected. If you want this feature, you can implement it yourself in the config file with the following code: class Unicorn::HttpServer def proc_name(tag) $0 =3D ([ File.basename(START_CTX[0]), "application name/tag", tag ]).concat(START_CTX[:argv]).join(' ') end end Jeremy _______________________________________________ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying