]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stats: Memcap pressure max relocation
authorJeff Lucovsky <jlucovsky@oisf.net>
Sun, 24 Mar 2024 12:22:34 +0000 (08:22 -0400)
committerVictor Julien <victor@inliniac.net>
Sat, 13 Apr 2024 06:50:20 +0000 (08:50 +0200)
This commit moves the memcap pressure/pressure_max stats from the global
stats namespace into the memcap namespace.

With per-thread stats, they will be within the flow-manager's values.

Issue: 6398

etc/schema.json
src/flow-manager.c

index 15f148e4f6a2d215d8d681756d0527ff5d4269c4..a90630d1644fa364dd8e45cd343bdf279cb64660 100644 (file)
                         }
                     }
                 },
-                "memcap_pressure": {
-                    "description":
-                            "Percentage of memcaps used by flow, stream, stream-reassembly and app-layer-http",
-                    "type": "integer"
-                },
-                "memcap_pressure_max": {
-                    "description": "Maximum memcap_pressure seen by the engine",
-                    "type": "integer"
-                },
                 "app_layer": {
                     "type": "object",
                     "properties": {
                     },
                     "additionalProperties": false
                 },
+                "memcap": {
+                    "type": "object",
+                    "properties": {
+                        "pressure": {
+                            "description":
+                                    "Percentage of memcaps used by flow, stream, stream-reassembly and app-layer-http",
+                            "type": "integer"
+                        },
+                        "pressure_max": {
+                            "description": "Maximum pressure seen by the engine",
+                            "type": "integer"
+                        }
+                    },
+                    "additionalProperties": false
+                },
                 "ftp": {
                     "type": "object",
                     "properties": {
index bcc1498c8bd880c6f5e639bb08b7a87d4d4a207e..279910cb85babaebce0438a56710a309d8105746 100644 (file)
@@ -654,8 +654,8 @@ static void FlowCountersInit(ThreadVars *t, FlowCounters *fc)
     fc->flow_bypassed_pkts = StatsRegisterCounter("flow_bypassed.pkts", t);
     fc->flow_bypassed_bytes = StatsRegisterCounter("flow_bypassed.bytes", t);
 
-    fc->memcap_pressure = StatsRegisterCounter("memcap_pressure", t);
-    fc->memcap_pressure_max = StatsRegisterMaxCounter("memcap_pressure_max", t);
+    fc->memcap_pressure = StatsRegisterCounter("memcap.pressure", t);
+    fc->memcap_pressure_max = StatsRegisterMaxCounter("memcap.pressure_max", t);
 }
 
 static void FlowCountersUpdate(