Tests: Add missing test_utils_parse_size_suffix to unit tests
[lttng-tools.git] / doc / man / lttng-health-check.3
CommitLineData
2df048c2
DG
1.TH LTTNG_HEALTH_CHECK 3 2012-09-19 "LTTng" "LTTng Developer Manual"
2.SH NAME
3lttng_health_check \- Monitor health of the session daemon
4.SH SYNOPSIS
5.nf
6.B #include <lttng/lttng.h>
7.sp
8.BI "int lttng_health_check(enum lttng_health_component c);
9.fi
10
11Link with -llttng-ctl.
12.SH DESCRIPTION
13The
14.BR lttng_health_check ()
15is used to check the session daemon health for either a specific component
16.BR c
17or for all of them. Each component represent a subsystem of the session daemon.
18Those components are set with health counters that are atomically incremented
19once reached. An even value indicates progress in the execution of the
20component. An odd value means that the code has entered a blocking state which
21is not a poll(7) wait period.
22
23A bad health is defined by a fatal error code path reached or any IPC used in
24the session daemon that was blocked for more than 20 seconds (default timeout).
25The condition for this bad health to be detected is that one or many of the
26counters are odd.
27
28The health check mechanism of the session daemon can only be reached through
29the health socket which is a different one from the command and the application
30socket. An isolated thread serves this socket and only computes the health
31counters across the code when asked by the lttng control library (using this
32call). This subsystem is highly unlikely to fail due to its simplicity.
33
34The
35.BR c
36argument can be one of the following values:
37.TP
38.BR LTTNG_HEALTH_CMD
39Command subsystem which handles user commands coming from the liblttng-ctl or
40the
41.BR lttng(1)
42command line interface.
43.TP
44.BR LTTNG_HEALTH_APP_MANAGE
45The session daemon manages application socket in order to route client command
46and check if they get closed which indicates the application shutdown.
47.TP
48.BR LTTNG_HEALTH_APP_REG
49The application registration mechanism is an important and vital part of for
50user space tracing. Upon startup, applications instrumented with
51.BR lttng-ust(3)
52try to register to the session daemon through this subsystem.
53.TP
54.BR LTTNG_HEALTH_KERNEL
55Monitor the Kernel tracer streams and main channel of communication
56(/proc/lttng). If this component malfunction, the Kernel tracer is not usable
57anymore by lttng-tools.
58.TP
59.BR LTTNG_HEALTH_CONSUMER
60The session daemon can spawn up to
61.BR three
62consumer daemon for kernel, user space 32 and 64 bit. This subsystem monitors
63the consumer daemon(s). A bad health state means that the consumer(s) are not
64usable anymore hence likely making tracing not usable.
65.TP
66.BR LTTNG_HEALTH_ALL
67Check all components. If only one of them is in a bad state, a health check
68error is returned.
69
70.SH "RETURN VALUE"
71Return 0 if the health is OK, or 1 is it's in a bad state. A return code of \-1
72indicates that the control library was not able to connect to the session
73daemon health socket.
74
75.SH "LIMITATIONS"
76
77For the LTTNG_HEALTH_CONSUMER, you can not know which consumer daemon has
78failed but only that either the consumer subsystem has failed or that a
79lttng-consumerd died.
80
81.SH "AUTHORS"
82Written and maintained by David Goulet <dgoulet@efficios.com>.
This page took 0.031473 seconds and 5 git commands to generate.