Thanks for the sample code. I tried it out this morning and setup a
little Git repo for it on GitHub.
http://github.com/grempe/thin-proctitle/tree/master
I am having a couple of issues with it:
- This does not currently work on Solaris (well it works serving
pages, but the process title does not change). How can we change the
process title on Solaris?
http://unix.derkeiler.com/Newsgroups/comp.unix.solaris/2003-09/0370.html
- The display of the number of requests processed and queued does not
currently work. Shows '-' for now. Help?
- Can the process title change itself back to 'idle' when not handling
a current request?
- can this be converted to a Rails plugin so it 'just works'?
Maybe you or others in the group can take a look and help out? I
would love to see some patches from some folks with more Rack/Thin
expertise to get it working better.
Thanks,
Glenn
On Mar 19, 8:32 pm, macournoyer <macourno...@gmail.com> wrote:
> Should fairly easy w/ a Rack middleware:
> class ProcTitle
> def initialize(app)
> @app = app
> end
> def call(env)
> $0 = "thin #{env['HTTP_HOST']} handling #{env['HTTP_METHOD']}
> #{env['HTTP_REQUEST_URI']}"
> @app.call(env)
> end
> end
> use ProcTitle
> run Rack::Adapter::Rails.new(:root => '/var/www/rails_app')
> On Mar 19, 11:00 pm, Glenn Rempe <glenn.re...@gmail.com> wrote:
> > Something like this would be great for Thin if it were built in (and
> > of course worked equally well on OS X, Solaris, Linux). I am using
> > Solaris myself for hosting so you can implement that one first :-)
> >http://purefiction.net/mongrel_proctitle/
> > Cheers.