mugoots has asked for the wisdom of the Perl Monks concerning the following question:
Howdy monks,
First time posting, so apologies for question formatting errors and the like.
I've been tinkering around with NYTProf for a bit and have been having difficulty getting it to produce any output files. For context, I'm working with a configuration that uses mod_perl and an application executed from a <Virtualhost...> directive using +Parent so, as per https://metacpan.org/pod/Devel::NYTProf::Apache#VIRTUAL-HOSTS, my profiler instantiation looks like this:
<Perl> use Devel::NYTProf::Apache; </Perl>
I've declared my environment variable separately but haven't had any problems propagating it using PerlPassEnv NYTPROF, as evidenced by varying things such as the 'trace' parameter and seeing the difference in STDERR. The only issue is that I can't seem to get it to write out to the file I've passed to the 'file' parameter. The trace shows the following when I start apache:
# trace=1 # endatexit=1 # addpid=1 ~ init_profiler for pid 8168, clock 1, tps 10000000, start 1, perldb 0 +xf10, exitf 0x2 ~ enable_profile (previously disabled) to /tmp/nytprof.out ~ opened /tmp/nytprof.out.8168 at 1531355108.021613 ~ init_profiler done
and the following when I stop it:
~ END done ~ finish_profile (overhead 1349t, is_profiling 1) ~ disable_profile (previously enabled, pid 8172, trace 1) ~ writing file source code ~ writing sub line ranges - prescan ~ writing sub line ranges of 45 subs ~ writing sub callers for 40 subs ~ closed file at 1531355242.416566 ~ END done ~ finish_profile (overhead 1349t, is_profiling 1) ~ disable_profile (previously enabled, pid 8168, trace 1) ~ writing file source code ~ writing sub line ranges - prescan ~ writing sub line ranges of 45 subs ~ writing sub callers for 40 subs ~ closed file at 1531355243.592075 ~ END done ~ finish_profile (overhead 0t, is_profiling 0) ~ disable_profile (previously disabled, pid 8168, trace 1) ~ finish_profile (overhead 0t, is_profiling 0) ~ disable_profile (previously disabled, pid 8168, trace 1)
yet '/tmp/nytprof.out.8168' does not exist. Also, neither 'ls /tmp/nytprof.out.*' nor 'find / -name nytprof.out*' return any results. Here is my environment variable for reference:
"file=/tmp/nytprof.out:addpid=1:endatexit=0:subs=1:trace=1"
As an aside, I'm running all of this under SELinux, but it's in permissive mode so I don't believe that it should make a difference.
Comments, clarifying questions, anything really, would be appreciated. Really not a sysadmin but happy to provide more details where I can.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating .out files with NYTProf::Apache
by Anonymous Monk on Jul 18, 2018 at 02:13 UTC |