Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

snmpwalk(3) [php man page]

SNMPWALK(3)								 1							       SNMPWALK(3)

snmpwalk - Fetch all theSNMPobjects from an agent

SYNOPSIS
array snmpwalk (string $hostname, string $community, string $object_id, [int $timeout = 1000000], [int $retries = 5]) DESCRIPTION
snmpwalk(3) function is used to read all the values from an SNMP agent specified by the $hostname. PARAMETERS
o $hostname - 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 snmpwalk(3) Example <?php $a = snmpwalk("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
snmprealwalk(3). PHP Documentation Group SNMPWALK(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

15 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Monitoring CPU usage on AIX 5.3 with SNMP

Hi I would like to monitor CPU usage ( %) , memory utilization and such on an AIX 5.3 with snmp. How would I do that ? :confused: If I do "snmpwalk -c public -v1 hosttomonitor" I get nothing about the CPU. I've done this on Linux ( not much trouble doing it on linux ) but I'm having a hard... (2 Replies)
Discussion started by: art
2 Replies

2. UNIX for Dummies Questions & Answers

Snmp

Help - I need to get the snmp manager running on my AIX box, os ver = 5.3 and I have to be able to use the command snmpwalk to get the data from the devices I need to monitor. I cannot figure out what package to install to be able to use that specific command, though I will admit this is... (2 Replies)
Discussion started by: capeme
2 Replies

3. Shell Programming and Scripting

Array values treated as one

I want each integer to be a value/element in the array, however the string is being treated as one. How can I stream these into distinct values? PSF6INDEX=`(snmpwalk -v 2c -c 'H0meru!es' ${SWITCH} .1.3.6.1.2.1.2.2.1.2 | grep 'GigabitEthernet' | sed 's/IF-MIB::ifDescr\.//g' | awk '{print $1}' |... (1 Reply)
Discussion started by: cytriesbash
1 Replies

4. Shell Programming and Scripting

exit out of a while loop with error

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)
Discussion started by: sigh2010
2 Replies

5. Solaris

Cisco Mac Question

When I do a snmpwalk of my router the mac address are not what I expected. Then return looking like this How would you convert them to 001c.c92a.b677 when a shell script? (3 Replies)
Discussion started by: mrlayance
3 Replies

6. Infrastructure Monitoring

SNMP Traps

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)
Discussion started by: Wizard_1979
3 Replies

7. Infrastructure Monitoring

SNMP Issue

When my server is restarted, SNMP does not start automatically. It needs to be started manually everytime the server is restarted. (1 Reply)
Discussion started by: shahdeo
1 Replies

8. Infrastructure Monitoring

snmpwalk on solaris 8

hello, I want to know how can I find the path of snmpwalk under sun solaris 5.8. I have snmp protocol installed.when I write this on a terminal I have this result: bash: snmpwalk: command not found but when I wrote this command At a distance,it works good. urgent please help me thanks (4 Replies)
Discussion started by: lamou23
4 Replies

9. Solaris

snmpwalk on solaris 8

(4 Replies)
Discussion started by: lamou23
4 Replies

10. Infrastructure Monitoring

SNMP on Sun Solaris 5.8

hello, I have installer netsnmp on sun solaris 5.10, bur when I write this: /usr/local/bin/snmpwalk -v1 -c public localhost I have this error: ld.so.1: snmpwalk: fatal : libcrypto.so.0.9.8 : failed to open: no such file or directory can any one help me please... (7 Replies)
Discussion started by: lamou23
7 Replies

11. UNIX for Dummies Questions & Answers

trouble with snmpwalk script

I am using a line of code that I borrowed from someone else's script, in a script to monitor changes in my local network. It works but it takes too long to pick up the changes. snmpwalk -v 2c -c PASSWORD -Oq 10.0.1.1 RFC1213-MIB::atPhysAddress The snmp server is my apple router. If I monitor... (7 Replies)
Discussion started by: chancho
7 Replies

12. Solaris

Timeout: No Response from localhost

Hi All! I having an issue when trying to run snmpwalk, so the following command it returns an error: bash-3.00# /usr/sfw/bin/snmpwalk -v 2c -c public localhost sysDescr.0 Timeout: No Response from localhost bash-3.00# I have checked also: bash-3.00# svcs -a | grep sma online ... (2 Replies)
Discussion started by: fretagi
2 Replies

13. Shell Programming and Scripting

Need help with creating a script for Snmpwalking

Hello, Very new to scripting, basically learning on the job. So, I have a task I'm trying to complete. What I need is comparing an input file and running the snmpwalk command to find out which 3 community strings a device is using. this is what I have so far: (I've replaced what the... (4 Replies)
Discussion started by: tuscanitunr
4 Replies

14. AIX

Connect to a SQL server from AIX

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)
Discussion started by: TechStudent36
2 Replies

15. What is on Your Mind?

An Introduction to new Member

Hi guys, I am glad to be the part of this community. Hope my presence will be of great use for the people in this community. (2 Replies)
Discussion started by: subsystems
2 Replies