SNMP::Simple

Shortcuts for when using SNMP
Download

SNMP::Simple Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Ian Langworth
  • Publisher web site:
  • http://search.cpan.org/~ian/

SNMP::Simple Tags


SNMP::Simple Description

Shortcuts for when using SNMP SNMP::Simple is a Perl module that provides shortcuts when performing repetitive information-retrieval tasks with SNMP.Instead of this: use SNMP; $vars = new SNMP::VarList( , , , ); my ( $light_status, $light_color, $light_desc ) = $s->getnext($vars); die $s->{ErrorStr} if $s->{ErrorStr}; while ( !$s->{ErrorStr} and $$vars->tag eq "prtConsoleOnTime" ) { push @{ $data{lights} }, { status => ( $light_status ? 0 : 1 ), color => SNMP::mapEnum( $$vars->tag, $light_color ), description => $light_desc, }; ( $light_status, $light_color, $light_desc ) = $s->getnext($vars); }...you can do this: use SNMP::Simple; $data{lights} = $s->get_named_table( status => 'prtConsoleOnTime', color => 'prtConsoleColor', name => 'prtConsoleDescription', );SYNOPSIS use SNMP::Simple; $name = $s->get('sysName'); # same as sysName.0 $location = $s->get('sysLocation'); @array = $s->get_list('hrPrinterStatus'); $arrayref = $s->get_list('hrPrinterStatus'); @list_of_lists = $s->get_table( qw( prtConsoleOnTime prtConsoleColor prtConsoleDescription ) ); @list_of_hashes = $s->get_named_table( name => 'prtInputDescription', media => 'prtInputMediaName', status => 'prtInputStatus', level => 'prtInputCurrentLevel', max => 'prtInputMaxCapacity', ); Requirements: · Perl


SNMP::Simple Related Software