Documentation Center

Monitoring events live as they arrive using LTTng

Use the lttng command line tool to monitor events as they arrive.

Procedure

  1. Ensure that the microservice you wish to trace is not running.
  2. On a Unix command line prompt, create a live tracing session by entering the following command:
    lttng create --live
  3. Enable Log4j logging with the following command:
    lttng enable-event -a -l
  4. Start the tracing session with the following command:
    lttng start
  5. Start the microservice.
  6. To see incoming events live, enter the following command:
    lttng view

Results

LTTng starts receiving events as they arrive with a one-second interval by default. Refer to http://lttng.org/docs/#doc-lttng-live for more information about supported live logging options, including the monitoring of a remote microservice.