Simple, but painting with a very broad brush |
- Kill all httpd processes
- Restart httpd with, for example,
strace -f /usr/bin/httpd -d /Web
|
A little more targetted |
- Back up your apache configuration
- Reconfigure apache to only prefork one child
- Kill and restart apache
- strace that single child - be sure to follow forks with -f.
- Restore the original apache configuration
- Kill and restart apache
|
Pretty targetted, if all you need is a single CGI script |
- Assume your cgi script is named /Web/cgi-bin/foobar
- mv /Web/cgi-bin/foobar /Web/cgi-bin/foobar.orig
- Create a wrapper script named /Web/cgi-bin/foobar
that simply does:
|
Targetting everything at a high level of detail, one file per apache process. You may need to do some
grep'ing and/or guessing to get to the right output file - IE, the one that's truly relevant to what you
need to scrutinze. |
- mkdir /some/unique/directory
- cd /some/unique/directory
- for pid in $(ps -ef | grep '[/]usr/local/apache-2.0.55/bin/httpd' | awk ' { print $2 }'); do echo pid is $pid; truss -f -o "$pid.out" -p "$pid" & done
- Inspect the files in your newly created directory as needed
|