Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

snmp(3) [php man page]

SNMP(3) 								 1								   SNMP(3)

The SNMP class

INTRODUCTION
Represents SNMP session. CLASS SYNOPSIS
SNMP SNMP Properties o public int$max_oids o public int$valueretrieval o public bool$quick_print o public bool$enum_print o public int$oid_output_format o public bool$oid_increasing_check o public int$exceptions_enabled o public array$info Methods o public SNMP::__construct (int $version, string $hostname, string $community, [int $timeout = 1000000], [int $retries = 5]) o public bool SNMP::close (void ) o public mixed SNMP::get (mixed $object_id, [bool $preserve_keys = false]) o public int SNMP::getErrno (void ) o public string SNMP::getError (void ) o public mixed SNMP::getnext (mixed $object_id) o public bool SNMP::set (mixed $object_id, mixed $type, mixed $value) o public bool SNMP::setSecurity (string $sec_level, [string $auth_protocol], [string $auth_passphrase], [string $priv_protocol], [string $priv_passphrase], [string $contextName], [string $contextEngineID]) o public array SNMP::walk FALSE (string $object_id, [bool $suffix_as_key], [int $max_repetitions], [int $non_repeaters]) Constants o const integer$SNMP::ERRNO_NOERROR0 o const integer$SNMP::ERRNO_GENERIC2 o const integer$SNMP::ERRNO_TIMEOUT4 o const integer$SNMP::ERRNO_ERROR_IN_REPLY8 o const integer$SNMP::ERRNO_OID_NOT_INCREASING16 o const integer$SNMP::ERRNO_OID_PARSING_ERROR32 o const integer$SNMP::ERRNO_MULTIPLE_SET_QUERIES64 o const integer$SNMP::ERRNO_ANY126 o const integer$SNMP::VERSION_10 o const integer$SNMP::VERSION_2C1 o const integer$SNMP::VERSION_2c1 o const integer$SNMP::VERSION_33 PROPERTIES
o $max_oids -Maximum OID per GET/SET/GETBULK request o $valueretrieval -Controls the method how the SNMP values will be returned +-------------------+---------------------------------------------------+ | | | |SNMP_VALUE_LIBRARY | | | | | | | The return values will be as returned by the Net- | | | SNMP library. | | | | | | | | SNMP_VALUE_PLAIN | | | | | | | The return values will be the plain value without | | | the SNMP type hint. | | | | | | | |SNMP_VALUE_OBJECT | | | | | | | The return values will be objects with the prop- | | | erties "value" and "type", where the latter is | | | one of the SNMP_OCTET_STR, SNMP_COUNTER etc. con- | | | stants. The way "value" is returned is based on | | | which one of SNMP_VALUE_LIBRARY, SNMP_VALUE_PLAIN | | | is set | | | | +-------------------+---------------------------------------------------+ o $quick_print -Value of $quick_print within the NET-SNMP library Sets the value of $quick_print within the NET-SNMP library. When this is set (1), the SNMP library will return 'quick printed' values. This means that just the value will be printed. When $quick_print is not enabled (default) the UCD SNMP library prints extra information including the type of the value (i.e. IpAddress or OID). Addition- ally, if quick_print is not enabled, the library prints additional hex values for all strings of three characters or less. o $enum_print -Controls the way enum values are printed Parameter toggles if walk/get etc. should automatically lookup enum values in the MIB and return them together with their human readable string. o $oid_output_format -Controls OID output format OID .1.3.6.1.2.1.1.3.0 representation for various $oid_output_format values +------------------------+-------------------------------------+ | | | | SNMP_OID_OUTPUT_FULL | | | | | | | | | | | |SNMP_OID_OUTPUT_NUMERIC | | | | | | | | | | | |SNMP_OID_OUTPUT_MODULE | | | | | | | DISMAN-EVENT-MIB::sysUpTimeInstance | | | | | | | |SNMP_OID_OUTPUT_SUFFIX | | | | | | | sysUpTimeInstance | | | | | | | | SNMP_OID_OUTPUT_UCD | | | | | | | system.sysUpTime.sysUpTimeInstance | | | | | | | | SNMP_OID_OUTPUT_NONE | | | | | | | Undefined | | | | +------------------------+-------------------------------------+ o $oid_increasing_check -Controls disabling check for increasing OID while walking OID tree Some SNMP agents are known for returning OIDs out of order but can complete the walk anyway. Other agents return OIDs that are out of order and can cause SNMP::walk to loop indefinitely until memory limit will be reached. PHP SNMP library by default performs OID increasing check and stops walking on OID tree when it detects possible loop with issuing warning about non-increasing OID faced. Set $oid_increasing_check to FALSE to disable this check. o $exceptions_enabled - Controls which failures will raise SNMPException instead of warning. Use bitwise OR'ed SNMP::ERRNO_* constants. By default all SNMP exceptions are disabled. o $info -Read-only property with remote agent configuration: hostname, port, default timeout, default retries count PREDEFINED CONSTANTS
SNMP"; ERROR TYPES" o SNMP::ERRNO_NOERROR -No SNMP-specific error occurred. o SNMP::ERRNO_GENERIC -A generic SNMP error occurred. o SNMP::ERRNO_TIMEOUT -Request to SNMP agent timed out. o SNMP::ERRNO_ERROR_IN_REPLY -SNMP agent returned an error in reply. o SNMP::ERRNO_OID_NOT_INCREASING -SNMP agent faced OID cycling reporning non-increasing OID while executing (BULK)WALK command. This indicates bogus remote SNMP agent. o SNMP::ERRNO_OID_PARSING_ERROR - Library failed while parsing OID (and/or type for SET command). No queries has been made. o SNMP::ERRNO_MULTIPLE_SET_QUERIES - Library will use multiple queries for SET operation requested. That means that operation will be performed in a non-transaction manner and second or subsequent chunks may fail if a type or value failure will be faced. o SNMP::ERRNO_ANY - All SNMP::ERRNO_* codes bitwise OR'ed. SNMP"; PROTOCOL VERSIONS" o SNMP::VERSION_1 - o SNMP::VERSION_2C, SNMP::VERSION_2c - o SNMP::VERSION_3 - PHP Documentation Group SNMP(3)
Man Page