|
From: <rob...@ao...> - 2011-01-31 15:19:19
|
I am trying to track down a memory leak in my fcgi process. I have used a bit valgrind before but the scenario was a bit less complex. In the current scenario, the fcgi process is started by a lighttpd script using the following command. daemon $FCGI_DAEMON -f $webfcgi -a $FCGI_SOCKET_IP -p $FCGI_SOCKET_PORT -P $FCGI_PIDFILE I am more interested in tracking the fcgi process than lighttpd. Is there any way to modify this command to invoke valgrind on my '$webfcgi' process when lighttpd starts? Thanks, Bob |
|
From: John R. <jr...@bi...> - 2011-01-31 15:40:06
|
> In the current scenario, the fcgi process is started by a lighttpd script > using the following command. > > daemon $FCGI_DAEMON -f $webfcgi -a $FCGI_SOCKET_IP -p $FCGI_SOCKET_PORT > -P $FCGI_PIDFILE > > I am more interested in tracking the fcgi process than lighttpd. Create an executable shell script like: #!/bin/bash valgrind <valgrind_parameters> $webfcgi "$@" then in the 'daemon' line change "$webfcgi" to be a path to the shell script. -- |
|
From: Paul F. <pa...@fr...> - 2011-01-31 15:43:13
|
rob...@ao... wrote: > I am trying to track down a memory leak in my fcgi process. I have > used a bit valgrind before but the scenario was a bit less complex. In > the current scenario, the fcgi process is started by a lighttpd script > using the following command. > > daemon $FCGI_DAEMON -f $webfcgi -a $FCGI_SOCKET_IP -p $FCGI_SOCKET_PORT > -P $FCGI_PIDFILE > > I am more interested in tracking the fcgi process than lighttpd. Is > there any way to modify this command to invoke valgrind on my > '$webfcgi' process when lighttpd starts? Hi Assuming that you have the right privs and that it is not a 'mission critical production server', then a quick and dirty way to do this would be to do something like mv fcgi fcgi.orig then create a wrapper script fcgi that does something like valgrind [valgrind options] cfgi.orig [cfgi options, or probably just "$@"] A+ Paul |