1LTTNG_HEALTH_CHECK(3)       LTTng Developer Manual       LTTNG_HEALTH_CHECK(3)
2
3
4

NAME

6       DEPRECATED
7
8       lttng_health_check - Monitor health of the session daemon
9

SYNOPSIS

11       #include <lttng/lttng.h>
12
13       int lttng_health_check(enum lttng_health_component c);
14
15       Link with -llttng-ctl.
16

DESCRIPTION

18       The lttng_health_check() is used to check the session daemon health for
19       either a specific component c or for all of them. Each component repre‐
20       sent  a subsystem of the session daemon.  Those components are set with
21       health counters that are atomically incremented once reached.  An  even
22       value  indicates  progress  in  the  execution of the component. An odd
23       value means that the code has entered a blocking state which is  not  a
24       poll(7) wait period.
25
26       A  bad  health is defined by a fatal error code path reached or any IPC
27       used in the session daemon that was blocked for more  than  20  seconds
28       (default timeout).  The condition for this bad health to be detected is
29       that one or many of the counters are odd.
30
31       The health check mechanism of the session daemon can  only  be  reached
32       through the health socket which is a different one from the command and
33       the application socket. An isolated thread serves this socket and  only
34       computes  the  health  counters across the code when asked by the lttng
35       control library (using this call). This subsystem is highly unlikely to
36       fail due to its simplicity.
37
38       The c argument can be one of the following values:
39
40       LTTNG_HEALTH_CMD
41              Command  subsystem  which  handles user commands coming from the
42              liblttng-ctl or the lttng(1) command line interface.
43
44       LTTNG_HEALTH_APP_MANAGE
45              The session daemon manages application socket in order to  route
46              client  command and check if they get closed which indicates the
47              application shutdown.
48
49       LTTNG_HEALTH_APP_REG
50              The application registration mechanism is an important and vital
51              part  of  for  user  space  tracing.  Upon startup, applications
52              instrumented with lttng-ust(3) try to register  to  the  session
53              daemon through this subsystem.
54
55       LTTNG_HEALTH_KERNEL
56              Monitor the Kernel tracer streams and main channel of communica‐
57              tion (/proc/lttng). If this component  malfunction,  the  Kernel
58              tracer is not usable anymore by lttng-tools.
59
60       LTTNG_HEALTH_CONSUMER
61              The  session  daemon  can  spawn up to three consumer daemon for
62              kernel, user space 32 and 64 bit. This  subsystem  monitors  the
63              consumer  daemon(s).  A  bad  health  state  means that the con‐
64              sumer(s) are not usable anymore hence likely making tracing  not
65              usable.
66
67       LTTNG_HEALTH_ALL
68              Check  all  components. If only one of them is in a bad state, a
69              health check error is returned.
70
71

RETURN VALUE

73       Return 0 if the health is OK, or 1 is it's in a  bad  state.  A  return
74       code  of  -1 indicates that the control library was not able to connect
75       to the session daemon health socket.
76
77

LIMITATIONS

79       For the LTTNG_HEALTH_CONSUMER, you can not know which  consumer  daemon
80       has  failed  but  only that either the consumer subsystem has failed or
81       that a lttng-consumerd died.
82
83

AUTHORS

85       lttng-health-check was originally written by David Goulet and  is  cur‐
86       rently   maintained   by   Jérémie  Galarneau  <jeremie.galarneau@effi‐
87       cios.com>.
88
89
90
91LTTng                             2012-09-19             LTTNG_HEALTH_CHECK(3)
Impressum