PHP Doku:: Reads and parses a MIB file into the active MIB tree - function.snmp-read-mib.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige DiensteSNMPSNMP-Funktionensnmp_read_mib

Ein Service von Reinhard Neidl - Webprogrammierung.

SNMP-Funktionen

<<snmp_get_valueretrieval

snmp_set_enum_print>>

snmp_read_mib

(PHP 5)

snmp_read_mib Reads and parses a MIB file into the active MIB tree

Beschreibung

bool snmp_read_mib ( string $filename )
Warnung

Diese Funktion ist bis jetzt nicht dokumentiert. Es steht nur die Liste der Argumente zur Verfügung.


2 BenutzerBeiträge:
- Beiträge aktualisieren...
jdhall75 at yahoo dot com
5.03.2008 2:50
If you are trying to import mibs with dependencies on other mibs you will have to set the MIBDIRS environment variable.

Unix / Linux: export MIBDIRS=/home/<user>/MIBS:/usr/share/snmp/mibs
Window: Good luck! No really.  Try this url out.  It has everything that you need to know about setting environment vars in windows.

http://vlaurie.com/computers2/Articles/environment.htm
ptitgal at hotmail dot com
28.02.2006 11:37
Importing massive Mibs located in a directory
<?php
/******************** Loading Mibs **************/
 
$mib_path='YourPath';   
 if (
$handle = opendir($mib_path))
 { echo
"Directory handle: $handle <br>";
    echo
"Files: <br>";
    while (
false !== ($file = readdir($handle)))
    { if(
$file!='.')
       { if(
$file!='..')
          { echo
"Read : ";       
            echo
"$mib_path.$file";
            if(
snmp_read_mib($mib_path.'\\'.$file)) echo " Succesful <br>";
            else echo
" Failed <br>";
         }
        }
    }
}
closedir($handle);

?>



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)