Poe :: Componente :: SNMP

Interfaz PoE a Net :: SNMP
Descargar ahora

Poe :: Componente :: SNMP Clasificación y resumen

Anuncio publicitario

  • Rating:
  • Licencia:
  • Perl Artistic License
  • Precio:
  • FREE
  • Nombre del editor:
  • Rob Bloodgood
  • Sitio web del editor:
  • http://search.cpan.org/~rdb/

Poe :: Componente :: SNMP Etiquetas


Poe :: Componente :: SNMP Descripción

Interfaz POE a NET :: SNMP POE :: Componente :: SNMP es una interfaz POE para NET :: SNMP.SYNOPSIS # Este script se incluye en la distribución, ya que SNMP_Sample.pl Use Poe QW / Component :: SNMP /; MI% SISTEMA = (sysuptime => '.1.3.6.1.2.1.1.3.0', SYSNAME => '.1.3.6.1.2.1.1.5.0', syssiocality => '' .1.3.6.1.2.1.1.6. 0 ',); mis @oides = valores% sistema; My $ base_oid = '.1.3.6.1.2.1.1'; # Sistema. * PoE :: Sesión-> Crear (Inline_States => {_start => _start, snmp_handler => snmp_handler,}); sub _start {my ($ kernel, $ $ montones) = @_ ; Poe :: Componente :: SNMP-> Crear (alias => 'SNMP', # igual que el nombre de host => 'localhost', comunity => 'Public', versión => 'snmpvv2c', # debug => 0x0a,) ; $ kernel-> Post (snmp => get => snmp_handler => -varbindlist => @>> @>> # ... o tal vez ... $ kernel-> Post (snmp => walk => snmp_handler => -BASEASID => $ BASE_OID); # ... o posiblemente incluso ... my @callback_args = (1, 2, 3); $ kernel-> Post (snmp => getbulk => snmp_handler => -varbindlist => , -maxrepetitions => 6, -callback_args => @callback_args); $ montón -> {pendiente} = 3; } Sub SNMP_Handler {My ($ kernel, $ montón, $ petición, $ respuesta) = @_ ; mi ($ alias, $ host, $ cmd, @args) = @ $ Solicitud; MIS ($ resultados, @callback_args) = @ $ Respuesta; if (RefT $ Resultados) {imprimir "$ host SNMP config ($ cmd): "; Imprimir" SYSNAME: $ Resultados -> {$ System {sysname}} "; Imprimir" Sysuptime: $ Resultados -> {$ System {sysuptime}} "; Imprimir" Syslocation: $ Resultados -> {$ System {SysSybation}} ";} else {imprimir" $ host SNMP error ($ cmd => @args): $ resultados ";} Imprimir" ARGS adicionales: @Callback_args "Si (- $ Peaje -> {pendiente} == 0) {$ kernel-> Publicar ($ alias => 'acabado');}}} $ Poe_Kernel-> Ejecutar (); Ver la carpeta. El archivo de distribución para más requisitos de muestras: · Perl


Poe :: Componente :: SNMP Software relacionado