PHP Doku:: Holt den aktuellen Wert der quick_print Einstellung der UCD Bibliothek - function.snmp-get-quick-print.html

Verlauf / Chronik / History: (50) anzeigen

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

Ein Service von Reinhard Neidl - Webprogrammierung.

SNMP-Funktionen

<<SNMP-Funktionen

snmp_get_valueretrieval>>

snmp_get_quick_print

(PHP 4, PHP 5)

snmp_get_quick_printHolt den aktuellen Wert der quick_print Einstellung der UCD Bibliothek

Description

bool snmp_get_quick_print ( void )

Gibt den aktuellen Wert von quick_print der UCD Bibliothek zurück. quick_print ist standardmäßig abgeschaltet.

$quickprint = snmp_get_quick_print();

Der obige Funktionsaufruf gibt FALSE zurück, wenn quick_print ausgeschaltet ist und TRUE, wenn quick_print eingeschaltet ist.

Die snmp_get_quick_print() Funktion ist nur bei Verwendung der SNMP Bibliothek verfügbar, jedoch nicht bei Verwendung der Windows SNMP Bibliothek.

Siehe: snmp_set_quick_print() für eine Vollständie Beschreibung was quick_print bewirkt.


Ein BenutzerBeitrag:
- Beiträge aktualisieren...
antic
23.02.2003 14:13
This can be used to parse the returned values depending on the quick print setting. For example sysUpTime might look something like this: "Timeticks: (34575334) 4 days, 0:02:33.34", but if quick print is enabled it will be on the form: "4:0:2:33.34". To get the same output you can parse it differently, something like:

if(@ $sysUpTime = snmpget($switch,$community,"system.sysUpTime.0")){
    if(snmp_get_quick_print()){
       sscanf($sysUpTime, "%d:%d:%d:%d.%d",$day,$hour,$minute,$sec,$ticks);
        $sysUpTime = "$day days, $hour:$minute:$sec.$ticks";
    }else{
       $sysUpTime = ereg_replace("Timeticks: \([0-9]+\) ","",$sysUpTime);
   }
}



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",...)