How to override "Worker#proc_name" method?

Iñaki Baz Castillo ibc at aliax.net
Wed Dec 23 07:42:28 EST 2009


El Miércoles, 23 de Diciembre de 2009, Iñaki Baz Castillo escribió:
> Hi, I'm trying to override Unicorn::HttpServer::Worker#proc_name method.

I want to do it because by default Unicorn processes are called as:

  unicorn worker[0] -E production -c unicorn.conf.rb config.ru

Unfortunatelly netstat takes the last word and shows "config.ru":

  ~# netstat -putan | grep "0.0.0.0:8080"
  tcp   0   0   0.0.0.0:9292   0.0.0.0:*   LISTEN   31575/config.ru

This is not very good for the case in which the user/admin wants to know in 
which port the process is listening so it does:

  ~# netstat -putan | grep "unicorn"

and gets nothing.

Of course this is more an issue of "netstat" and how it determines to display 
the process name. However I would like to override the way unicorn displays 
the process name (without changing unicorn code).


Regards.


-- 
Iñaki Baz Castillo <ibc at aliax.net>


More information about the mongrel-unicorn mailing list