473,398 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

snmpget weirdnes


Hello,

I noteced a weird problem with php snmpget. When I get two different consecutive
queries from Cisco box (actualy, any box) and if the first returned value is not
empty, but the second one is empty, then php shows exactly the same value for
second snmpget as for the first one. If I perform snmpget from linux shell,
everything is OK:

from shell:

[root]# snmpget 10.0.0.1 public sysName.0
[root]# system.sysName.0 = ruter1

[root]# snmpget 10.0.0.1 public sysLocation.0
[root]# system.sysLocation.0 =

but with php:

$a = snmpget('10.0.0.1', 'public', 'sysName.0');
$b = snmpget('10.0.0.1', 'public', 'sysLocation.0');

echo "a = $a" => I get: a = ruter1

echo "b = $b" => I get: b = ruter1

Can anyone tell me why is that?

PHP Version 4.3.2
'./configure' '--with-snmp'

cheers,
xal
Jul 17 '05 #1
0 1707

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Krzysztof | last post by:
No one could answer my question lately, so maybe today I will have some luck :-) Here we go again: I noteced a weird problem with php snmpget. When I get two different consecutive queries from...
3
by: WIWA | last post by:
I have recently installed pySNMP 3.3.2 and use Python 2.2.2. Thanks to Peter Hansen, I succeeded to install pySNMP properly. I'm not completely new to SNMP (I know the basics), but I'm new to...
0
by: WIWA | last post by:
Hi, I have installed pySNMP. I want to make an application where I read out all the OIDs of a MIB of a particular device. In other words, I want to do an SNMPwalk for a certain MIB. I can do...
2
by: Axel Scheepers | last post by:
Hi All, Python is so great. I've been creating a small set of objects to get some stats from our adsl routers. So far it works great and fast. However, in the shell script I created over a year...
0
by: Bill | last post by:
I've recently built a new server on which I've tried to configure and install PHP5 (I've now tried 5.0.4, 5.0.5, and 5.1.0RC1) along with Apache 1.3.33 and net-snmp 5.2.1.2. (Building PHP5 as an...
2
by: challman | last post by:
I'm executing the following: def run(self): # get ntp_column pop = os.popen("snmpget -v 1 -c SLI398uwiE " + self.host + " 1.3.6.1.4.1.9.9.168.1.1.9.0\n") popS = string.join(pop.readlines())...
0
by: Evert | last post by:
Hi all! I have a script that queries a whole bunch of clients for a specific value. Some of the clients do not repond properly, and then I end up with lines like: Warning: snmpget(): Error in...
7
by: moon1 | last post by:
how will I change the code the 1st code according to the 2nd one? 1st code sub snmpGet(@) { # Assign arguments my ($deviceName)=$_; # Device name to read from my...
1
by: asdf | last post by:
I would like to use ASP code to execute a third-party program and output it's results on a webpage. The program that i need to run is net-snmp's snmpget. So it would look something like 'snmpget -v...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.