rtgplot

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
SEE ALSO
VERSION
AUTHOR

NAME

rtgplot − generate plots of RTG data

SYNOPSIS

rtgplot −h[elp]
rtgplot
-t tablename(s) -i interface(s) [options] begin end
rtgplot.cgi
?t1=tablename &t2=tablename &iid=interface &begin=unixtime &end=unixtime &[options]

DESCRIPTION

rtgplot generates traffic plots of RTG data in PNG format. It operates in two modes: either taking command line arguments or parsing stdin from a web page CGI. An RTG plot can be embedded in any HTML page simply with an IMG tag and appropriate arguments. Unless otherwise specified, it outputs the PNG plot to stdout. rtgplot minimally requires MySQL table name and interface id arguments. In addition, there are several optional arguments that modify the plot appearance or logic.

OPTIONS

−o file

Output file, PNG format. Defaults to stdout. Command line only.

−f factor | factor=<factor>

Multiply all values by this integer <factor> e.g. to covert bytes to bits.

−u label | units=<units>

Y-axis units label.

−g | gauge=yes

For gauge type plots. I.e. continuous gauge data such as CPU or temperature plots.

−p | impulses=yes

For impulse type plots. I.e. non-continuous data such as error plots.

−a | aggr=yes

Aggregate values of each interface into a single line.

−x | scalex=yes

Scale X-axis to current time.

−y | scaley=yes

Scale Y-axis to interface speed.

−l | filled=yes

Fill in area beneath first plotted line.

−d percent | percentile=<percent>

Add a <percent> percentile line.

−v | debug=<level>

Increase verbosity. Can be used multiple times. Use debug argument when debugging a CGI call; debug output is placed in /tmp directory. <level> is between 0 and 3, 3 being the most verbose debugging.

−m size | xplot=<size>

Set plot width to <size> pixels.

−n size | yplot=<size>

Set plot height to <size> pixels.

−b size | borderb=<size>

Set plot bottom border to <size> pixels.

EXAMPLES

Example HTML IMG TAG:

<IMG SRC="rtgplot.cgi? t1=ifInOctets_2& t2=ifOutOctets_2& iid=4& begin=1046754000& end=1046840399& units=bits/s& factor=8& scalex=yes">

will plot two lines from the MySQL tables ifInOctets_2 and ifOutOctets_2 corresponding to interface 4 on router 2 for the time span 1046754000 to 1046840399 (UNIX epoch seconds). The factor argument allows for bits per second; the units argument is displayed as the Y-axis label on the plot. The scalex argument auto-adjusts the X time axis according to the available data samples rather than according to the actual time span given.

Draw a 95th percentile line:

<IMG SRC="rtgplot.cgi? t1=ifInOctets_2& t2=ifOutOctets_2& iid=4& begin=1046754000& end=1046840399& units=bits/s& factor=8& percentile=95> percentile=95>

Draw input and output bits per second for three different interfaces on the same plot. Enlarge the plot bottom border to fit extra legends:

<IMG SRC="rtgplot.cgi? t1=ifInOctets_2& t2=ifOutOctets_2& iid=4& iid=5& iid=7& xplot=500& yplot=150& borderb=150& begin=1046754000& end=1046840399& units=bits/s& factor=8>

As last example, but aggregate input and output bits per second for the three different interfaces.

<IMG SRC="rtgplot.cgi? t1=ifInOctets_2& t2=ifOutOctets_2& iid=4& iid=5& iid=7& begin=1046754000& end=1046840399& units=bits/s& factor=8& aggr=yes>

SEE ALSO

rtgpoll(1)

VERSION

This manual page documents rtgplot version 0.7.4

AUTHOR

(c) 2002-2003 by Robert Beverly