2 * Copyright (C) 2012 - Christian Babeux <christian.babeux@efficios.com>
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License, version 2 only, as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 51
15 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #include "lttng/lttng.h"
22 #define HEALTH_CMD_FAIL (1 << 0)
23 #define HEALTH_APP_MNG_FAIL (1 << 1)
24 #define HEALTH_APP_REG_FAIL (1 << 2)
25 #define HEALTH_KERNEL_FAIL (1 << 3)
26 #define HEALTH_CSMR_FAIL (1 << 4)
28 int main(int argc
, char *argv
[])
34 health
= lttng_health_check(LTTNG_HEALTH_CMD
);
35 printf("Health check cmd: %d\n", health
);
38 status
|= HEALTH_CMD_FAIL
;
41 /* App manage thread */
42 health
= lttng_health_check(LTTNG_HEALTH_APP_MANAGE
);
43 printf("Health check app. manage: %d\n", health
);
46 status
|= HEALTH_APP_MNG_FAIL
;
48 /* App registration thread */
49 health
= lttng_health_check(LTTNG_HEALTH_APP_REG
);
50 printf("Health check app. registration: %d\n", health
);
53 status
|= HEALTH_APP_REG_FAIL
;
57 health
= lttng_health_check(LTTNG_HEALTH_KERNEL
);
58 printf("Health check kernel: %d\n", health
);
61 status
|= HEALTH_KERNEL_FAIL
;
65 health
= lttng_health_check(LTTNG_HEALTH_CONSUMER
);
66 printf("Health check consumer: %d\n", health
);
69 status
|= HEALTH_CSMR_FAIL
;
This page took 0.030424 seconds and 4 git commands to generate.