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.


In reply to Creating .out files with NYTProf::Apache by mugoots

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.