473,385 Members | 1,610 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,385 software developers and data experts.

snmp: string index in OID is considered invalid :-(

Hello

How can I do the following command with PHP?

$ snmpwalk -Ir -On myhost \
'ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26"'
..1.3.6.1.4.1.529.23.1.1.1.2.8.99.105.114.45.49.45 .50.54 = INTEGER: yes(2)

snmpget() does not like the string index and give "Invalid object identifier",
it seems that something like the "-Ir" flag is missing in PHP as other
entries of this mib can be translated correctly.

Funnily, snmpwalk() does return the string representation itself:
array (
'ASCEND-MIBINET-MIB::internetProfile-Station."bras-1-2"'
=> 'STRING: "bras-1-2"',
...
Does anybody know the trick or do I have write my own OID converter which
would not be hard though as the appended oid numbers are just the strlen()
and the ascii values of the string.

bye,

-christian-
Oct 19 '05 #1
2 3429
$ snmpwalk -Ir -On myhost \
'ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26"'
.1.3.6.1.4.1.529.23.1.1.1.2.8.99.105.114.45.49.45. 50.54 = INTEGER: yes(2)


Have you escaped all of the single and/or double quotes correctly in
your PHP snmp*() calls?

---
Steve

Oct 19 '05 #2
Hello

On 2005-10-19 Steve wrote:
$ snmpwalk -Ir -On myhost \
'ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26"'
.1.3.6.1.4.1.529.23.1.1.1.2.8.99.105.114.45.49.45. 50.54 = INTEGER: yes(2)


Have you escaped all of the single and/or double quotes correctly in
your PHP snmp*() calls?


I tried the following ways, can you imagine more? :)

'ASCEND-MIBINET-MIB::internetProfile-Active."cir-1-26"');
'ASCEND-MIBINET-MIB::internetProfile-Active.\"cir-1-26\"');
'ASCEND-MIBINET-MIB::internetProfile-Active.\\"cir-1-26\\"');
"ASCEND-MIBINET-MIB::internetProfile-Active.\"cir-1-26\"");
"ASCEND-MIBINET-MIB::internetProfile-Active.\\\"cir-1-26\\\"");
"ASCEND-MIBINET-MIB::internetProfile-Active.'cir-1-26'");
"ASCEND-MIBINET-MIB::internetProfile-Active.\'cir-1-26\'");
"ASCEND-MIBINET-MIB::internetProfile-Active.\\'cir-1-26\\'");

bye,

-christian-
Oct 19 '05 #3

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

Similar topics

1
by: dan byers | last post by:
hey everyone, i'm working on a system to monitor devices through SNMP. i'm using the Net::SNMP modules by D.Town. i try to load the snmp session request with a set of OIDs to make the system...
5
by: mony | last post by:
I am looking a VB.NET example on how to reference the SNMP API information. I am unable to add references to SNMPAPI.LIB or SNMPAPI.DLL. My goal is to write a 100% VB.NET example (no C or C#...
2
by: TiToine | last post by:
Hi, I'am using the SnmpMgrOpen() api function. ####################################################################### LPSNMP_MGR_SESSION SnmpMgrOpen( LPSTR lpAgentAddress, // name and...
3
by: Jean-Marc Blaise | last post by:
Dear all, I've been looking for some info on the snmp support provided by DB2 UDB V8.1. Just 1 line, and 2 references in the index, when the V7.1 Troubleshooting guide had a complete paragraph....
5
by: Dan | last post by:
Does anyone have any samples or references to get me started with WMI for collecting SNMP information? Any help is appreciated. Thanks, Dan
11
by: RipperT | last post by:
Don't know if this group covers web apps, but here goes. In VS 2005, I am trying to get variables to hold thier values during postback from the server. I convert a text box's user-keyed value to an...
2
by: Jason James | last post by:
Guys, can anyone confirm the process on converting the OID into an array of bytes for sending to the SNMP device. The code I have seems to only work for values in the OID that are less than...
4
by: Oliver | last post by:
Hi group: I'm running FreeBSD 6.2 with PHP5.2.4. I get this error when I try to start PHP: PHP Warning: PHP Startup: Unable to load dynamic library...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.