2016-05-04 09:50:35 +03:00

10 lines
465 B
PHP

<?php
// Format of sysDescr is hardware model followed by version followed by build date
$tempstr = substr($poll_device['sysDescr'], 0, strrpos($poll_device['sysDescr'], ' '));
$version = trim(substr($tempstr, strrpos($tempstr, ' ')));
$hardware = trim(substr($tempstr, 0, strrpos($tempstr, ' ')));
// Serial number is in sysName after string "VCEX"
$serial = substr(snmp_get($device, 'sysName.0', '-OvQ', 'SNMPv2-MIB:HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB'), 4);