With mongrel, I can do ps aux | grep ruby and see which mongrels are
serving up which rails apps. With thin, I don't see anything that
helps remind me which ports are serving which rails apps.
My linux fu is not that great, so maybe there's a better way to use ps
that will tell me?
If this sounds like a silly question, it's because our servers host
many Rails apps, most of which I don't write, and being able to see
which process is related to which app is sometimes very helpful.
If you run your thin processes under your login account, you could drop the "a" from the command, like "ps ux".
You could match the pids from the pidfiles to what ps shows you.
Could you use unix sockets instead of tcp sockets? I can see exactly what processes go with which app because the path of the socket file is listed in the ps output.
root 15131 0.0 23.4 209264 122740 ? S 05:09 0:06 thin server (/u/apps/almostserious/shared/pids/thin.1.sock) root 15133 0.0 23.4 209420 122852 ? S 05:09 0:07 thin server (/u/apps/almostserious/shared/pids/thin.2.sock)
On Tue, May 6, 2008 at 8:16 PM, Jeff <cohen.j...@gmail.com> wrote:
> With mongrel, I can do ps aux | grep ruby and see which mongrels are > serving up which rails apps. With thin, I don't see anything that > helps remind me which ports are serving which rails apps.
> My linux fu is not that great, so maybe there's a better way to use ps > that will tell me?
> If this sounds like a silly question, it's because our servers host > many Rails apps, most of which I don't write, and being able to see > which process is related to which app is sometimes very helpful.
end
use ProcTitle
run Rack::Adapter::Rails.new(:root => '/home/gpopescu/bbprojects/
ipspace/R2.1.6', :environment => 'development')
-------------------
There aren't a whole lot of ENV variables available to make a very
useful proctitle, but you may find some useful. Here's the ENV
variables I get:
(I munged my cookies in the above example). Anyway, you just make a
file called title.ru and run thin with "-R title.ru" for it to be
used. If you use a YAML file for the thin config, just add the line
"rackup: title.ru" to the YAML file.
--George
On May 6, 9:16 pm, Jeff <cohen.j...@gmail.com> wrote:
> With mongrel, I can do ps aux | grep ruby and see which mongrels are
> serving up which rails apps. With thin, I don't see anything that
> helps remind me which ports are serving which rails apps.
> My linux fu is not that great, so maybe there's a better way to use ps
> that will tell me?
> If this sounds like a silly question, it's because our servers host
> many Rails apps, most of which I don't write, and being able to see
> which process is related to which app is sometimes very helpful.
> end
> use ProcTitle
> run Rack::Adapter::Rails.new(:root => '/home/gpopescu/bbprojects/
> ipspace/R2.1.6', :environment => 'development')
> -------------------
> There aren't a whole lot of ENV variables available to make a very
> useful proctitle, but you may find some useful. Here's the ENV
> variables I get:
> (I munged my cookies in the above example). Anyway, you just make a
> file called title.ru and run thin with "-R title.ru" for it to be
> used. If you use a YAML file for the thin config, just add the line
> "rackup: title.ru" to the YAML file.
> --George
> On May 6, 9:16 pm, Jeff <cohen.j...@gmail.com> wrote:
> > With mongrel, I can do ps aux | grep ruby and see which mongrels are
> > serving up which rails apps. With thin, I don't see anything that
> > helps remind me which ports are serving which rails apps.
> > My linux fu is not that great, so maybe there's a better way to use ps
> > that will tell me?
> > If this sounds like a silly question, it's because our servers host
> > many Rails apps, most of which I don't write, and being able to see
> > which process is related to which app is sometimes very helpful.
On that note, on my system, the thin gem installs with a shebang that
calls env ruby as opposed to ruby directly. If the shebang calls env
ruby, then ps axc shows them as ruby processes, not thin processes,
but if you change the shebang to call ruby directly, ps axc shows them
as thin processes.
--George
On May 8, 8:25 am, macournoyer <macourno...@gmail.com> wrote:
> > end
> > use ProcTitle
> > run Rack::Adapter::Rails.new(:root => '/home/gpopescu/bbprojects/
> > ipspace/R2.1.6', :environment => 'development')
> > -------------------
> > There aren't a whole lot of ENV variables available to make a very
> > useful proctitle, but you may find some useful. Here's the ENV
> > variables I get:
> > (I munged my cookies in the above example). Anyway, you just make a
> > file called title.ru and run thin with "-R title.ru" for it to be
> > used. If you use a YAML file for the thin config, just add the line
> > "rackup: title.ru" to the YAML file.
> > --George
> > On May 6, 9:16 pm, Jeff <cohen.j...@gmail.com> wrote:
> > > With mongrel, I can do ps aux | grep ruby and see which mongrels are
> > > serving up which rails apps. With thin, I don't see anything that
> > > helps remind me which ports are serving which rails apps.
> > > My linux fu is not that great, so maybe there's a better way to use ps
> > > that will tell me?
> > > If this sounds like a silly question, it's because our servers host
> > > many Rails apps, most of which I don't write, and being able to see
> > > which process is related to which app is sometimes very helpful.
> On that note, on my system, the thin gem installs with a shebang that
> calls env ruby as opposed to ruby directly. If the shebang calls env
> ruby, then ps axc shows them as ruby processes, not thin processes,
> but if you change the shebang to call ruby directly, ps axc shows them
> as thin processes.
> --George
> On May 8, 8:25 am, macournoyer <macourno...@gmail.com> wrote:
> > I usually do "ps aux | grep thin"
> > On May 7, 9:01 am, gpop <gpop2...@gmail.com> wrote:
> > > Check out thin-proctitle, it's an attempt at duplicating
> > > mongrel_proctitle for thin:
> > > end
> > > use ProcTitle
> > > run Rack::Adapter::Rails.new(:root => '/home/gpopescu/bbprojects/
> > > ipspace/R2.1.6', :environment => 'development')
> > > -------------------
> > > There aren't a whole lot of ENV variables available to make a very
> > > useful proctitle, but you may find some useful. Here's the ENV
> > > variables I get:
> > > (I munged my cookies in the above example). Anyway, you just make a
> > > file called title.ru and run thin with "-R title.ru" for it to be
> > > used. If you use a YAML file for the thin config, just add the line
> > > "rackup: title.ru" to the YAML file.
> > > --George
> > > On May 6, 9:16 pm, Jeff <cohen.j...@gmail.com> wrote:
> > > > With mongrel, I can do ps aux | grep ruby and see which mongrels are
> > > > serving up which rails apps. With thin, I don't see anything that
> > > > helps remind me which ports are serving which rails apps.
> > > > My linux fu is not that great, so maybe there's a better way to use ps
> > > > that will tell me?
> > > > If this sounds like a silly question, it's because our servers host
> > > > many Rails apps, most of which I don't write, and being able to see
> > > > which process is related to which app is sometimes very helpful.