PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

snmp_get_valueretrieval> <SNMP Functions
Last updated: Fri, 22 Aug 2008

view this page in

snmp_get_quick_print

(PHP 4, PHP 5)

snmp_get_quick_printVa a buscar el valor actual de la biblioteca UCD estableciendo quick_print

Descripción

boolean snmp_get_quick_print ( void $ )

Delvuele el valor actual almacenado en la biblioteca UCD para quick_print. quick_print está desactivado por defecto.

$quickprint = snmp_get_quick_print();

La llamada a la función superior podría devolver FALSE si quick_print está activo, y TRUE si quick_print está activo.

snmp_get_quick_print() está solamente disponible cuando estemos usando la biblioteca UCD SNMP. Esta función no está disponible cuando estemos usando la biblioteca Windows SNMP.

Ver: snmp_get_quick_print() para una descripción completa de lo que hace quick_print.



add a note add a note User Contributed Notes
snmp_get_quick_print
antic
23-Feb-2003 02: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);
   }
}

snmp_get_valueretrieval> <SNMP Functions
Last updated: Fri, 22 Aug 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites