IPB
>  Man Pages > Linux > openSUSE 10.2 > Section 3 > DBI::ProfileDumper::Apache man page

DBI::ProfileDumper::Apache man page

Section 3 - openSUSE 10.2 Man Pages

Other operating system man pages available here


Advanced Search

Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!


DBI::ProfileDumper::ApUser(Contributed Perl DocumDBI::ProfileDumper::Apache(3)



NAME
       DBI::ProfileDumper::Apache - capture DBI profiling data from
       Apache/mod_perl

SYNOPSIS
       Add this line to your httpd.conf:

         PerlSetEnv DBI_PROFILE 2/DBI::ProfileDumper::Apache

       Under mod_perl2 RC5+ you'll need to also add:

         PerlSetEnv DBI_PROFILE_APACHE_LOG_DIR /server_root/logs

       OR add

         PerlOptions +GlobalRequest

       to the gobal config section you're about test with DBI::Profile-
       Dumper::Apache.  If you don't do this, you'll see messages in your
       error_log similar to:

         DBI::ProfileDumper::Apache on_destroy failed: Global $r object is not available. Set:
           PerlOptions +GlobalRequest in httpd.conf at ..../DBI/ProfileDumper/Apache.pm line 144

       Then restart your server.  Access the code you wish to test using a web
       browser, then shutdown your server.  This will create a set of
       dbi.prof.* files in your Apache log directory.  Get a profiling report
       with dbiprof:

         dbiprof /usr/local/apache/logs/dbi.prof.*

       When you're ready to perform another profiling run, delete the old
       files

         rm /usr/local/apache/logs/dbi.prof.*

       and start again.

DESCRIPTION
       This module interfaces DBI::ProfileDumper to Apache/mod_perl.  Using
       this module you can collect profiling data from mod_perl applications.
       It works by creating a DBI::ProfileDumper data file for each Apache
       process.  These files are created in your Apache log directory.  You
       can then use dbiprof to analyze the profile files.

USAGE
       LOADING THE MODULE

       The easiest way to use this module is just to set the DBI_PROFILE envi-
       ronment variable in your httpd.conf:

         PerlSetEnv DBI_PROFILE 2/DBI::ProfileDumper::Apache

       If you want to use one of DBI::Profile's other Path settings, you can
       use a string like:

         PerlSetEnv DBI_PROFILE 2/DBI::ProfileDumper::Apache

       It's also possible to use this module by setting the Profile attribute
       of any DBI handle:

         $dbh->{Profile} = "2/DBI::ProfileDumper::Apache";

       See DBI::ProfileDumper for more possibilities.

       GATHERING PROFILE DATA

       Once you have the module loaded, use your application as you normally
       would.  Stop the webserver when your tests are complete.  Profile data
       files will be produced when Apache exits and you'll see something like
       this in your error_log:

         DBI::ProfileDumper::Apache writing to /usr/local/apache/logs/dbi.prof.2619

       Now you can use dbiprof to examine the data:

         dbiprof /usr/local/apache/logs/dbi.prof.*

       By passing dbiprof a list of all generated files, dbiprof will automat-
       ically merge them into one result set.  You can also pass dbiprof sort-
       ing and querying options, see dbiprof for details.

       CLEANING UP

       Once you've made some code changes, you're ready to start again.
       First, delete the old profile data files:

         rm /usr/local/apache/logs/dbi.prof.*

       Then restart your server and get back to work.

MEMORY USAGE
       DBI::Profile can use a lot of memory for very active applications.  It
       collects profiling data in memory for each distinct query your applica-
       tion runs.  You can avoid this problem with a call like this:

         $dbh->{Profile}->flush_to_disk() if $dbh->{Profile};

       Calling "flush_to_disk()" will clear out the profile data and write it
       to disk.  Put this someplace where it will run on every request, like a
       CleanupHandler, and your memory troubles should go away.  Well, at
       least the ones caused by DBI::Profile anyway.

AUTHOR
       Sam Tregar <sam@tregar.com>

COPYRIGHT AND LICENSE
       Copyright (C) 2002 Sam Tregar

       This program is free software; you can redistribute it and/or modify it
       under the same terms as Perl 5 itself.



perl v5.8.8                       2006-02-07     DBI::ProfileDumper::Apache(3)


Man(1) output converted with man2html and wrapped by fishsponge

This page was generated on Sat Sep 8 16:36:39 GMT 2007

Your favourite pages:

No pages logged yet.
Trying to save cookie...

Top 10 most popular pages:

svn man page (6161 hits)
(FreeBSD 6.2)

sqlite3 man page (5598 hits)
(openSUSE 10.2)

adv_cap_autoneg man page (5045 hits)
(Solaris 10 11_06)

CPAN man page (4791 hits)
(Suse Linux 10.1)

ssh man page (4439 hits)
(Suse Linux 10.1)

ssh-socks5-proxy-connect man page (3525 hits)
(Solaris 10 11_06)

signal man page (3394 hits)
(Suse Linux 10.1)

netcat man page (3373 hits)
(Suse Linux 10.1)

pprosetup man page (2886 hits)
(Solaris 10 11_06)

startproc man page (2738 hits)
(Suse Linux 10.1)

Useful Links

Go Back

Visitor Statistics


Valid XHTML 1.0 Transitional     Valid CSS!

Partners: Cambridge Plus :: Pyrenees Ski Resorts :: Server Room Temperature Monitor :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum