class Smartax extends OS implements ProcessorDiscovery { /** * Discover processors. * Returns an array of LibreNMS\Device\Processor objects that have been discovered * * @return array Processors */ public function discoverProcessors() { $data = snmpwalk_group($this->getDevice(), 'enterprises.2011.2.6.7.1.1.2.1.5.0', ' SNMPv2-SMI'); //$proc_descr = snmpwalk_group($this->getDevice(), '1.3.6.1.4.1.2011.2.6.7.1.1.2.1.7.0'); $processors = array(); $count = 1; foreach ($data as $index => $entry) { if ($entry != -1) { $processors[] = Processor::discover( "smartax", $this->getDeviceId(), "enterprises.2011.2.6.7.1.1.2.1.5.0.$count", $count, "Unit $count processor", 1, $entry ); } $count++; } return $processors; } }