GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DEVEL::STRACE::MONITOR (3)

.ds Aq ’

NAME

Devel::STrace::Monitor - Monitor interface component for Devel::STrace

CONTENTS

SYNOPSIS



    #
    #    open the mmaped file
    #
    use Devel::STrace::Monitor;

    my $view = Devel::STrace::Monitor->open(somefile.map);

    my $cycles = 0;
    while (1) {
        print "\n**************************************\n";
    #
    #    refresh the internal ringbuffer map
    #
        $view->refresh();
    #
    #    dump the current traces
    #
        $view->trace(\&dump_trace);

        sleep 10;
    }
    #
    #    method to display the traces
    #
    sub dump_trace {
        my ($key, $slot, $depth, $line, $time, $entry) = @_;

        $lastkey = $key,
        print "\n**************************************\n"
            unless ($lastkey eq $key);

        if ($time) {
    #
    #    trim the weekday and year from timestamp
    #
            my $frac = ($time - int($time)) * 1000000;
            $frac=~s/\..*$//;
            my @parts = split(/\s+/, scalar localtime($time));
            pop @parts;    # get rid of year
            print "$key($depth) : $slot : $entry:$line at ",
                join( , @parts), ., $frac, "\n";
        }
        else {
            print "$key($depth) : $slot : $entry:$line (No timestamp)\n";
        }
    }



DESCRIPTION

Provides methods to
o attach to and read the memory mapped file generated by Devel::STrace (or future full featured debuggers) using Devel::RingBuffer.
o set or clear any of the $DB::single, $DB::trace, or $DB::signal control variables of the AUT (via their tie’d interfaces in the AUT).
o inspect the current execution call stack of the AUT
The interfaces provide a simple framework for building an external application that can attach to a running Perl application, monitor its current execution, and eventually detach, all while permitting the application continue to run uninterrupted.

A more complete debugger module is planned to exploit the various command/control structures available via Devel::RingBuffer. Note that this module will be fully compatible with the resulting debugger so that, e.g., an application can first be monitored to detect troublespots, and then the debugger can be attached to fully debug the problem.

METHODS

Refer to the include classdocs for summary and detail method descriptions.

SEE ALSO

Devel::STrace

Devel::RingBuffer

IPC::Mmap

plstrace.pl is a simple command line script using this module.

AUTHOR, COPYRIGHT, AND LICENSE

Dean Arnold <mailto:darnold@presicient.com>

Copyright(C) 2006, Dean Arnold, Presicient Corp., USA. All rights reserved.

Permission is granted to use this software under the same terms as Perl itself. Refer to the Perl Artistic License for details.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DEVEL::STRACE::MONITOR (3) 2006-08-13

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.