snmpwalk

snmpwalk -- Fetch all the SNMP objects from an agent

Description

int snmpwalk(int hostname, string community, string object_id);

Returns an array of SNMP object values starting from the object_id as root and false on error.

snmpwalk() function is used to read all the values from an SNMP agent specified by the hostname. Community specifies the read community for that agent. A null object_id is taken as the root of the SNMP objects tree and all objects under that tree are returned as an array. If object_id is specified, all the SNMP objects below that object_id are returned.

 
$a = snmpwalk("127.0.0.1", "public", ""); 
        

Above function call would return all the SNMP objects from the SNMP agent running on localhost. One can step through the values with a loop

for($i=0; $i<count($a); $i++) {
	echo $a[$i];
}
        




月光软件程序下载编程文档电脑教程网站设计网址导航网络文学游戏天地幽默笑话生活休闲写作范文安妮宝贝
电脑技术编程开发网络专区谈天说地情感世界游戏元素分类游戏热门游戏体育运动手机专区业余爱好影视沙龙
音乐天地数码广场教育园地科学大观古今纵横谈股论金人文艺术医学保健动漫图酷二手专区地方风情各行各业

月光软件站·版权所有