$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 \ 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 ($acc['update']) { /// Do Updates print_r($acc['update']); 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"); ?>