X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-consumerd%2Flttng-consumerd.c;h=e33a470f59268e6c3f33f09c72e506930ae859fd;hp=59397594b914c2c99533ff408d77d9c824c08034;hb=1fc79fb475198741b09a13b5397f018dff4b1aec;hpb=f385ae0a8f5c34cc33ca57cdb412393f90f9c0a8 diff --git a/src/bin/lttng-consumerd/lttng-consumerd.c b/src/bin/lttng-consumerd/lttng-consumerd.c index 59397594b..e33a470f5 100644 --- a/src/bin/lttng-consumerd/lttng-consumerd.c +++ b/src/bin/lttng-consumerd/lttng-consumerd.c @@ -49,6 +49,7 @@ #include #include "lttng-consumerd.h" +#include "health-consumerd.h" /* TODO : support UST (all direct kernel-ctl accesses). */ @@ -72,6 +73,9 @@ static enum lttng_consumer_type opt_type = LTTNG_CONSUMER_KERNEL; /* the liblttngconsumerd context */ static struct lttng_consumer_local_data *ctx; +/* Consumerd health monitoring */ +struct health_app *health_consumerd; + /* * Signal handler for the daemon */ @@ -325,6 +329,11 @@ int main(int argc, char **argv) set_ulimit(); } + health_consumerd = health_app_create(NR_HEALTH_CONSUMERD_TYPES); + if (!health_consumerd) { + goto error; + } + /* create the consumer instance with and assign the callbacks */ ctx = lttng_consumer_create(opt_type, lttng_consumer_read_subbuffer, NULL, lttng_consumer_on_recv_stream, NULL); @@ -469,6 +478,9 @@ error: end: lttng_consumer_destroy(ctx); lttng_consumer_cleanup(); + if (health_consumerd) { + health_app_destroy(health_consumerd); + } return ret; }