mirror of
https://github.com/ntop/ntopng.git
synced 2026-06-02 07:03:13 +00:00
Adds extra timing info for flow periodicHTStateUpdate
This commit is contained in:
parent
4f3a6dab85
commit
8db49f7268
2 changed files with 10 additions and 2 deletions
|
|
@ -2881,6 +2881,7 @@ void NetworkInterface::periodicHTStateUpdate(time_t deadline, lua_State* vm) {
|
|||
hasSeenVlanTaggedPackets() ? vlans_hash : NULL,
|
||||
macs_hash
|
||||
};
|
||||
time_t update_end;
|
||||
|
||||
periodicUpdateInitTime(&tv);
|
||||
periodic_ht_state_update_user_data.acle = NULL,
|
||||
|
|
@ -2903,8 +2904,14 @@ void NetworkInterface::periodicHTStateUpdate(time_t deadline, lua_State* vm) {
|
|||
}
|
||||
}
|
||||
|
||||
if(time(NULL) > deadline)
|
||||
ntop->getTrace()->traceEvent(TRACE_ERROR, "Deadline exceeded [%s][%s]", __FUNCTION__, get_name());
|
||||
if((update_end = time(NULL)) > deadline) {
|
||||
char date_buf[32];
|
||||
struct tm deadline_tm;
|
||||
|
||||
strftime(date_buf, sizeof(date_buf), "%H:%M:%S", localtime_r(&deadline, &deadline_tm));
|
||||
ntop->getTrace()->traceEvent(TRACE_ERROR, "Deadline exceeded [%s][%s][expected: %s][off by: %u secs]",
|
||||
__FUNCTION__, get_name(), date_buf, update_end - deadline);
|
||||
}
|
||||
}
|
||||
|
||||
/* **************************************************** */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue