- O_CLOEXEC undeclared error when compiling with glibc older than 2.12
- Image output --headertext wasn't being applied to some output types
- DefaultDecimals setting wasn't controlling all outputs
+ - Traffic rate for the last entry of the 5 minute resolution list wasn't
+ being correctly calculated
- New
- Detection of 32-bit / 64-bit kernel interface counters for improving
traffic calculations in rollover situations, cfg: 64bitInterfaceCounters
}
if (rxchange || txchange || cfg.trafficlessentries) {
- xferlog_add(&(*dc)->log, ifinfo.timestamp - (ifinfo.timestamp % 300), rxchange, txchange);
+ xferlog_add(&(*dc)->log, (*dc)->updated - ((*dc)->updated % 300), rxchange, txchange);
}
}
(*dc)->currx = ifinfo.rx;
} else if (listtype == 5) { // hour
e_secs = (uint64_t)(d->tm_sec + (d->tm_min * 60));
} else if (listtype == 6) { // 5min
- e_secs = 300;
+ if ((&interface->updated - ((uint64_t)&interface->updated % 300)) == (&datalist_i->timestamp - ((uint64_t)&datalist_i->timestamp % 300))) {
+ e_secs = (uint64_t)(d->tm_sec + (d->tm_min % 5 * 60));
+ } else {
+ e_secs = 300;
+ }
}
} else {
if (listtype == 1 || listtype == 4) { // day
} else if (listtype == 5) { // hour
e_secs = (uint64_t)(d->tm_sec + (d->tm_min * 60));
} else if (listtype == 6) { // 5min
- e_secs = 300;
+ if ((&ic->interface.updated - ((uint64_t)&ic->interface.updated % 300)) == (&datalist_i->timestamp - ((uint64_t)&datalist_i->timestamp % 300))) {
+ e_secs = (uint64_t)(d->tm_sec + (d->tm_min % 5 * 60));
+ } else {
+ e_secs = 300;
+ }
}
} else {
if (listtype == 1 || listtype == 4) { // day