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
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? > > 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
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-proctitleFWIW 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
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> > 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 realtimeThat 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.0Thanks :> -- Eric Wong
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.rbThis 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