NAME

Router::Statistics - Router Statistics and Information Collection

VERSION

Version 0.91_1

SYNOPSIS

Router Statistics and Information Colleciton. Currently this covers a multitude of areas from different types of routers and in a future release this will change. There are some 'action' functions within this module which do need moving to another module so no complaining too much, please.

The following examples shows how to setup the module to retrieve interface statistics from routers that support the standard IFMIB. All the work about OIDs etc is taken care of by the module so you are left with a hash tree, rooted by the router IPs information was received for.

    use Router::Statistics;
    use strict;

    my ( $result, $statistics );
    my ( %routers, %interfaces );

    $statistics = new Router::Statistics();

    $result = $statistics->Router_Add( "10.1.1.1" , "public" );
    $result = $statistics->Router_Ready( "10.1.1.1" );
    ....
    $result = $statistics->Router_Add( "10.1.1.200" , "public" );
    $result = $statistics->Router_Ready( "10.1.1.200" );

    $result = $statistics->Router_Test_Connection(\%routers);

    if ( !%routers )
        { print "No access to Any of the Routers specified.\n";exit(0); }

    $result = $statistics->Router_get_interfaces( \%interfaces );

    foreach my $router ( keys %interfaces )
	{
	print "Router IP is '$router'\n";
	print "Router Hostname is '$routers{$router}{'hostName'}'\n";
	foreach my $interface ( keys %{$interfaces{$router}} )
		{
		print "Interface ID '$interface'\n";
		print "Interface Description '$interfaces{$ubr}{$interface}{'ifDescr'}'\n";
		print "Interface ifType '$interfaces{$ubr}{$interface}{'ifType'}'\n";
		print "Interface ifMtu  '$interfaces{$ubr}{$interface}{'ifMtu'}'\n";
		print "Interface ifSpeed '$interfaces{$ubr}{$interface}{'ifSpeed'}'\n";
		print "Interface ifPhysAddress '$interfaces{$ubr}{$interface}{'ifPhysAddress'}'\n";
		print "Interface ifOperStatus '$interfaces{$ubr}{$interface}{'ifOperStatus'}'\n";
		print "Interface ifInOctets '$interfaces{$ubr}{$interface}{'ifInOctets'}'\n";
		print "Interface ifInUcastPkts '$interfaces{$ubr}{$interface}{'ifInUcastPkts'}'\n";
		print "Interface ifInNUcastPkts '$interfaces{$ubr}{$interface}{'ifInNUcastPkts'}'\n";
		print "Interface ifInDiscards '$interfaces{$ubr}{$interface}{'ifInDiscards'}'\n";
		print "Interface ifInErrors '$interfaces{$ubr}{$interface}{'ifInErrors'}'\n";
		print "Interface ifInUnknownProtos '$interfaces{$ubr}{$interface}{'ifInUnknownProtos'}'\n";
		print "Interface ifOutOctets '$interfaces{$ubr}{$interface}{'ifOutOctets'}'\n";
		print "Interface ifOutUcastPkts '$interfaces{$ubr}{$interface}{'ifOutUcastPkts'}'\n";
		print "Interface ifOutNUcastPkts '$interfaces{$ubr}{$interface}{'ifOutNUcastPkts'}'\n";
		print "Interface ifOutDiscards '$interfaces{$ubr}{$interface}{'ifOutDiscards'}'\n";
		print "Interface ifOutErrors '$interfaces{$ubr}{$interface}{'ifOutErrors'}'\n";
		print "\n";
		}
       }

I am currently in need of access to alternative vendor routers, ie. anyone but Cisco ( ABC ) as I only have real access to Cisco equipment so this code can not be confirmed 100% against anyone else.

I would also like to expand the library to cover other actions , rather than just DOCSIS functions, which is the primary action focus at the moment.

FUNCTIONS

Router_Add

Router_Remove

Router_Ready

Router_Return_All

Router_Ready_Blocking

Router_get_networks

Router_get_interfaces

Router_get_interfaces_Blocking

Router_Test_Connection

Router_Test_Connection_Blocking

CPE_Add

CPE_Remove

CPE_Ready

CPE_Return_All

CPE_export_import_fields

CPE_export_fields

CPE_export_schema

CPE_export_data_start

CPE_export_data_end

CPE_export_data

CPE_gather_all_data_walk

CPE_gather_all_data

UBR_get_CPE_information_Blocking

UBR_get_CPE_information

get_CPE_info

CPE_Test_Connection

Export_UBR_Slot_Inventory

Export_UBR_Port_Inventory

UBR_get_DOCSIS_upstream_interfaces

UBR_get_DOCSIS_interface_information

UBR_get_DOCSIS_downstream_interfaces

UBR_get_CPE_information_Blocking

UBR_get_CPE_information

UBR_modify_cpe_DOCSIS_profile

UBR_reset_cpe_device

UBR_get_active_cpe_profiles

UBR_get_active_cpe_profiles_Blocking

UBR_get_active_upstream_profiles

UBR_get_stm

BUGS

Module now semi supports blocking and non blocking mode. It has been discovered that non-blocking is significantly longer to execute. Not entirely sure why, however to speed things up some functions now have _Blocking mirrors so they can be called instead.

Added support to retrieve the STM information very simple implementation to poll the STM mib provided on Cisco equipment.

Added Network Link Map Generator Added CPE snmp read key cycler ( not finished ).

Please report any bugs or feature requests to bug-router-statistics at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Router-Statistics. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Router::Statistics

ACKNOWLEDGEMENTS

Cisco I suppose for making their products such a nightmare to manage using SNMP.

COPYRIGHT & LICENSE

Copyright 2006 Andrew S. Kennedy, all rights reserved.

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