$b_in:$b_out:$p_in:$p_out ");} $rrdfile = $host_rrd . "/" . safename("cip-" . $acc['ifIndex'] . "-" . $acc['mac'] . ".rrd"); if(!is_file($rrdfile)) { $woo = shell_exec($config['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 \ RRA:AVERAGE:0.5:1:600 \ RRA:AVERAGE:0.5:6:700 \ RRA:AVERAGE:0.5:24:775 \ RRA:AVERAGE:0.5:288:797 \ RRA:MAX:0.5:1:600 \ RRA:MAX:0.5:6:700 \ RRA:MAX:0.5:24:775 \ RRA:MAX:0.5:288:797"); } $woo = "N:".($b_in+0).":".($b_out+0).":".($p_in+0).":".($p_out+0); $ret = rrdtool_update("$rrdfile", $woo); if ($update) { /// Do Updates $update_query = "UPDATE `mac_accounting` SET ".$update." WHERE `ma_id` = '" . $acc['ma_id'] . "'"; @mysql_query($update_query); $mysql++; if($debug) {echo("\nMYSQL : [ $update_query ]");} } /// End Updates unset($update_query); unset($update); } } unset($cip_array); if($mac_entries) { echo(" $mac_entries MAC accounting entries\n"); } echo("\n"); ?>