diff options
| author | tongzongzhen <[email protected]> | 2024-04-18 16:22:56 +0800 |
|---|---|---|
| committer | tongzongzhen <[email protected]> | 2024-04-18 16:22:56 +0800 |
| commit | da470aef89ff01d435132bdee50fedede6dfab5a (patch) | |
| tree | eba1a3dbfe8cd0bce866949fd4133d37f5b653b2 /src/main.c | |
| parent | a9ab020ae7acdcef516e100c26633a16a179ad9d (diff) | |
add monit
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1,6 +1,7 @@ #include "common.h" #include "config.h" #include "maat.h" +#include "monit.h" #include "trace_output.h" #include <getopt.h> @@ -148,15 +149,15 @@ int main(int argc, char * argv[]) signal_event_init(); unsigned int nr_thread = CPU_COUNT(&conf->cpu_set_io); - - if (nr_thread != 4) + if (nr_thread < DP_TRACE_RING_NUM) { - dzlog_error("Currently, four threads must be created to read the data. This restriction will be removed " - "later"); + dzlog_error("The number of cores must be greater than %u", DP_TRACE_RING_NUM); return 0; } - dzlog_info("Thread Count = %d", nr_thread); + + monit_init(nr_thread); + pthread_t tmp_pid[nr_thread]; for (int i = 0; i < nr_thread; i++) |
