NAME
Cisco::SNMP::System - System Interface for Cisco Management
SYNOPSIS
use Cisco::SNMP::System;
DESCRIPTION
The following methods implement the System MIB defined in SNMPv2-MIB
.
METHODS
new() - create a new Cisco::SNMP::System object
my $cm = Cisco::SNMP::System->new([OPTIONS]);
Create a new Cisco::SNMP::System object with OPTIONS as optional parameters. See Cisco::SNMP for options.
sysOIDs() - return OID names
my @sysOIDs = $cm->sysOIDs();
Return list of System MIB object ID names.
system_info() - populate system info data structure.
my $sysinfo = $cm->system_info();
Retrieve the system MIB information from the object defined in $cm
.
Allows the following accessors to be called.
sysDescr() - return system description
$sysinfo->sysDescr();
Return the system description from the system info data structure.
sysObjectID() - return system object ID
$sysinfo->sysObjectID();
Return the system object ID from the system info data structure.
sysUpTime() - return system uptime
$sysinfo->sysUpTime();
Return the system uptime from the system info data structure.
sysContact() - return system contact
$sysinfo->sysContact();
Return the system contact from the system info data structure.
sysName() - return system name
$sysinfo->sysName();
Return the system name from the system info data structure.
sysLocation() - return system location
$sysinfo->sysLocation();
Return the system location from the system info data structure.
sysServices() - return system services
$sysinfo->sysServices([1]);
Return a pointer to an array containing the names of the system services from the system info data structure. For the raw number, use the optional boolean argument.
sysORLastChange() - return system orlastchange
$sysinfo->sysORLastChange();
Return the system orlastchange from the system info data structure.
sysOSVersion() - return system OS version
$sysinfo->sysOSVersion();
Return the system OS version as parsed from the sysDescr OID. This is a derived value, not an actual MIB OID.
DIRECT ACCESS METHODS
The following methods can be called on the Cisco::SNMP::System object directly to access the values directly.
- get_sysDescr
- get_sysObjectID
- get_sysUpTime
- get_sysContact
- get_sysName
- get_sysLocation
- get_sysServices
- get_sysORLastChange
-
Get System OIDs.
- set_sysContact (string)
- set_sysName (string)
- set_sysLocation (string)
-
Set System OIDs.
INHERITED METHODS
The following are inherited methods. See Cisco::SNMP for more information.
- close
- error
- session
EXPORT
None by default.
EXAMPLES
This distribution comes with several scripts (installed to the default bin
install directory) that not only demonstrate example uses but also provide functional execution.
LICENSE
This software is released under the same terms as Perl itself. If you don't know what that means visit http://perl.com/.
AUTHOR
Copyright (C) Michael Vincent 2015
All rights reserved