Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ropkg::rsync::logparser(3pm) [debian man page]

RoPkg::Rsync::LogParser(3pm)				User Contributed Perl Documentation			      RoPkg::Rsync::LogParser(3pm)

NAME
RoPkg::Rsync::LogParser - a rsync log parser class SYNOPSIS
#!/usr/bin/perl use strict; use warning; sub main { my $lp = new RoPkg::Rsync::LogParser( type => 'client' ); $lp->Parse('/tmp/debian-log.txt'); } main(); Short description RoPkg::Rsync::LogParser is a class used to parse (for the moment) client side rsync logs. Using this class you can extract the transfered files, symlinks created, directories, total number of files, transfered bytes, speed of transfer etc. LogParser support list filter trough probes (used by many projects to verify the mirrors). The primary use of this class is inside Simba, but can be used without problems in any other project who needs a rsync client log parser. METHODS
new(hash) Constructor of the class. When creating a new class instance you must provide the type of log: client or server . For the moment only the client parsing routines are defined. Log($raw_log) Get/Set the raw rsync log. With no parameters, the get behaviour is selected. If a parameter is present (and valid) the method acts as a Set method. Probes(@probes_list) Get/Set the raw probes list. If no parameter is present, the method returns the number of probes defined (0 if none). If a list of probes is given, the list is added to the existing list of probes. Parse($filename) Parse a rsync client log. If no filename is specified, the method parses the log previsiously set with Log() method. Please take extra care with the filename. If it does not exists, or is not a file a exception will be raised (Param::Wrong and File::Open). Files() In scalar context returns the number of transfered files (filtered by probes list). In list context, returns the list of transfered files. RealFiles() In scalar context returns the number of transfered files. In list context, returns the list of transfered files. Deleted() In scalar context returns the number of deleted files (filtered by probes list). In list context, returns the list of deleted files. RealDeleted() In scalar context returns the number of deleted files. In list context, returns the list of deleted files. Speed() Returns the speed (as reported by rsync [in bytes/sec]) of the transfer. Size() Returns the size of the synced content. TransfData() Returns the total number of bytes transfered during the sync session Symlinks() In scalar context returns the number of symlinks (filtered by probes list). In list context, returns the list of symlinks. RealSymlinks() In scalar context returns the number of symlinks. In list context, returns the list of symlinks. PREREQUISITES
RoPkg::Utils requires perl 5.008 or later and RoPkg::Exceptions class. From CPAN, you need the Scalar::Util module. At build time Test::More is required for tests (if you don't plan to use the tests ignore this dependency). SEE ALSO
RoPkg::Rsync::Node RoPkg::Rsync::ConfFile RoPkg::Exceptions AUTHOR
Subredu Manuel <diablo@iasi.roedu.net> LICENSE
Copyright (C) 2005 Subredu Manuel. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license. perl v5.8.8 2006-06-09 RoPkg::Rsync::LogParser(3pm)

Check Out this Related Man Page

RoPkg::Simba::Exclude(3pm)				User Contributed Perl Documentation				RoPkg::Simba::Exclude(3pm)

NAME
RoPkg::Simba::Exclude VERSION
0.1.2 DESCRIPTION
RoPkg::Simba::Exclude is the class used by simba to manipulate a exclude list. It has the basic sql methods (inherited from RoPkg::DBObject). SYNOPSIS
!#/usr/bin/perl use RoPkg::DB; use RoPkg::Simba::Exclude; sub main { my $dbp = new RoPkg::DB(); $dbp->Add('dbi:mysql:database=mysql;host=localhost', 'root', '', 'local'); my $c = new RoPkg::Simba::Exclude(db => $dbp, db_method => 'db_local'); $c->id(1); $c->Load(); } main(); SUBROUTINES
/METHODS All methods (besides new) raise OutsideClass exception when called outside class instance. Also, some methods may rise diferent exceptions. Please read the section in which the method is described to find out more information about exceptions. new() The class constructor. At this moment, it just calls RoPkg::DBObject->new() . Please read the RoPkg::DBObject manual page for more information about the new() parameters. table() Returns the name of the exclude lists database table. ExList() get/set the excluded items. When set behaviour is selected, the exclude list must be passed to the method. The exclude list must be set before adding the new exclude list to database. AddItems(@new_items) Add @new_items to the list of excluded items and returns the new number of excluded items. GetItems() Returns the list of excluded items. In scalar context returns the number of excluded items The following methods are get/set methods for all fields of a mirror. *) id *) MirrorID *) CommandID Add() Adds the mirror to the database. This method is a wrapper for RoPkg::DBObject::SQL_Insert . On success 0 is returned. On error, DBI exception is raised. Delete() Deletes the current exclude list from the database. Before calling this method, you should set the id of the exclude list . If you don't set the id Param::Missing exception is raised. On database operation success, 0 is returned. On database error, DBI exception is raised. Update() Update the current exclude list object with the database. Before calling this method, you should set the id of the exclude list . If you don't set the id Param::Missing exception is raised. On database operation success, 0 is returned. On database error, DBI exception is raised. Load() Load the exclude list from the database, into the current object. Before calling this method you should have set id or MirrorID and CommandID. If none are found, then Param::Missing is raised. On database operation success 0 is returned. On database error, DBI exception is raised. DIAGNOSTICS
Unpack the source, and use 'make test' command CONFIGURATION AND ENVIRONMENT
This module does not use any configuration files or environment variables. DEPENDENCIES
RoPkg::DBObject and RoPkg::Exceptions INCOMPATIBILITIES
None known to the author BUGS AND LIMITATIONS
None known to the author PERL CRITIC
This module is perl critic level 2 compliant (with 1 exception) SEE ALSO
RoPkg::Simba::Excludes RoPkg::Exceptions RoPkg::Object AUTHOR
Subredu Manuel <diablo@iasi.roedu.net> LICENSE AND COPYRIGHT
Copyright (C) 2005 Subredu Manuel. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license. perl v5.14.2 2006-07-04 RoPkg::Simba::Exclude(3pm)
Man Page