Hello, solves the problem of monitoring client devices and signals. Currently the script can get all MAC addresses from the registration table and assign the signal strength and I wonder if the same can be done to place macadres was radioname. Is this possible and especially please with no API.
This ensures a MAC to them by oid signal
{
$tx_bytes_snmp = snmpwalkoid($s['ip'], $s['community'], $s['oid']);
if (is_array($tx_bytes_snmp)){
while (list($indexOID,$rssi)= each($tx_bytes_snmp))
{
$i++;
$oidarray=explode(".",$indexOID);
$end_num=count($oidarray);
$mac="";
for ($counter=2;$counter<8;$counter++)
{
$temp=dechex($oidarray[$end_num-$counter]);
if ($oidarray[$end_num-$counter]<16) $temp="0".$temp;
if (($counter <5) and $mask_mac){
$mac=":"."xx".$mac;
}else{
if ($counter==7){$mac=$temp.$mac;}else{$mac=":".$temp.$mac;}
}
}
$mac_oiu = substr(str_replace(":","-",$mac),0,8);
$mac=strtoupper($mac);
$rssipom = $rssi; $rssipom = str_replace("INTEGER: ","",$rssipom);
$mac = str_replace(":","_",$mac);
if (file_exists($dir.$s['nazev'].'xx'.$mac.'.rrd') )
{
exec('rrdtool update '.$dir.$s['nazev'].'xx'.$mac.'.rrd N:'.$rssipom);
} else {
exec('rrdtool create '.$dir.$s['nazev'].'xx'.$mac.'.rrd --start now-60 --step 60 \
DS:upload:'.$s['rrd_type'].':120:U:U \
RRA:MAX:0.5:1:420 \
RRA:MAX:0.5:5:420 \
RRA:AVERAGE:0.5:5:420 \
RRA:MIN:0.5:5:420 \
RRA:MAX:0.5:30:432 \
RRA:AVERAGE:0.5:30:432 \
RRA:MIN:0.5:30:432 \
RRA:MAX:0.5:120:420 \
RRA:AVERAGE:0.5:120:420 \
RRA:MIN:0.5:120:420 \
RRA:MAX:0.5:1440:400 \
RRA:AVERAGE:0.5:1440:400 \
RRA:MIN:0.5:1440:400 ');
}
}}
}