Alien-SNMP
view release on metacpan or search on metacpan
unshift @PATH, Alien::SNMP->bin_dir;
my $uptime = `snmpget -v2c -c public $host 1.3.6.1.2.1.1.3.0`;
They read MIBs and snmp.conf from this distribution's own directories
rather than from /usr/share/snmp/mibs and /etc/snmp, so putting
"bin_dir" first on "PATH" changes both for anything that runs from
there. See "Shadowing an operating system packaged SNMP.pm".
Their options and output formats are Net-SNMP's own and are documented
at <http://www.net-snmp.org/docs/man/>. This distribution builds with
"--disable-manuals", so it installs no man pages of its own for them.
Which libnetsnmp the utilities load
Each utility records this distribution's share directory as its
run-path, so it finds our "libnetsnmp" without any help from you, and
coexists with a system Net-SNMP package. The one thing that overrides a
run-path is "LD_LIBRARY_PATH", an environment variable that is unset on
most systems and that "echo $LD_LIBRARY_PATH" will show you. If it is
set, and names a directory holding another "libnetsnmp" of the same
major version, that copy is loaded instead of ours. "delete local
lib/Alien/SNMP.pm view on Meta::CPAN
unshift @PATH, Alien::SNMP->bin_dir;
my $uptime = `snmpget -v2c -c public $host 1.3.6.1.2.1.1.3.0`;
They read MIBs and F<snmp.conf> from this distribution's own directories rather
than from F</usr/share/snmp/mibs> and F</etc/snmp>, so putting L</bin_dir> first
on C<PATH> changes both for anything that runs from there. See
L</Shadowing an operating system packaged SNMP.pm>.
Their options and output formats are Net-SNMP's own and are documented at
L<http://www.net-snmp.org/docs/man/>. This distribution builds with
C<--disable-manuals>, so it installs no man pages of its own for them.
=head2 Which libnetsnmp the utilities load
Each utility records this distribution's share directory as its run-path, so it
finds our C<libnetsnmp> without any help from you, and coexists with a system
Net-SNMP package. The one thing that overrides a run-path is
C<LD_LIBRARY_PATH>, an environment variable that is unset on most systems and
that C<echo $LD_LIBRARY_PATH> will show you. If it is set, and names a directory
holding another C<libnetsnmp> of the same major version, that copy is loaded
( run in 1.142 second using v1.01-cache-2.11-cpan-4e7a2411597 )