Difference between revisions of "VPP/g2"

From fd.io
< VPP
Jump to: navigation, search
m (Screen Taxonomy)
m (Mouse Gestures)
Line 70: Line 70:
  
 
[[File:G24.jpg|g2 example]]
 
[[File:G24.jpg|g2 example]]
 +
 +
==== Time Ruler ====
 +
 +
To use a time ruler, press and hold the right mouse button; drag right or left until the ruler measures the region of interest. If the time axis scale is coarse, event boxes can have significant width in time, so use a "reference point" in each event box when using the time ruler.
 +
 +
[[File:G25.jpg|G2 time ruler]]

Revision as of 18:59, 12 February 2016

Introduction

G2 is a fine-grained event-log viewer. It's highly scalable, supporting O(1e7 events) and O(1e3 discrete display "tracks"). G2 displays binary data generated by the vppinfra "elog.[ch]" logger component. G2 also supports for the CPEL file format, described here.

Usage

$ cd build-root
$ make g2-install
$ ./install-native/g2/bin/g2 --help
g2 [--ticks-per-us <value>][--cpel-input <filename>] [--clib-input <filename]>
G2 (x86_64 GNU/Linux) major version 3.0
Built Wed Feb  3 10:58:12 EST 2016

When viewing a ".cpel" file, use "g2 --cpel <filename>". When viewing a vppinfra event log, use "g2 --clib <filename>".

Setting Display Preferences

The file $HOMEDIR/.g2 contains display preferences, which can be overridden. Simply un-comment one of the stanzas shown below, or experiment as desired.

/*
 * Property / parameter settings for G2
 *
 * Setting for a 1024x768 display:
 * event_selector_lines=20
 * drawbox_height=800
 * drawbox_width=600
 * 
 * new mac w/ no monitor:
 * event_selector_lines=20
 * drawbox_height=1200
 * drawbox_width=700
 *
 * 1600x1200:
 * drawbox_width=1200
 * drawbox_height=1000
 * event_selector_lines=25
 * 
 * for making screenshots on a Macbook Pro
 * drawbox_width=1200
 * drawbox_height=600
 * event_selector_lines=20
 */

Screen Taxonomy

Here is an annotated G2 viewer screenshot, corresponding to activity during BGP prefix download. These data were captured on a Cisco IOS-XR system:

G2 screen taxonomy

The viewer has two main scrollbars: the horizontal axis scrollbar shifts the main drawing area in time; the vertical axis changes the set of visible process traces. The zoomin / zoomout operators change the time scale.

The event selector PolyCheckMenu changes the set of displayed events.

Using these tools -- and considerable patience -- one can make sense of a given event log.

Mouse Gestures

G2 has three fairly sophisticated mouse gesture interfaces which are worth describing in detail. First, left mouse clicking on a display event pops up a per-event detail box:

Left Mouse Click example

A left mouse click on an event detail box takes it down.

To zoom to a region of the display, press and hold the left mouse button; drag right or left until the zoom-fence pair appears.

Left Mouse Drag description

When the zoom operation completes, the display is as follows:

g2 example

Time Ruler

To use a time ruler, press and hold the right mouse button; drag right or left until the ruler measures the region of interest. If the time axis scale is coarse, event boxes can have significant width in time, so use a "reference point" in each event box when using the time ruler.

G2 time ruler