]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
userguide: expand documentation for rule profiling
authorJuliana Fajardini <jufajardini@oisf.net>
Sat, 6 Jul 2024 20:28:09 +0000 (17:28 -0300)
committerVictor Julien <victor@inliniac.net>
Sat, 31 Aug 2024 08:53:55 +0000 (10:53 +0200)
The page about performance and rule profiling showed the table generated
by rules profiling but didn't inform how to achieve nor find it.

Task #4359

doc/userguide/configuration/suricata-yaml.rst
doc/userguide/performance/rule-profiling.rst
doc/userguide/rule-management/rule-profiling.rst

index ffc540585f1119a11710e5eb371bb9e4cd0f0d33..6908c804ed0ae99f2723415120c7a4b72840b081 100644 (file)
@@ -2631,6 +2631,9 @@ Example:
   Original content: abc
   Final content: bc
 
+
+.. _rule-and-packet-profiling-settings:
+
 Rule and Packet Profiling settings
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
index f05e8fb4e482795aa3d4f99c62957558506a007a..6a600a1cce023403cf5b4d4516b97814d22ffefb 100644 (file)
@@ -1,7 +1,20 @@
 Rule Profiling
 ==============
 
-::
+Suricata can generate a rules performance report at the end of each session, if
+built with the ``enable-profiling`` option (see configuring :ref:`Rule profiling
+<rule-and-packet-profiling-settings>`). With that option, the engine will also
+generate profiling data for other engine modules, such as packet processing.
+
+Rule profiling can also be enabled by building the engine with ``enable-profiling
+-rules`` and using the unix socket to dump the report (see
+:ref:`rule-management-rules-profiling`). This will enable profiling of rules'
+statistics only.
+
+Once the report is generated, it is stored in the default log directory used by
+Suricata. If not changed, the filename will be ``rule_perf.log``.
+
+A Rules Profile report looks like this: ::
 
   --------------------------------------------------------------------------
   Date: 9/5/2013 -- 14:59:58
@@ -21,13 +34,13 @@ Rule Profiling
 
 The meaning of the individual fields:
 
-* Ticks -- total ticks spent on this rule, so a sum of all inspections
-* % -- share of this single sig in the total cost of inspection
-* Checks -- number of times a signature was inspected
+* Ticks -- total ticks spent on this rule, so a sum of all inspections.
+* % -- share of this single signature in the total cost of inspection.
+* Checks -- number of times a signature was inspected.
 * Matches -- number of times it matched. This may not have resulted in an alert due to suppression and thresholding.
-* Max ticks -- single most expensive inspection
+* Max ticks -- single most expensive inspection.
 * Avg ticks -- per inspection average, so "ticks" / "checks".
-* Avg match -- avg ticks spent resulting in match
+* Avg match -- avg ticks spent resulting in match.
 * Avg No Match -- avg ticks spent resulting in no match.
 
 The "ticks" are CPU clock ticks: http://en.wikipedia.org/wiki/CPU_time
index 2c9926005c299696c62281cbd14462fbd006b83e..e751779936b00716760dd1b5c5119bee445a54e0 100644 (file)
@@ -1,3 +1,5 @@
+.. _rule-management-rules-profiling:
+
 Rules Profiling
 ===============