Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

profiler for mod_perl

by piccard (Initiate)
on Jun 02, 2009 at 15:07 UTC ( #767623=perlquestion: print w/replies, xml ) Need Help??
piccard has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I was trying to setup a profiler for mod_perl ... and the luck was not with me :-(
I found on CPAN Devel::NYTProf::Apache, but it's not really working with my Apache-configuration. Here I've got a Suse-System and in the /etc/apache2/default-server.conf I've included in the upper part:
<IfDefine NYTPROF> MaxClients 1 PerlModule Devel::NYTProf::Apache </IfDefine>
Also in /etc/apache2/
I've included as first module to load Devel::NYTProf::Apache. When I start apache "/usr/sbin/httpd2 -f /etc/apache2/httpd.conf -k start -DNYTPROF &" I get 2 files, like it should be, like:

- nytprof.6533.out

- nytprof.6533.out.6534

But when I try to convert them I always get this error-message:
Unable to open '/(eval 2)' for reading: No such file or directory. Try + running /usr/bin/nytprofhtml in the same directory as you ran Devel: +:NYTProf, or ensure @INC is correct. Unable to open '-e' for reading: No such file or directory. Unable to open '/(eval 7)' for reading: No such file or directory.
So, if you have got any hints for me it would be great.
Thanx alot :-D

Replies are listed 'Best First'.
Re: profiler for mod_perl
by perrin (Chancellor) on Jun 02, 2009 at 15:20 UTC
      Hello perrin,
      I've alreay posted in this group, but haven't get an answer so far. So I thought I should try it with the wisdom of the monks ;-)
      So, in the end maybe you've got an idea for me. I have to modify a perl-CGI-application, which is historical grown, not documented and covers more than hundred scripts.
      All I wanna know is which Script is calling which function, reading which text-files, etc. So I thought a profiler would be a great idea.
      Do you have another idea?
        You can get good call graph data from NYTProf. I think it's the best bet. Try some of the advice from the mailing list archives for people who got this error. They seem to have been able to get it working.
Re: profiler for mod_perl
by Mutant (Priest) on Jun 02, 2009 at 16:21 UTC

    Not a NYTProf expert, but I think it looks for all the modules that contain code that was executed, so if it doesn't have them on the system where you run nytprofhtml, it complains.

    In your case, you have evals it's trying to find the code for, which it can't for some reason. However, I don't remember this being a fatal error, as it can still find the code for everything else. I think I've seen those errors before, and it's still generated the HTML for me. So maybe you just need to tweak the params you're using when you call nytprofhtml?

      I also get a report, but it includes only the startup of the apache, nothing else. Tim Bunce, the main-developer anserwed me and I sent him a trace-report. So let's see. Thank you all very much for your help ;-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://767623]
Approved by ikegami
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2017-02-21 18:06 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (314 votes). Check out past polls.