This commit is contained in:
laf
2015-10-26 11:08:19 +00:00
918 changed files with 32658 additions and 6792 deletions

View File

@@ -53,25 +53,21 @@ if ($device['os_group'] == 'cisco') {
$oid_rate = ($oid_diff / $polled_period);
$acc['update'][$oid_dir.'_rate'] = $oid_rate;
$acc['update'][$oid_dir.'_delta'] = $oid_diff;
if ($debug) {
echo "\n $oid_dir ($oid_diff B) $oid_rate Bps $polled_period secs\n";
}
d_echo("\n $oid_dir ($oid_diff B) $oid_rate Bps $polled_period secs\n");
}
}
}
if ($debug) {
echo "\n".$acc['hostname'].' '.$acc['ifDescr']." $mac -> $b_in:$b_out:$p_in:$p_out ";
}
d_echo("\n".$acc['hostname'].' '.$acc['ifDescr']." $mac -> $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: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']
);
}