Carlos E. R. wrote:
On 2016-06-08 13:35, Per Jessen wrote:
Carlos E. R. wrote:
I would run apache single-threaded with strace, but I can't on a production server :-)
You can attach to a PID of an already running process. strace can attach to children automatically, but I don't know if you can do that with PID.
Yes, but I can't tell which apache thread is going to run my request. Hmm, I guess I could strace all of them ....
Yes, that is what I meant.
-f Trace child processes as they are created by currently traced processes as a result of the fork(2), vfork(2) and clone(2) system calls. Note that -p PID -f will attach all threads of process PID if it is multi-threaded, not only thread with thread_id = PID.
-ff If the -o filename option is in effect, each processes trace is written to filename.pid where pid is the numeric process id of each process. This is incompatible with -c, since no per-process counts are kept.
That is slightly different - apache runs a number threads, afaict each forks a new one per request. Anyway, I straced all the running threads and got a good trace! /home/per/Diagnostics/strace-http-21602-23194.txt The request starts around 13:52:03.875969 and finishes 13:52:11.622257 (roughly). It took a little longer than normal, presumably due to the strace? I count 184 open() call, of which 157 on '/srv/www/vhosts'. 176 calls of access(), and 15136 x lstat64(). -- Per Jessen, Zürich (17.4°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org