From 0dc9174c832b115d6cbcf06403146fac6cdbb565 Mon Sep 17 00:00:00 2001 From: Bill Fenner <> Date: Thu, 15 Feb 2007 21:49:59 +0000 Subject: [PATCH] Fix uptime fetching code. Minor documentation fixes. --- Info/Layer3/NetSNMP.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Info/Layer3/NetSNMP.pm b/Info/Layer3/NetSNMP.pm index be33f4c4..90879bbf 100644 --- a/Info/Layer3/NetSNMP.pm +++ b/Info/Layer3/NetSNMP.pm @@ -32,7 +32,7 @@ use Exporter; use SNMP::Info::Layer3; use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE $INIT/ ; -$VERSION = '1.04'; +$VERSION = '1.05'; @SNMP::Info::Layer3::NetSNMP::ISA = qw/SNMP::Info::Layer3 Exporter/; @SNMP::Info::Layer3::NetSNMP::EXPORT_OK = qw//; @@ -97,7 +97,7 @@ sub uptime { my $netsnmp = shift; my $uptime; - $uptime = $ucd->hrSystemUptime(); + $uptime = $netsnmp->hrSystemUptime(); return $uptime if defined $uptime; return $netsnmp->SUPER::uptime(); @@ -182,19 +182,20 @@ These are methods that return scalar value from SNMP =item $netsnmp->vendor() - Returns 'Net-SNMP' and the Net-SNMP version. +Returns 'Net-SNMP'. =item $netsnmp->os() - Returns the OS extracted from sysDescr. +Returns the OS extracted from sysDescr. =item $netsnmp->os_ver() - Returns the software version extracted from sysDescr. +Returns the software version extracted from sysDescr, along +with the Net-SNMP version. =item $netsnmp->uptime() - Returns the system uptime instead of the agent uptime. +Returns the system uptime instead of the agent uptime. NOTE: discontinuity timers and other TimeStamp-based objects are based on agent uptime, so use orig_uptime().