capture: display exit stats at default verbosity

This patch updates capture modes not using LiveDecice counters
to display per-thread exit statistics with default verbosity.
pull/757/head
Eric Leblond 13 years ago committed by Victor Julien
parent a8c787a265
commit afbb2eb32b

@ -393,7 +393,7 @@ void ReceiveIPFWThreadExitStats(ThreadVars *tv, void *data)
SCEnter();
SCLogInfo("(%s) Packets %" PRIu32 ", bytes %" PRIu64 "", tv->name, ptv->pkts, ptv->bytes);
SCLogNotice("(%s) Packets %" PRIu32 ", bytes %" PRIu64 "", tv->name, ptv->pkts, ptv->bytes);
SCReturn;
}

@ -317,7 +317,7 @@ void NapatechStreamThreadExitStats(ThreadVars *tv, void *data)
if (ntv->drops > 0)
percent = (((double) ntv->drops) / (ntv->pkts+ntv->drops)) * 100;
SCLogInfo("Stream: %lu; Packets: %"PRIu64"; Drops: %"PRIu64" (%5.2f%%); Bytes: %"PRIu64, ntv->stream_id, ntv->pkts, ntv->drops, percent, ntv->bytes);
SCLogNotice("Stream: %lu; Packets: %"PRIu64"; Drops: %"PRIu64" (%5.2f%%); Bytes: %"PRIu64, ntv->stream_id, ntv->pkts, ntv->drops, percent, ntv->bytes);
}
/**

@ -1000,9 +1000,9 @@ void ReceiveNFQThreadExitStats(ThreadVars *tv, void *data) {
NFQThreadVars *ntv = (NFQThreadVars *)data;
NFQQueueVars *nq = NFQGetQueue(ntv->nfq_index);
#ifdef COUNTERS
SCLogInfo("(%s) Pkts %" PRIu32 ", Bytes %" PRIu64 ", Errors %" PRIu32 "",
SCLogNotice("(%s) Pkts %" PRIu32 ", Bytes %" PRIu64 ", Errors %" PRIu32 "",
tv->name, nq->pkts, nq->bytes, nq->errs);
SCLogInfo("Pkts accepted %"PRIu32", dropped %"PRIu32", replaced %"PRIu32,
SCLogNotice("Pkts accepted %"PRIu32", dropped %"PRIu32", replaced %"PRIu32,
nq->accepted, nq->dropped, nq->replaced);
#endif
}

@ -365,7 +365,7 @@ void ReceivePcapFileThreadExitStats(ThreadVars *tv, void *data) {
SCLogInfo("1/%" PRIu64 "th of packets have an invalid checksum",
chrate);
}
SCLogInfo("Pcap-file module read %" PRIu32 " packets, %" PRIu64 " bytes", ptv->pkts, ptv->bytes);
SCLogNotice("Pcap-file module read %" PRIu32 " packets, %" PRIu64 " bytes", ptv->pkts, ptv->bytes);
return;
}

Loading…
Cancel
Save