SNMP2_WALK(3) 1 SNMP2_WALK(3)snmp2_walk - Fetch all theSNMPobjects from an agentSYNOPSIS
array snmp2_walk (string $host, string $community, string $object_id, [string $timeout = 1000000], [string $retries = 5])
DESCRIPTION snmp2_walk(3) function is used to read all the values from an SNMP agent specified by the $hostname.
PARAMETERS
o $host
- The SNMP agent (server).
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 array of SNMP object values starting from the $object_id as root or FALSE on error.
EXAMPLES
Example #1
snm2_pwalk(3) Example
<?php
$a = snmp2_walk("127.0.0.1", "public", "");
foreach ($a as $val) {
echo "$val
";
}
?>
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 snmp2_real_walk(3).
PHP Documentation Group SNMP2_WALK(3)
Check Out this Related Man Page
SNMP2_GETNEXT(3) 1 SNMP2_GETNEXT(3)snmp2_getnext - Fetch theSNMPobject which follows the given object idSYNOPSIS
string snmp2_getnext (string $host, string $community, string $object_id, [string $timeout = 1000000], [string $retries = 5])
DESCRIPTION
The snmp2_get_next(3) function is used to read the value of the SNMP object that follows the specified $object_id.
PARAMETERS
o $host
- The hostname of the SNMP agent (server).
o $community
- The read community.
o $object_id
- The SNMP object id which precedes the wanted one.
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. In case of an error, an E_WARNING message is shown.
EXAMPLES
Example #1
Using snmp2_get_next(3)
<?php
$nameOfSecondInterface = snmp2_get_next('localhost', 'public', 'IF-MIB::ifName.1';
?>
SEE ALSO snmp2_get(3), snmp2_walk(3).
PHP Documentation Group SNMP2_GETNEXT(3)
Does anyone know how to run " ./agent.be & " in the background? I need to keep it running so that Backup Exec can see it. When I log out as root is shuts down the agent. This just started happening after I upgraded my Veritas drivers on my Windows 2000 server. That is my backup server.
Hope... (1 Reply)
im running a while loop as a file watcher, with incremental counter on the retries..however when the retries reach it's limit i want it exit and echo and error and stop the batch. Im not sure the code i have will do that already...
Here is what i have that works:
#!/usr/bin/ksh
count=0... (2 Replies)
Hi all,
lately i managed to install SNMP agent on Solaris 9 & 10. The second objective is now to configure traps. However (since i'm totally new to the SUN world) i don't know a way of how to start. Can somebody help me with details? What is the first thing that you need to do to start trapping?... (3 Replies)
Can someone please tell me how I can find out what version of SNMP I have running on any linux and solaris server?
i would think this was an easy thing to find. but google wasn't able to turn up anything on this.
snmp -v should do the trick but it doesn't.
thank you guys (1 Reply)
Hello,
I need to create an snmp.comf file that defines 2 IPs to the same community string.
Do I need to have 2 community strings with the same name and diff't IPs?
Or should I have 1 string and list the IPs? (comma seperated?)
Example:
rocommunity EC_8000_RO
arguments EC_8000_RO... (2 Replies)
Hi,
I have below IP address configured in my server. Recently i installed SNMP in Linux 64x bit. While checking the snmp using snmpwalk i get Time out error for all IP except loopback IP(127.0.0.1).
How to make all my IPs listen to SNMP
eth0
BOOTPROTO=static
DEVICE=eth0... (1 Reply)
Hello aix community,
After scouring the internet to find a step by step process, I've exhausted my efforts. Although I have learned a lot which brings me to this forum. I'm totally new and hope to ask the right questions.
What is the easiest way to connect to a SQL server from aix?
... (2 Replies)