User's Guide
Reference Manual
Release Notes
PDF
Top

Event Tracer (ET)
Reference Manual
Version 1.5.1

Expand All
Contract All

Table of Contents

- et
  - Top of manual page
  - trace_me/5
  - trace_me/4
  - phone_home/4
  - phone_home/5
  - report_event/4
  - report_event/5
- et_collector
  - Top of manual page
  - start_link/1
  - stop/1
  - save_event_file/3
  - load_event_file/2
  - report/2
  - report_event/5
  - report_event/6
  - make_key/2
  - get_table_handle/1
  - get_global_pid/0
  - change_pattern/2
  - dict_insert/3
  - dict_insert/3
  - dict_insert/3
  - dict_lookup/2
  - dict_delete/2
  - dict_match/2
  - multicast/2
  - start_trace_client/3
  - iterate/3
  - iterate/5
  - clear_table/1
- et_selector
  - Top of manual page
  - make_pattern/1
  - change_pattern/1
  - parse_event/2
- et_viewer
  - Top of manual page
  - file/1
  - start/0
  - start/1
  - start_link/1
  - get_collector_pid/1
  - stop/1

# et_viewer

### MODULE

et_viewer

### MODULE SUMMARY

Displays a sequence chart for trace events (messages/actions)

### DESCRIPTION

### EXPORTS

file(FileName) -> {ok, ViewerPid} | {error, Reason}

Types:

FileName() = string()
ViewerPid = pid()
Reason = term()

Start a new event viewer and a corresponding collector and load them with trace events from a trace file.

start() -> ok

Simplified start of a sequence chart viewer with global tracing activated.

Convenient to be used from the command line (erl -s et_viewer).

start(Options) -> ok

Start of a sequence chart viewer without linking to the parent process.

start_link(Options) -> {ok, ViewerPid} | {error, Reason}

Types:

Options = [option() | collector_option()]
option() = {parent_pid, extended_pid()} | {title, term()} | {detail_level, detail_level()} | {is_suspended, boolean()} | {scale, integer()} | {width, integer()} | {height, integer()} | {collector_pid, extended_pid()} | {event_order, event_order()} | {active_filter, atom()} | {max_actors, extended_integer()} | {trace_pattern, et_collector_trace_pattern()} | {trace_port, et_collector_trace_port()} | {trace_global, et_collector_trace_global()} | {trace_client, et_collector_trace_client()} | {dict_insert, {filter, filter_name()}, event_filter_fun()} | {dict_insert, et_collector_dict_key(), et_collector_dict_val()} | {dict_delete, {filter, filter_name()}} | {dict_delete, et_collector_dict_key()} | {actors, actors()} | {first_event, first_key()} | {hide_unknown, boolean()} | {hide_actions, boolean()} | {display_mode, display_mode()}
extended_pid() = pid() | undefined
detail_level() = min | max | integer(X) when X >=0, X =< 100
event_order() = trace_ts | event_ts
extended_integer() = integer() | infinity
display_mode() = all | {search_actors, direction(), first_key(), actors()}
direction() = forward | reverse
first_key() = event_key()
actors() = [term()]
filter_name() = atom()
filter_fun() = fun(Event) -> false | true | {true, NewEvent}
Event = NewEvent = record(event)
ViewerPid = pid()
Reason = term()

Start a sequence chart viewer for trace events (messages/actions)

A filter_fun() takes an event record as sole argument and returns false | true | {true, NewEvent}.

If the collector_pid is undefined a new et_collector will be started with the following parameter settings: parent_pid, event_order, trace_global, trace_pattern, trace_port, trace_max_queue, trace_client, dict_insert and dict_delete. The new et_viewer will register itself as an et_collector subscriber.

Default values:

- parent_pid - self().
- title - "et_viewer".
- detail_level - max.
- is_suspended - false.
- scale - 2.
- width - 800.
- height - 600.
- collector_pid - undefined.
- event_order - trace_ts.
- active_filter - collector.
- max_actors - 5.
- actors - ["UNKNOWN"].
- first_event - first.
- hide_unknown - false.
- hide_actions - false.
- display_mode - all.

get_collector_pid(ViewerPid) -> CollectorPid

Types:

ViewerPid = pid()
CollectorPid = pid()

Returns the identifier of the collector process.

stop(ViewerPid) -> ok

Types:

ViewerPid = pid()

Stops a viewer process.