]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: suppress noisy messages 5346/head
authorVictor Julien <victor@inliniac.net>
Mon, 31 Aug 2020 13:00:28 +0000 (15:00 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 1 Sep 2020 06:08:28 +0000 (08:08 +0200)
src/flow-manager.c
src/flow.c

index eacf7fe3fedf515e40b5ac9cf32aa7081bf392c4..593167092b1dd0e4ff19ce8b0301009de1f7e47d 100644 (file)
@@ -802,8 +802,8 @@ static TmEcode FlowManager(ThreadVars *th_v, void *thread_data)
             return TM_ECODE_OK;
     }
 
-    SCLogNotice("FM %s/%d starting. min_timeout %us. Full hash pass in %us",
-            th_v->name, ftd->instance, min_timeout, pass_in_sec);
+    SCLogDebug("FM %s/%d starting. min_timeout %us. Full hash pass in %us", th_v->name,
+            ftd->instance, min_timeout, pass_in_sec);
 
 #ifdef FM_PROFILE
     struct timeval endts;
@@ -1295,8 +1295,12 @@ void FlowDisableFlowRecyclerThread(void)
     int cnt = 0;
 
     /* move all flows still in the hash to the recycler queue */
+#ifndef DEBUG
+    (void)FlowCleanupHash();
+#else
     uint32_t flows = FlowCleanupHash();
-    SCLogNotice("flows to progress: %u", flows);
+    SCLogDebug("flows to progress: %u", flows);
+#endif
 
     /* make sure all flows are processed */
     do {
index 42c6fb8b93e681249b7370142c22d09838923103..14b32f4cc264292cf1ac284ed6b2a550447f72fa 100644 (file)
@@ -537,7 +537,8 @@ void FlowInitConfig(char quiet)
         if (val <= 100 && val >= 1) {
             flow_config.emergency_recovery = (uint8_t)val;
         } else {
-            SCLogError(SC_ERR_INVALID_VALUE, "flow.emergency-recovery must be in the range of 1 and 100 (as percentage)");
+            SCLogError(SC_ERR_INVALID_VALUE, "flow.emergency-recovery must be in the range of "
+                                             "1 and 100 (as percentage)");
             flow_config.emergency_recovery = FLOW_DEFAULT_EMERGENCY_RECOVERY;
         }
     } else {
@@ -550,7 +551,7 @@ void FlowInitConfig(char quiet)
     uint32_t configval = 0;
 
     /** set config values for memcap, prealloc and hash_size */
-    uint64_t flow_memcap_copy;
+    uint64_t flow_memcap_copy = 0;
     if ((ConfGet("flow.memcap", &conf_val)) == 1)
     {
         if (conf_val == NULL) {
@@ -632,7 +633,9 @@ void FlowInitConfig(char quiet)
     FlowInitFlowProto();
 
     uint32_t sz = sizeof(Flow) + FlowStorageSize();
-    SCLogNotice("flow size %u, memcap allows for %"PRIu64" flows. Per hash row in perfect conditions %"PRIu64, sz, flow_memcap_copy/sz, (flow_memcap_copy/sz)/flow_config.hash_size);
+    SCLogConfig("flow size %u, memcap allows for %" PRIu64 " flows. Per hash row in perfect "
+                "conditions %" PRIu64,
+            sz, flow_memcap_copy / sz, (flow_memcap_copy / sz) / flow_config.hash_size);
     return;
 }