| Net-SNMP-Mixin documentation | view source | Contained in the Net-SNMP-Mixin distribution. |
Net::SNMP::Mixin::System - mixin class for the mib-2 system-group values
Version 0.12
A Net::SNMP mixin class for mib-II system-group info. It's just in the distribution to act as a blueprint for mixin authors.
use Net::SNMP;
use Net::SNMP::Mixin qw/mixer init_mixins/;
my $session = Net::SNMP->session( -hostname => 'foo.bar.com' );
$session->mixer('Net::SNMP::Mixin::System');
$session->init_mixins;
snmp_dispatcher() if $session->nonblocking;
die $session->error if $session->error;
my $system_group = $session->get_system_group;
printf "Name: %s, Contact: %s, Location: %s\n",
$system_group->{sysName},
$system_group->{sysContact},
$system_group->{sysLocation};
Returns the mib-II system-group as a hash reference:
{
sysDescr => DisplayString,
sysObjectID => OBJECT_IDENTIFIER,
sysUpTime => TimeTicks,
sysContact => DisplayString,
sysName => DisplayString,
sysLocation => DisplayString,
sysServices => INTEGER,
}
Fetch the SNMP mib-II system-group values from the host. Don't call this method direct! Returns nothing in case of failure so init_mixins can stop initialization.
Only for developers or maintainers.
Fetch values from the system-group once during object initialization. Push error message onto the error buffer in case of failure and returns nothing.
The callback for _fetch_system_group. Push error message onto the error buffer in case of failure and returns nothing.
There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties that are not explained within the POD documentation, please submit a bug to the RT system (see link below). However, it would help greatly if you are able to pinpoint problems or even supply a patch.
Fixes are dependant upon their severity and my availablity. Should a fix not be forthcoming, please feel free to (politely) remind me by sending an email to gaissmai@cpan.org .
RT: http://rt.cpan.org/Public/Dist/Display.html?Name=Net-SNMP-Mixin
Karl Gaissmaier <karl.gaissmaier at uni-ulm.de> =head1 COPYRIGHT & LICENSE
Copyright 2008 Karl Gaissmaier, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Net-SNMP-Mixin documentation | view source | Contained in the Net-SNMP-Mixin distribution. |