+
+int main(int argc, char *argv[])
+{
+ int status = 0, i;
+
+ for (i = 1; i < argc; i++) {
+ size_t relayd_path_arg_len = strlen("--relayd-path=");
+ if (!strncmp(argv[i], "--relayd-path=",
+ relayd_path_arg_len)) {
+ relayd_path = &argv[i][relayd_path_arg_len];
+ } else {
+ fprintf(stderr, "Unknown option \"%s\". Try --relayd-path=PATH.\n", argv[i]);
+ exit(EXIT_FAILURE);
+ }
+ }
+
+ status |= check_sessiond();
+ for (i = 0; i < NR_LTTNG_HEALTH_CONSUMERD; i++) {
+ status |= check_consumerd(i);
+ }
+ if (relayd_path) {
+ status |= check_relayd(relayd_path);
+ }
+ if (!status) {
+ exit(EXIT_SUCCESS);
+ } else {
+ exit(EXIT_FAILURE);
+ }
+}