English 中文(简体)
PHP MIB to OID resolve
原标题:
  • 时间:2010-09-20 19:33:56
  •  标签:
  • php
  • snmp
  • mib

I m googling around for a couple of days, and can t find clear method/lib for resolving OID from MIB name, and MIB from OID.

I ve found few sites that have a large MIB database, search functions ie. but communicate with them needs cURL/socket connectivity and regexp of results (or eval in some cases)

I ve tried to parse MIB files myself, but this is returning to writing language parser in php witch, is "madness" ;)

I have storage/cache mechanism witch work well, and every MIB lockup has to be done only once, but this one lockup must be fast and reliable

[EDIT] heh and forgot about clearing the point, is there any tool/lib/method fast and reliable to lockup MIBs and OIDs?

最佳回答

If you have net-snmp installed, and you can execute programs from your PHP script, you can use snmptranslate to go from a name to a mib:

snmptranslate -IR sysName.0

This tool depends on having your MIBDIRS and MIBS environment variables set, or supplying appropriate command arguments. (See man snmpcmd for details on the env vars and/or args.)

问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签