Re: PHP and SNMP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do you get any response with SNMPGET or SNMPWALK from the
command line? If so, your scripts should look similar to these.  
Post your script is you can't get it to work.

<?php
$test=`snmpget -c $community $host system.sysName.0`;
print($test);
?>

<?php
print(`snmpwalk -c $community $host iso`);
?>

Leonard

>>> this_is_root@xxxxxxxxxxx 03/16/03 11:23PM >>>
Hi,
this is my php, snmp list

[root@xxx root]# rpm -qa | grep snmp
php-snmp-4.2.2-8.0.7
net-snmp-utils-5.0.1-6
net-snmp-5.0.1-6

[root@xxx root]# rpm -qa | grep php
php-ldap-4.2.2-8.0.7
php-snmp-4.2.2-8.0.7
php-pgsql-4.2.2-8.0.7
php-4.2.2-8.0.7
php-odbc-4.2.2-8.0.7
php-imap-4.2.2-8.0.7
php-mysql-4.2.2-8.0.7
[root@xxx root]#

But i cant use the snmpget() function in php, this is
the output of snmpget().

Warning: Invalid object identifier:
system.SysContact.0 in /var/www/html/php/snmp/snmp.php
on line 3
any idea why ?

--sanjeewa.



-- 
Psyche-list mailing list
Psyche-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux