suricata
log-stats.c File Reference
#include "suricata-common.h"
#include "debug.h"
#include "detect.h"
#include "pkt-var.h"
#include "conf.h"
#include "threads.h"
#include "threadvars.h"
#include "tm-threads.h"
#include "util-print.h"
#include "util-unittest.h"
#include "util-debug.h"
#include "output.h"
#include "log-stats.h"
#include "util-privs.h"
#include "util-buffer.h"
#include "util-logopenfile.h"
#include "util-time.h"
Include dependency graph for log-stats.c:

Go to the source code of this file.

Data Structures

struct  LogStatsFileCtx_
 
struct  LogStatsLogThread_
 

Macros

#define DEFAULT_LOG_FILENAME   "stats.log"
 
#define MODULE_NAME   "LogStatsLog"
 
#define OUTPUT_BUFFER_SIZE   16384
 
#define LOG_STATS_TOTALS   (1<<0)
 
#define LOG_STATS_THREADS   (1<<1)
 
#define LOG_STATS_NULLS   (1<<2)
 

Typedefs

typedef struct LogStatsFileCtx_ LogStatsFileCtx
 
typedef struct LogStatsLogThread_ LogStatsLogThread
 

Functions

TmEcode LogStatsLogThreadInit (ThreadVars *, const void *, void **)
 
TmEcode LogStatsLogThreadDeinit (ThreadVars *, void *)
 
void LogStatsLogRegister (void)
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Definition in file log-stats.c.

Macro Definition Documentation

#define DEFAULT_LOG_FILENAME   "stats.log"

Definition at line 48 of file log-stats.c.

Referenced by LogStatsLogThreadDeinit().

#define LOG_STATS_NULLS   (1<<2)

Definition at line 54 of file log-stats.c.

Referenced by LogStatsLogThreadDeinit().

#define LOG_STATS_THREADS   (1<<1)

Definition at line 53 of file log-stats.c.

Referenced by LogStatsLogThreadDeinit().

#define LOG_STATS_TOTALS   (1<<0)

Definition at line 52 of file log-stats.c.

Referenced by LogStatsLogThreadDeinit().

#define MODULE_NAME   "LogStatsLog"

Definition at line 49 of file log-stats.c.

Referenced by LogStatsLogRegister().

#define OUTPUT_BUFFER_SIZE   16384

Definition at line 50 of file log-stats.c.

Referenced by LogStatsLogThreadInit().

Typedef Documentation

Function Documentation

void LogStatsLogRegister ( void  )

Definition at line 290 of file log-stats.c.

References LOGGER_STATS, LogStatsLogThreadDeinit(), LogStatsLogThreadInit(), MODULE_NAME, and OutputRegisterStatsModule().

Referenced by OutputRegisterLoggers().

Here is the call graph for this function:

Here is the caller graph for this function:

TmEcode LogStatsLogThreadInit ( ThreadVars t,
const void *  initdata,
void **  data 
)

Definition at line 167 of file log-stats.c.

References LogStatsLogThread_::buffer, MemBufferCreateNew(), OUTPUT_BUFFER_SIZE, SCFree, SCLogDebug, SCMalloc, LogStatsLogThread_::statslog_ctx, TM_ECODE_FAILED, TM_ECODE_OK, and unlikely.

Referenced by LogStatsLogRegister().

Here is the call graph for this function:

Here is the caller graph for this function: