$b_in:$b_out:$p_in:$p_out "); } $rrdfile = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("cip-" . $acc['ifIndex'] . "-" . $acc['mac'] . ".rrd"); if (!is_file($rrdfile)) { rrdtool_create($rrdfile,"DS:IN:COUNTER:600:0:12500000000 \ DS:OUT:COUNTER:600:0:12500000000 \ DS:PIN:COUNTER:600:0:12500000000 \ DS:POUT:COUNTER:600:0:12500000000 " . $config['rrd_rra']); } // FIXME - use memcached to make sure these values don't go backwards? $rrdupdate = array($b_in, $b_out, $p_in, $p_out); rrdtool_update($rrdfile, $rrdupdate); if ($acc['update']) { // Do Updates dbUpdate($acc['update'], 'mac_accounting', '`ma_id` = ?', array($acc['ma_id'])); } // End Updates } } unset($cip_array); if ($mac_entries) { echo(" $mac_entries MAC accounting entries\n"); } echo("\n"); } ?>