Presentation 1: Syslog-->Lttng Presentation 2: Event ...

33
Presentation 1: Syslog-->Lttng Presentation 2: Event Linking data structure Dec 10, 2013 École Polytechnique, Montreal Naser Ezzati Yannick Brosseau Michel Dagenais Department of Computer and Software Engineering

Transcript of Presentation 1: Syslog-->Lttng Presentation 2: Event ...

Page 1: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

Presentation 1: Syslog-->Lttng Presentation 2: Event Linking

data structure

Dec 10, 2013École Polytechnique, Montreal

Naser EzzatiYannick BrosseauMichel Dagenais

Department of Computer and Software Engineering

Page 2: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

2 Tracing and monitoring distributed multi-core systems

Syslog“Syslog is a standard for computer message logging. It permits separation of the software that generates messages from the system that stores them and the software that reports and analyzes them.”

sshd

apache snort

mail

crondnamed

Syslog

Terminal File Other machine

Page 3: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

3 Tracing and monitoring distributed multi-core systems

Syslog → Lttng● We hooked Syslog Daemon 

(by adding 3 tracepoints) to generate LTTng UST events.

● It makes possible to gather LTTng trace events from any application generating syslog entries, without modifying the original application.

sshd

apache snort

mail

crondnamed

Syslog

Terminal File Other machine

omLTTngUST

LTTng event

Page 4: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

4 Tracing and monitoring distributed multi-core systems

Demo1. Syslog   LTTng→

2. Snort   Syslog   LTTng→ →

3. PHP    Syslog   LTTng→ →sshd

apache snort

mail

crondnamed

Syslog

Terminal File Other machine

omLTTngUST

LTTng event

Page 5: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

5 Tracing and monitoring distributed multi-core systems

Event Linking data structure

Page 6: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

6 Tracing and monitoring distributed multi-core systems

Multi level information● We may have different layers of

trace information

● Linking the different layers enables a multi-resolution analysis of the system under study.

● In this presentation, we discuss about the data structure.

● And some real use-cases.

Page 7: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

7 Tracing and monitoring distributed multi-core systems

Integration with the State System● State system is a more

horizontal indexing structure.

● It indexes/links the same-level states of an attribute.

● However, we are looking for a vertical indexing system.

● To link the information from different layers.

● But the integration was a MUST.

State System: Horizontal Indexing

Linking data structure: Vertical Indexing

Page 8: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

8 Tracing and monitoring distributed multi-core systems

S-Link data structure● First approach:

● State system is used to store the abstract events– Each state system stores the 

events (intervals) of only one layer.

● For each event (interval) we keep a pointer to structure named S-Link.

Page 9: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

9 Tracing and monitoring distributed multi-core systems

S-Link and S-node 

● S-link is an array of the same size s-nodes

● Each s-node has k entries.

● The k+1 th entry is a pointer to another s-node.– Using this mechanism any

size of linking pointers is supported.

Page 10: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

10 Tracing and monitoring distributed multi-core systems

SHT2 key t1

DNS Connection

Socket create Socket Connect DNS Request DNS Response

SHT1 Interval

key DNS Connection

Ts Te

Pointer to s-node

sni

SHT2 key

key

key

SHT2

SHT2

ts

t2

te

ts t1 t2 te

Example 1: Hierarchy of events

sn0

We may also avoid storing the links to the “Obvious members”.

Page 11: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

11 Tracing and monitoring distributed multi-core systems

Sender

S­Node

sn0

SHT path time

Receiver

● Link the corresponding sending and receiving nodes (processes, etc).

● In this approach, the corresponding receiving node(s) will be stored in the s­link structure.

Example2: Send & Receive

p1

p2

p3

Page 12: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

12 Tracing and monitoring distributed multi-core systems

Example3: UST and Kernel Tracesvoid main() { ... f0 ( ); ...}void f0() { ... f1 ( ); ... f2 ( ); ...}

f0( )... ...

View 1

Function calls and kernel traces

First view

main()

Page 13: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

13 Tracing and monitoring distributed multi-core systems

UST and Kernel Traces

f1( ) f2( )

Void f0() { ... f1 ( ); ... f2 ( ); ...}

main() → f0( )

View 2

Second view

Page 14: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

14 Tracing and monitoring distributed multi-core systems

UST and Kernel TracesVoid f0() { ... f1 ( ); ... f2 ( ); ...}

main() → f0( ) → f1( ) main() → f0( ) →f2( )

View 3

open read

Page 15: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

15 Tracing and monitoring distributed multi-core systems

UST and Kernel Traces

f1( ) f2( )

Void f0() { ... f1 ( ); ... f2 ( ); ...}

open read

f0( )... ...

View 1

View 2

View 3

● One SHT for the each level● Query the kernel SHT, retrieve the 

corresponding system calls and show them with the functions together.

main() → f0( )

main() → f0( ) → f1( ) main() → f0( ) →f2( )

main()

Page 16: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

16 Tracing and monitoring distributed multi-core systems

First Approach Overview

The first approach stores everything● the events and the links.

Page 17: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

17 Tracing and monitoring distributed multi-core systems

Second Approach (Partial)

The second approach avoids storing everything! ● It only stores the important events.

Page 18: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

18 Tracing and monitoring distributed multi-core systems

Second Approach

● The first approach stores all events (of the all levels) and also the links between them.

● Second approach, however, avoids storing all events and tries to re­generate them dynamically, on the fly, in the visualization phase.● It stores the events of the highest level completely, but for the 

intermediate levels, it only stores some (but enough) snapshots.● It supports two abstraction types: Data Abstraction (events) and 

Visual Abstraction (labels and colors)– It uses both the labels and colors to encode the view

● It shows all levels in a single view using a zoom­able time­line view.

Page 19: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

19 Tracing and monitoring distributed multi-core systems

Highest Level (colors + labels)

Colors show the type of operations (File, Network, System, Wait, etc)

Page 20: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

20 Tracing and monitoring distributed multi-core systems

Structure

Each tree node stores one or more snapshots

Page 21: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

21 Tracing and monitoring distributed multi-core systems

Improvements

● The duration of a snapshot is set dynamically, based on the processing time required to generate the abstract events.

● At each snapshot, the important events from the previous checkpoint to the current one are stored.

● Dynamic trace abstraction is used to re­generate the events● At each level, label placement techniques are used to show the 

best set of events (labels).● Priority rendering, dynamic aggregation, remove repetitive items, … .

Page 22: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

22 Tracing and monitoring distributed multi-core systems

Algorithm To Fetch

● Traverse the tree to find the snapshots of the given query range.● output a list of labels of each level.

● Apply label placement techniques (remove duplications, perform dynamic aggregation, apply priority, etc.), and show the labels.

Page 23: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

23 Tracing and monitoring distributed multi-core systems

Example

socket connect poll sendto pollpoll rcv close

DNS Connection

Page 24: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

24 Tracing and monitoring distributed multi-core systems

Snapshots

socket connect poll sendto pollpoll rcv close

DNS Connection

socket send rcv

DNS connectionDNS connection

Page 25: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

25 Tracing and monitoring distributed multi-core systems

Snapshots

socket send rcv

DNS connection

Page 26: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

26 Tracing and monitoring distributed multi-core systems

The View (Level 1)

DNS Connection

generate this view from the snapshot structure

Config File Read wait DNS Connection

HTTP ConnectionDNS Connection

Page 27: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

27 Tracing and monitoring distributed multi-core systems

The View (Level 2)

socket send rcv

generate this view from the snapshot structure

DNS Connection DNS Connection

Page 28: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

28 Tracing and monitoring distributed multi-core systems

The View (Level 3)

socket connect poll sendto poll rcv close

generate this view from trace directly

DNS Connection DNS Connection

Page 29: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

29 Tracing and monitoring distributed multi-core systems

The View

socket connect poll sendto poll rcv

socket send rcv

DNS Connection

generate these two views from the snapshot structure

DNS Connection

HTTP Connection

socket

...

Page 30: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

30 Tracing and monitoring distributed multi-core systems

Disk File Format

Page 31: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

31 Tracing and monitoring distributed multi-core systems

Summary● A syslog plugin called omLTTngUST is presented. ● Linking data structure called  S­Link data structure and some 

real use­cases are presented.● Two approaches:

● As a plugin to the State System:

– that stores events and the links between them● A solution that does not store all events, and generates 

the abstract events dynamically in the visualization step, using some pre­stored important events.

Page 32: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

32 Tracing and monitoring distributed multi-core systems

Thank you.

                  Questions?

Page 33: Presentation 1: Syslog-->Lttng Presentation 2: Event ...

33 Tracing and monitoring distributed multi-core systems

Demo