unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* Setting app name for process list
@ 2010-07-08 20:55 Paul Dlug
  2010-07-08 21:22 ` Devin Ben-Hur
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Dlug @ 2010-07-08 20:55 UTC (permalink / raw)
  To: mongrel-unicorn

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.
I'm running unicorn for several apps on the same host and finding it
hard to track which is which, also useful for various monitoring
scripts to ensure that X number of processes are running.


--Paul
_______________________________________________
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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting app name for process list
  2010-07-08 20:55 Setting app name for process list Paul Dlug
@ 2010-07-08 21:22 ` Devin Ben-Hur
  2010-07-08 21:42   ` Eric Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Devin Ben-Hur @ 2010-07-08 21:22 UTC (permalink / raw)
  To: unicorn list, Paul Dlug

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

+    Using an absolute path for for CONFIG_FILE is recommended as it
+    makes multiple instances of Unicorn easily distinguishable when
+    viewing ps(1) output.
_______________________________________________
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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting app name for process list
  2010-07-08 21:22 ` Devin Ben-Hur
@ 2010-07-08 21:42   ` Eric Wong
  2010-07-09  5:09     ` Paul Dlug
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Wong @ 2010-07-08 21:42 UTC (permalink / raw)
  To: unicorn list; +Cc: Paul Dlug

Devin Ben-Hur <dbenhur@whitepages.com> 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
>
> +    Using an absolute path for for CONFIG_FILE is recommended as it
> +    makes multiple instances of Unicorn easily distinguishable when
> +    viewing 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):

   http://mid.gmane.org/4C32926D.5080400@gmail.com

-- 
Eric Wong
_______________________________________________
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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting app name for process list
  2010-07-08 21:42   ` Eric Wong
@ 2010-07-09  5:09     ` Paul Dlug
  2010-07-09  5:44       ` Jeremy Evans
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Dlug @ 2010-07-09  5:09 UTC (permalink / raw)
  To: Eric Wong; +Cc: unicorn list

On Thu, Jul 8, 2010 at 5:42 PM, Eric Wong <normalperson@yhbt.net> wrote:
> Devin Ben-Hur <dbenhur@whitepages.com> 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
>>
>> +    Using an absolute path for for CONFIG_FILE is recommended as it
>> +    makes multiple instances of Unicorn easily distinguishable when
>> +    viewing 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):
>
>   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.


--Paul
_______________________________________________
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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting app name for process list
  2010-07-09  5:09     ` Paul Dlug
@ 2010-07-09  5:44       ` Jeremy Evans
  0 siblings, 0 replies; 5+ messages in thread
From: Jeremy Evans @ 2010-07-09  5:44 UTC (permalink / raw)
  To: unicorn list

On Thu, Jul 8, 2010 at 10:09 PM, Paul Dlug <paul.dlug@gmail.com> wrote:
> On Thu, Jul 8, 2010 at 5:42 PM, Eric Wong <normalperson@yhbt.net> wrote:
>> Devin Ben-Hur <dbenhur@whitepages.com> 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
>>>
>>> +    Using an absolute path for for CONFIG_FILE is recommended as it
>>> +    makes multiple instances of Unicorn easily distinguishable when
>>> +    viewing 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):
>>
>>   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 = ([ 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-07-09  5:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-08 20:55 Setting app name for process list Paul Dlug
2010-07-08 21:22 ` Devin Ben-Hur
2010-07-08 21:42   ` Eric Wong
2010-07-09  5:09     ` Paul Dlug
2010-07-09  5:44       ` Jeremy Evans

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).