mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 01:10:10 +00:00
Fixes missing flows on mysql after shutdown
This commit is contained in:
parent
e3e82c6dce
commit
706bbf8558
7 changed files with 32 additions and 13 deletions
|
|
@ -29,7 +29,8 @@ class MySQLDB : public DB {
|
|||
MYSQL mysql;
|
||||
bool db_operational;
|
||||
struct timeval lastUpdateTime;
|
||||
u_int32_t mysqlDroppedFlows;
|
||||
u_int32_t mysqlDroppedFlows, mysqlConsumerDroppedFlows;
|
||||
u_int32_t mysqlEnqueuedFlows;
|
||||
u_int64_t mysqlExportedFlows, mysqlLastExportedFlows;
|
||||
float mysqlExportRate;
|
||||
|
||||
|
|
@ -55,9 +56,9 @@ class MySQLDB : public DB {
|
|||
void checkPointCounters(bool drops_only) {
|
||||
if(!drops_only)
|
||||
checkpointExportedFlows = mysqlExportedFlows;
|
||||
checkpointDroppedFlows = mysqlDroppedFlows;
|
||||
checkpointDroppedFlows = mysqlDroppedFlows + mysqlConsumerDroppedFlows;
|
||||
};
|
||||
inline u_int32_t numDroppedFlows() const { return mysqlDroppedFlows; };
|
||||
inline u_int32_t numDroppedFlows() const { return mysqlDroppedFlows + mysqlConsumerDroppedFlows; };
|
||||
inline float exportRate() const { return mysqlExportRate; };
|
||||
static char *escapeAphostrophes(const char *unescaped);
|
||||
int flow2InsertValues(Flow *f, char *json, char *values_buf, size_t values_buf_len) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue