traffic calculations in rollover situations, cfg: 64bitInterfaceCounters
- Possibility for queries to merge data from multiple interfaces to one
output with interface1+interface2 syntax
+ - Highlight current day in top list when visible
2.1 / 6-Dec-2018
int32_t limit;
int listtype, offset = 0, i = 1;
struct tm *d;
+ time_t current;
char datebuff[DATEBUFFLEN], daybuff[DATEBUFFLEN];
char titlename[16], colname[8], stampformat[64];
uint64_t e_rx, e_tx, e_secs, div, mult;
} else {
snprintf(titlename, 16, "top %d", limit);
}
+ current = time(NULL);
+ d = localtime(¤t);
+ strftime(daybuff, DATEBUFFLEN, stampformat, d);
}
printf("\n");
}
if (listtype == 4) {
- printf(" %2d ", i);
+ if (strcmp(daybuff, datebuff) == 0) {
+ printf("> %2d ", i);
+ } else {
+ printf(" %2d ", i);
+ }
}
if (strlen(datebuff)<=9 && listtype != 4) {
char buffer[512], datebuff[16], daybuff[16];
char stampformat[64], titlename[16], colname[8];
struct tm *d;
+ time_t current;
dbdatalist *datalist = NULL, *datalist_i = NULL;
dbdatalistinfo datainfo;
if (cfg.ostyle<=2) {
drawlegend(ic, 398, 40-headermod);
}
+ current = time(NULL);
+ d = localtime(¤t);
+ strftime(daybuff, 16, stampformat, d);
} else { // everything else
if (cfg.ostyle>2) {
drawlegend(ic, 432, 40-headermod);
} else {
snprintf(buffer, 32, " %2d %-*s ", i, getpadding(11, datebuff), datebuff);
}
+ if (strcmp(datebuff, daybuff) == 0) {
+ if (cfg.ostyle > 2) {
+ gdImageFilledRectangle(ic->im, textx+2, texty+2, textx+422, texty+12, ic->cbgoffset);
+ } else {
+ gdImageFilledRectangle(ic->im, textx+2, texty+2, textx+326, texty+12, ic->cbgoffset);
+ }
+ }
} else {
if (strftime(datebuff, 16, stampformat, d)<=8) {
snprintf(buffer, 32, " %*s", getpadding(8, datebuff), datebuff);