Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

snmpget(3) [php man page]

SNMPGET(3)								 1								SNMPGET(3)

snmpget - Fetch anSNMPobject

SYNOPSIS
string snmpget (string $hostname, string $community, string $object_id, [int $timeout = 1000000], [int $retries = 5]) DESCRIPTION
The snmpget(3) function is used to read the value of an SNMP object specified by the $object_id. PARAMETERS
o $hostname - The SNMP agent. o $community - The read community. o $object_id - The SNMP object. o $timeout - The number of microseconds until the first timeout. o $retries - The number of times to retry if timeouts occur. RETURN VALUES
Returns SNMP object value on success or FALSE on error. EXAMPLES
Example #1 Using snmpget(3) <?php $syscontact = snmpget("127.0.0.1", "public", "system.SysContact.0"); ?> SEE ALSO
snmpset(3). PHP Documentation Group SNMPGET(3)

Check Out this Related Man Page

SNMPWALKOID(3)								 1							    SNMPWALKOID(3)

snmpwalkoid - Query for a tree of information about a network entity

SYNOPSIS
array snmpwalkoid (string $hostname, string $community, string $object_id, [int $timeout = 1000000], [int $retries = 5]) DESCRIPTION
snmpwalkoid(3) function is used to read all object ids and their respective values from an SNMP agent specified by $hostname. The existence of snmpwalkoid(3) and snmpwalk(3) has historical reasons. Both functions are provided for backward compatibility. Use snm- prealwalk(3) instead. PARAMETERS
o $hostname - The SNMP agent. o $community - The read community. o $object_id - If NULL, $object_id is taken as the root of the SNMP objects tree and all objects under that tree are returned as an array. If $object_id is specified, all the SNMP objects below that $object_id are returned. o $timeout - The number of microseconds until the first timeout. o $retries - The number of times to retry if timeouts occur. RETURN VALUES
Returns an associative array with object ids and their respective object value starting from the $object_id as root or FALSE on error. EXAMPLES
Example #1 snmpwalkoid(3) Example <?php $a = snmpwalkoid("127.0.0.1", "public", ""); for (reset($a); $i = key($a); next($a)) { echo "$i: $a[$i]<br /> "; } ?> Above function call would return all the SNMP objects from the SNMP agent running on localhost. One can step through the values with a loop SEE ALSO
snmpwalk(3). PHP Documentation Group SNMPWALKOID(3)
Man Page

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

SNMPGET unix script - help

Hi need urgent help , for creating unix script . To collect system name,This is command i want to execute n (integer) no. of times for for a differnt IP addresses .IP is variable in every execution. Other string & collecter name is constant . snmpGet %IP% sysName.0 -c <string> -S <datacollecter... (3 Replies)
Discussion started by: langdatyagi
3 Replies

2. UNIX for Advanced & Expert Users

snmpget command not working

HI to all Unix gurus and Lovers, I am having one snmpd problem somewhat strange. When I execute 'snmpget -v2c -c public <local_ip> system.sysDescr.0' initially 4-5 times it executes properly,But after that it gives a message of 'Timeout: No Response from... (0 Replies)
Discussion started by: jagdish.machhi@
0 Replies

3. Shell Programming and Scripting

snmpget in a perl programme

Hi Guyz can u tell me how to write a programme in perl using snmpget. Regards' Harrr (0 Replies)
Discussion started by: Harikrishna
0 Replies

4. UNIX for Advanced & Expert Users

snmpget/snmpwalk for dskPercent not working.

snmpwalk -v1 -c myname {ip address} dskPercent. Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: UCD-SNMP-MIB::dskPercentNode snmpget -v1 -c myname {ip address} dskPercent.1 Error in packet Reason: (noSuchName) There is no such variable... (0 Replies)
Discussion started by: ynilesh
0 Replies

5. Solaris

Net-SNMP v5.4 - sub-id not found in log, but can query with snmpget and snmpwalk

Hi everyone, I'm configuring Net-SNMP v5.4 on Solaris 10, sending traps to OpenNMS 1.2.9-0.20061212.0. I'm setting up disk monitoring (% of space free) for 5 directories. Here's what I'm working with: (snmpd.conf - disk and monitoring portions) # # Disk Usage monitoring: # disk / 20%... (0 Replies)
Discussion started by: Mariognarly
0 Replies

6. Infrastructure Monitoring

snmpget not working on AIX shared wpar

Hi, I have a shared AIX wpar configured. I have started snmpd process on shared AIX wpar. But when i tried to query a MIB id using the following command /opt/OV/bin/snmpget -d -v 1 -c public -p <hostname> .1.3.6.1.2.1.1.7.0 i get the following error message #... (0 Replies)
Discussion started by: avazeer
0 Replies

7. AIX

snmpget not working on AIX shared wpar

(0 Replies)
Discussion started by: avazeer
0 Replies

8. Shell Programming and Scripting

snmpget

Good morning All, I'm just wondering if I can get help with writing a simple script that check for Community names and make a comparison to the new community name given. Thanks T (0 Replies)
Discussion started by: lemseffert
0 Replies