mongrel_proctitle like support in Unicorn
normalperson at yhbt.net
Thu Jun 17 19:21:50 EDT 2010
Jamie Wilkinson <jamie at 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>
> > > 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
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
More information about the mongrel-unicorn