Poe :: Componente :: SNMP

Interfaccia PoE in rete :: SNMP
Scarica ora

Poe :: Componente :: SNMP Classifica e riepilogo

Annuncio pubblicitario

  • Rating:
  • Licenza:
  • Perl Artistic License
  • Prezzo:
  • FREE
  • Nome editore:
  • Rob Bloodgood
  • Sito web dell'editore:
  • http://search.cpan.org/~rdb/

Poe :: Componente :: SNMP Tag


Poe :: Componente :: SNMP Descrizione

Interfaccia PoE in rete :: SNMP POE :: Component :: SNMP è un'interfaccia PoE in rete :: SNMP.Synopsis # Questo script è incluso nella distribuzione come ad esempio / snmp_ample.pl Utilizzare POE QW / componente :: SNMP /; My% System = (sysuptime => '.1.3.6.1.2.1.1.3.0', sysname => '.1.3.6.1.2.1.1.5.0', syslocation => '.1.3.6.1.2.1.1.6. 0 ',); I miei @oids = valori% del sistema; my $ base_oid = '.1.3.6.1.2.1.1'; # System. * Poe :: Session-> Crea (Inline_States => {_Start => _Start, SNMP_Handler => SNMP_Handler,}); sub _start {my ($ kernel, $ heap) = @_ ; POE :: Componente :: SNMP-> Crea (alias => 'snmp', # come predefinito hostname => 'localhost', comunità => 'Pubblico', versione => 'snmpv2c', # debug => 0x0a,) ; $ kernel-> post (snmp => get => snmp_handler => -varbindlist => @oids); # ... o forse ... $ kernel-> post (snmp => walk => snmp_handler => -baseoid => $ base_oid); # ... o forse anche ... My @callback_args = (1, 2, 3); $ kernel-> post (snmp => getbulk => snmp_handler => -varbindlist => , -maxrepetitions => 6, -callback_args => @callback_args); $ heap -> {in attesa} = 3; } sub snmp_handler {my ($ kernel, $ heap, $ request, $ risposta) = @_ ; My ($ alias, $ host, $ cmd, @args) = @ $ Richiesta; my ($ risultati, @callback_args) = @ $ risposta; Se (Ref $ Risultati) {stampa "$ host SNMP Config ($ cmd): "; Stampa" Sysname: $ Risultati -> {$ System {sysname}} "; Stampa" Sysuptime: $ Risultati -> {$ System {sysuptime}} "; Stampa" Syslocation: $ Risultati -> {$ System {syslocation}} ";} else {stampa" $ host Errore SNMP ($ cmd => @args): $ risultati. ";} Stampa" ARGS aggiuntivo: @Callback_args "; se (- $ heap -> {in attesa} == 0) {$ kernel-> post ($ alias => 'finish');}} $ poe_kernel-> run (); # Vedi la cartella ad es L'archivio di distribuzione per ulteriori requisiti di campioni: · Perl.


Poe :: Componente :: SNMP Software correlato