unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* mongrel_proctitle like support in Unicorn
@ 2009-12-02 21:52 Justin Hahn
  2009-12-02 22:04 ` Michael Guterl
  0 siblings, 1 reply; 5+ messages in thread
From: Justin Hahn @ 2009-12-02 21:52 UTC (permalink / raw)
  To: mongrel-unicorn

Before I go off ans try cutting my own horrible monkey patch to
unicorn, has anyone tried implementing something like
mongrel_proctitle for Unicorn?

We've been playing with Unicorn in our test environments and it looks
very promising, but something we're really addicted to is the ability
to see what each mongrel is doing "Right Now" via top and ps.

I don't think this would be terribly hard to add to Unicorn, but I
figured I'd ask the public list before reinventing the wheel.

---
Justin Hahn
Systems Architect

RBM Technologies, Inc.
25 Mt. Auburn St  ·  Cambridge, MA 02138
call  (617) 576-1234
visit www.rbmtechnologies.com

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

* Re: mongrel_proctitle like support in Unicorn
  2009-12-02 21:52 mongrel_proctitle like support in Unicorn Justin Hahn
@ 2009-12-02 22:04 ` Michael Guterl
  2010-06-17 22:22   ` Jamie Wilkinson
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Guterl @ 2009-12-02 22:04 UTC (permalink / raw)
  To: unicorn list

On Wed, Dec 2, 2009 at 4:52 PM, Justin Hahn <jhahn@rbmtechnologies.com> wrote:
> Before I go off ans try cutting my own horrible monkey patch to
> unicorn, has anyone tried implementing something like
> mongrel_proctitle for Unicorn?
>
> We've been playing with Unicorn in our test environments and it looks
> very promising, but something we're really addicted to is the ability
> to see what each mongrel is doing "Right Now" via top and ps.
>
> I don't think this would be terribly hard to add to Unicorn, but I
> figured I'd ask the public list before reinventing the wheel.
>
There's some rack middleware out there, RackProctitle, which provides
this functionality.  I have not used it with Unicorn, but I don't see
why it wouldn't work.

http://coderack.org/users/arya/entries/3-rack-proctitle

Best regards,
Michael Guterl

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

* Re: mongrel_proctitle like support in Unicorn
  2009-12-02 22:04 ` Michael Guterl
@ 2010-06-17 22:22   ` Jamie Wilkinson
  2010-06-17 23:21     ` Eric Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Jamie Wilkinson @ 2010-06-17 22:22 UTC (permalink / raw)
  To: mongrel-unicorn

Michael Guterl <mguterl <at> gmail.com> writes:

> 
> On Wed, Dec 2, 2009 at 4:52 PM, Justin Hahn <jhahn <at> rbmtechnologies.com>
wrote:
> > Before I go off ans try cutting my own horrible monkey patch to
> > unicorn, has anyone tried implementing something like
> > mongrel_proctitle for Unicorn?

> There's some rack middleware out there, RackProctitle, which provides
> this functionality.  I have not used it with Unicorn, but I don't see
> why it wouldn't work.
> 
> http://coderack.org/users/arya/entries/3-rack-proctitle

FWIW this doesn't seem to work out-of-box with Unicorn. Eric, do you know
offhand if it's possible to use middleware to call unicorn's proc_name? I'd love
to be able to watch what my unicorns are doing in realtime

Slightly related -- is it also possible to interrogate the current size of a
socket's backlog? (is this what Raindrops is for? It doesn't work out of box on
my mac, but I'd see about getting it working if it did)

Congrats on 1.0



_______________________________________________
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: mongrel_proctitle like support in Unicorn
  2010-06-17 22:22   ` Jamie Wilkinson
@ 2010-06-17 23:21     ` Eric Wong
  2010-06-22 23:14       ` Jamie Wilkinson
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Wong @ 2010-06-17 23:21 UTC (permalink / raw)
  To: unicorn list

Jamie Wilkinson <jamie@tramchase.com> wrote:
> Michael Guterl <mguterl <at> gmail.com> writes:
> > On Wed, Dec 2, 2009 at 4:52 PM, Justin Hahn <jhahn <at> rbmtechnologies.com>
> wrote:
> > > Before I go off ans try cutting my own horrible monkey patch to
> > > unicorn, has anyone tried implementing something like
> > > mongrel_proctitle for Unicorn?
> 
> > There's some rack middleware out there, RackProctitle, which provides
> > this functionality.  I have not used it with Unicorn, but I don't see
> > why it wouldn't work.
> > 
> > http://coderack.org/users/arya/entries/3-rack-proctitle
> 
> FWIW this doesn't seem to work out-of-box with Unicorn. Eric, do you know
> offhand if it's possible to use middleware to call unicorn's proc_name? I'd love
> to be able to watch what my unicorns are doing in realtime

That coderack link no longer works for me, but I see no reason why
Rack::ProcTitle in rack-contrib wouldn't work (based on my reading of
the code):

http://github.com/rack/rack-contrib/blob/master/lib/rack/contrib/proctitle.rb

I guess it holds onto $0 after the app is done dispatching...

> Slightly related -- is it also possible to interrogate the current size of a
> socket's backlog? (is this what Raindrops is for? It doesn't work out of box on
> my mac, but I'd see about getting it working if it did)

Yes, the backlog interrogation code is in Raindrops is very
Linux-specific.  The shared memory counters should be reasonably
portable to modern POSIX-ish systems (using GCC).

I have no idea if similar backlog interrogation functionality exists in
other operating systems.  I only learned of the Linux functionality
shortly before writing Raindrops.

If somebody could provide working patches for similar functionality in
other OSes, I'd be more than happy to include them into Raindrops.

> Congrats on 1.0

Thanks :>

-- 
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: mongrel_proctitle like support in Unicorn
  2010-06-17 23:21     ` Eric Wong
@ 2010-06-22 23:14       ` Jamie Wilkinson
  0 siblings, 0 replies; 5+ messages in thread
From: Jamie Wilkinson @ 2010-06-22 23:14 UTC (permalink / raw)
  To: unicorn list

On Jun 17, 2010, at 4:21 PM, Eric Wong wrote:

>>> http://coderack.org/users/arya/entries/3-rack-proctitle
>> 
>> FWIW this doesn't seem to work out-of-box with Unicorn. Eric, do you know
>> offhand if it's possible to use middleware to call unicorn's proc_name? I'd love
>> to be able to watch what my unicorns are doing in realtime
> 
> That coderack link no longer works for me, but I see no reason why
> Rack::ProcTitle in rack-contrib wouldn't work (based on my reading of
> the code):
> 
> http://github.com/rack/rack-contrib/blob/master/lib/rack/contrib/proctitle.rb

This works great . Thanks Eric.

For anyone else: I just dropped the above into lib/rack_proctitle.rb and added "use Rack::ProcTitle" in my Rails config.ru

Now me & my unicorns are like totally BFFs

-jamie
_______________________________________________
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-06-22 23:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-02 21:52 mongrel_proctitle like support in Unicorn Justin Hahn
2009-12-02 22:04 ` Michael Guterl
2010-06-17 22:22   ` Jamie Wilkinson
2010-06-17 23:21     ` Eric Wong
2010-06-22 23:14       ` Jamie Wilkinson

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).