Sensor cache statistics logging

Prev Next

On the Database Security of version 4.4.7 or later, the sensor will periodically (hourly) log the cache usage statistics into a special file. This information can help to analyze resource usage of the sensor. The file contains these statistics about the sensor caches: rule cache, stored procedure cache, prepared statement cache, session per NIC, and the network session buffers.

The log entry contains this information in addition to the standard header details:

< MONITORING_COMPONENT>: <SUB_COMPONENT> <STATS_INFO>

The log contains these fields:

  • MONITORING_COMPONENT — NETWORK or MEMORY indicates the monitoring technology that the statistics info entry is related to.

  • SUB_COMPONENT — Depending on the stats info entry the following will be displayed:

    • DB instance name - Format: DB[<full_db_name>]

    • A network interface name - Format: NIC[<full_nic_name>]

    • GLOBAL - A global stats info entry not related to a specific network interface or DB instance

  • STATS_INFO — The logged statistics information.

Sample log messages:

Sat Jul 9 2022 20:42:19.349 T[2484] F[CacheStatisticsFileManager.cpp] L[120] NOTICE NETWORK: GLOBAL: Network Session Buffer: Global cache used[8192] out of [268435456] bytes,rate[~0%] : Global cache in limits: OK

Sat Jul 9 2022 20:42:19.349 T[2484] F[CacheStatisticsFileManager.cpp] L[120] NOTICE NETWORK: DB[myhost_SQL2012RTM_6049d7b3295c468a7b638d4ff2738352ab4c794a]: Stored Procedure Cache[maxSize[81920KB],load[0%]] Rule Cache[disable]

Sat Jul 9 2022 20:42:19.365 T[2484] F[CacheStatisticsFileManager.cpp] L[120] NOTICE MEMORY : DB[myhost_SQL2012RTM_6049d7b3295c468a7b638d4ff2738352ab4c794a]: Stored Procedure

Cache[maxSize[81920KB],load[22%],elements[2695],averElemSize[6881B],access[139],misCount[34],misRate[24%],hitCount[105],hitRate[75%],latest:[access[0]] Rule Cache[maxSize[52428800],used[80%],nodes[165],totalAccessCount[7261],totalHitCount[3730],totalHitRate[51%],totalMissCount[3531],totalMisRate[48%]]

Sat Jul 9 2022 20:42:19.381 T[2484] F[CacheStatisticsFileManager.cpp] L[120] NOTICE NETWORK: DB[myhost_SQL2012RTM_6049d7b3295c468a7b638d4ff2738352ab4c794a]: Prepared Statement Cache[maxSize[51200KB],load[0%],elements[32],averElemSize[1460B],access[0]]

Sat Jul 9 2022 20:42:19.343 T[2484] F[CacheStatisticsFileManager.cpp] L[120] NOTICE NETWORK: Nic[\Device\NPF_{EA4063F0-407E-46D7-A634-6A2A8502D1EC}(0.0.0.0)]: Number Of sessions[1]