NAME

Backup::Omni::Session::Monitor - Monitor a running session

SYNOPSIS

use Backup::Omni::Session::Monitor;

my $monitor = Backup::Omni::Session::Monitor->new(
    -session => '2013/01/25-40'
);

while ($monitor->running) {

    $device = monitor->device;
    printf("saveset position: %s", $device->done);

    sleep(10);

}

printf("session done\n");

DESCRIPTION

This module will monitor and return information from a running session. It runs the omnistat command with the appropiate options. If any errors are encounterd, an exception is thrown.

METHODS

new

This method will initialze the object. It takes one parameter.

-session

The session id to monitor.

running

This method returns true if the session is "running".

device

The method returns a Backup::Omni::Session::Monitor::Device object. If the session has finished "running" it will return undef. See Backup::Omni::Session::Result to see how to get the results. This object has the following methods:

device_name

The device this session is running on.

host

The host the session is running on.

started

The session started using the device.

finished

The time the session finished using the device or a '-'.

done

The number of bytes read from the device.

physical_device

The actual physical device that is being used.

status

The status of the device.

object

The method returns a Backup::Omni::Session::Monitor::Object object. If the session has finished "running" it will return undef. See Backup::Omni::Session::Result to see how to get the results. This object has the following methods:

object_name

The name of the session object.

object_type

The object type.

sessionid

The original session id for this object.

restore_started

The datetime the restore started.

backup_started

The datetime the backup started.

level

The objects level.

warnings

The number of warnings for this object.

errors

The number of errors for this object.

processed_size

The processed size of this object.

device

The device this object is using.

status

The status of the object.

SEE ALSO

Backup::Omni::Base
Backup::Omni::Class
Backup::Omni::Utils
Backup::Omni::Constants
Backup::Omni::Exception
Backup::Omni::Restore::Filesystem::Single
Backup::Omni::Session::Filesystem
Backup::Omni::Session::Messages
Backup::Omni::Session::Results

AUTHOR

Kevin L. Esteb, <kesteb@wsipc.org>

COPYRIGHT AND LICENSE

Copyright (C) 2013 by WSIPC

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.