summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authortongzongzhen <[email protected]>2024-04-18 16:22:56 +0800
committertongzongzhen <[email protected]>2024-04-18 16:22:56 +0800
commitda470aef89ff01d435132bdee50fedede6dfab5a (patch)
treeeba1a3dbfe8cd0bce866949fd4133d37f5b653b2 /src/main.c
parenta9ab020ae7acdcef516e100c26633a16a179ad9d (diff)
add monit
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 4fae839..af1f978 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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++)