Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland All rights reserved. See: https://github.com/opensolutions/OSS_SNMP/ This is an example script to show how to use OSS_SNMP. It requires two arguments: - the IP address of hostname of a SNMP capable host (with Asterisk SNMP enabled) - the SNMP v2 community string for that host For example: {$argv[0]} 192.168.10.20 public HELPTEXT; exit(1); } require_once dirname(__FILE__) . '/../OSS_SNMP/SNMP.php'; $host = new \OSS_SNMP\SNMP($argv[1], $argv[2]); echo "\nSystem information for {$argv[1]}:\n\n"; print_r($host->useSystem()->getAll()); echo "\n\n"; echo "\n\nPlatform details for {$argv[1]}:\n" . "\nVendor: " . $host->getPlatform()->getVendor() . "\nModel: " . $host->getPlatform()->getModel() . "\nOS: " . $host->getPlatform()->getOs() . "\nOS Version: " . $host->getPlatform()->getOsVersion(); echo "\n\n"; echo "Temperature alarm: " . ($host->useExtreme_System_Common()->overTemperatureAlarm() ? 'YES' : 'NO') . "\n"; echo "Temperature : " . $host->useExtreme_System_Common()->currentTemperature() . "C\n"; echo "\n\n"; print_r($host->useExtreme_SwMonitor_Memory()->percentUsage()); echo "\n\n"; exit(0);