Commit Graph

172 Commits (ab1268cfea91e5a7d7c98b5a907124358fe88300)

Author SHA1 Message Date
Victor Julien ab1268cfea stats: minor code cleanups 6 years ago
Victor Julien fb18a1655c eve.stats: warn that output might miss decoder-events 7 years ago
Victor Julien 0d86263efd eve.stats: make decoder event prefix configurable 7 years ago
Victor Julien 31f81429c2 stats: more accurate interval handling
In the stats loop sleep for a time period more closely matching
the stats.interval setting. Fix an off by one that would make
the loop wake up ~1 second early.

Bug #2716
7 years ago
Victor Julien 4f84672d7c stats: decoder/stream events as stats 7 years ago
Maurizio Abba 1bdf325a9a signal: use centralized pthread_sigmask for signals
according to its man page, sigprocmask has undefined behavior in
multithreaded environments. Instead of explictly blocking the handling
of SIGUSR2 in every thread, direct block handling SIGUSR2 before
creating the threads and enable again the handling of this signal
afterwards. In this way, only the main thread will be able to manage
this signal properly.
8 years ago
Victor Julien 895df9a6f6 mingw: fix use of undefined USR2 signal 8 years ago
Sascha Steinbiss d9c7f9bb17 stats: use unshortened interface names in counters 8 years ago
Victor Julien 52b39a41e0 stats: print alert count at shutdown
Bug #1855.
8 years ago
Victor Julien ab1200fbd7 compiler: more strict compiler warnings
Set flags by default:

    -Wmissing-prototypes
    -Wmissing-declarations
    -Wstrict-prototypes
    -Wwrite-strings
    -Wcast-align
    -Wbad-function-cast
    -Wformat-security
    -Wno-format-nonliteral
    -Wmissing-format-attribute
    -funsigned-char

Fix minor compiler warnings for these new flags on gcc and clang.
8 years ago
Eric Leblond f2d1e93e65 unix-socket: add auto mode
When running in live mode, the new default 'auto' value of
unix-command.enabled causes unix-command to be activated. This
will allow users of live capture to benefit from the feature and
result in no side effect for user running in offline capture.
9 years ago
Zachary Rasmor 68cfa009a0 Update thread creation and threads to use global thread names.
Thread name is now stored as a static string buffer,
string duplication and alloc/de-alloc is no longer required.
9 years ago
Victor Julien a42251d459 afl: add define to disable mgt threads
The inherent non-deterministic nature of the management threads
creates variable test cases.
9 years ago
Jason Ish da1dec6d65 counters: use some of the new macros in tests 9 years ago
Jason Ish 796dd5223b tests: no longer necessary to provide successful return code
1 pass, 0 is fail.
9 years ago
Jason Ish 52983bf314 tests: convert all test to return 0 on failure, 1 on success 9 years ago
Victor Julien a70ff19911 stats: fix unix socket crash
Reset counters_global_id at ctx destruction. In the unix socket
runmode the lack of this reset would cause the id's to increase with
each pcap, leading to an ever larger stats array.
9 years ago
Victor Julien acaf8a84e8 stats: fix dump-counters when no loggers are active 10 years ago
Victor Julien 14030239f8 unix-socket: restore dump-counters functionality
Create a eve.stats like output for dump-counters.
10 years ago
Victor Julien 6c30f7bdbb counters: fix thread stats delta logging
Just like with the global stats, store prev values. Fixes delta logging.
10 years ago
Victor Julien 21db5ee691 counters: reduce global usage 10 years ago
Victor Julien 07efec550d counters: use ptr to name instead of copy
All counters have hardcoded names, so copies are not needed.
10 years ago
Victor Julien 7e66c70507 counters: don't run if no counters have been registered 10 years ago
Victor Julien e48153c6b0 counters: make threads cleanup all memory 10 years ago
Victor Julien 81548ae3e8 counters: clean up global context 10 years ago
Victor Julien f05d0692ef counters: remove references to 'perf' counters 10 years ago
Victor Julien faef92f8da counters: remove last and now unused tm_name reference 10 years ago
Victor Julien 83f27ae2a5 counters: remove old unix socket json logic 10 years ago
Victor Julien 41ead6611a counters: minor internal API cleanups 10 years ago
Victor Julien d2a9ef2680 counters: rename unparsable SCPCAElem to StatsLocalCounter 10 years ago
Victor Julien 752f03e7a4 counters: remaining s/SCPerf/Stats/g 10 years ago
Victor Julien 4362d0a6e9 counters: s/SCPerfPrivateContext/StatsPrivateThreadContext/g 10 years ago
Victor Julien 628c3b1bc7 counters: s/SCPerfPublicContext/StatsPublicThreadContext/g 10 years ago
Victor Julien 7e70f136ec counters: various renames and cleanups 10 years ago
Victor Julien 30cce2bd29 counters: s/SCPerfCounterSetUI64/StatsSetUI64/g 10 years ago
Victor Julien 1c0b4ee0ae counters: s/SCPerfCounterIncr/StatsIncr/g 10 years ago
Victor Julien 8992275b0c counters: s/SCPerfCounterAddUI64/StatsAddUI64/g 10 years ago
Victor Julien 60d9eb6790 counters: clean up defines 10 years ago
Victor Julien 1ef786e7cb counters: rename register API calls
Also remove 'type' parameter which was always the same.
10 years ago
Victor Julien 23f17950bc counters: pass per thread stats to output api
As well as the global (merged) stats.
10 years ago
Victor Julien de82b6d31e counters: rename widely used pctmi var to sts (stats thread store) 10 years ago
Victor Julien 60c5ad4649 counters: call global counters funcs 10 years ago
Victor Julien 33756abd87 counters: split API init
Split into early ctx initialization and post-config setup.
10 years ago
Victor Julien d05eed3735 counters: start using Stats prefix 10 years ago
Victor Julien f300ad253e counters: simplify and speedup counters sync 10 years ago
Victor Julien 0478407833 counters: remove threadvars arg from SCPerfAddToClubbedTMTable 10 years ago
Victor Julien 2346a88db7 counters: remove thread module name from counters API 10 years ago
Victor Julien 06461e37da counters: global counters registration 10 years ago
Victor Julien b293a4b7d0 counters: remove unused description 10 years ago
Victor Julien 711cd7b59b counters: merge counters from threads for output
Merge counters so the table contains combined values from counters
from each thread.

Use global counter id's, track them in a hash.

Rename SCPCAElem members

Fix and improve average counters
10 years ago