Copterfly / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

Change process name of each daemon so identifiable in 'ps' output. #49

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
All mod_wsgi daemon process still shows as httpd which makes it hard to 
identify what each is 
doing. Only way besides enabling info level error logging in Apache is to run 
daemons as 
different users.

To make it easier, add a 'display-name' option to WSGIDaemonProcess and try to 
use various 
techniques to set the active process name to be that value.

Some references as to how to do this on different platforms are:

NETBSD and MacOSX: 
http://netbsd.gw.com/cgi-bin/man-cgi?setprogname++NetBSD-current

FREEBSD: http://www.freebsd.org/cgi/man.cgi?
query=setproctitle&apropos=0&sektion=0&manpath=FreeBSD+4.5-RELEASE&format=html

LINUX: http://lightconsulting.com/~thalakan/process-title-notes.html

Original issue reported on code.google.com by Graham.Dumpleton@gmail.com on 5 Jan 2008 at 2:30

GoogleCodeExporter commented 9 years ago
Use argv method and hope it works. Seems okay on MacOSX and supposed to work on 
Linux as well.

Original comment by Graham.Dumpleton@gmail.com on 5 Jan 2008 at 6:30

GoogleCodeExporter commented 9 years ago
Version 2.0 of mod_wsgi now released with this feature.

Original comment by Graham.Dumpleton@gmail.com on 20 Mar 2008 at 4:51