.TH rtgplot 1 "August 2003" "Manual page for rtgplot" .SH NAME .I rtgplot \- generate plots of RTG data .SH SYNOPSIS .B rtgplot \-h[elp] .br .B rtgplot -t tablename(s) -i interface(s) [options] begin end .br .B rtgplot.cgi ?t1=tablename &t`_name=descname &t2=tablename &t2_name=descname &iid=interface &begin=unixtime &end=unixtime &[options] .SH DESCRIPTION .I 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. .I rtgplot minimally requires MySQL table name, MySQL interface id and UNIX epoch start and end arguments. In addition, there are several optional arguments that modify the plot appearance or logic. .SH OPTIONS .PP .TP .IR "\-o file" Output file, PNG format. Defaults to stdout. Command line only. .TP .IR "\-f factor " | " factor=" Multiply all values by this integer .RI e.g. to covert bytes to bits. .TP .IR "\-u label " | " units=" Y-axis units label. .TP .IR "\-g " | " gauge=yes" For gauge type plots. I.e. continuous gauge data such as CPU or temperature plots. .TP .IR "\-p " | " impulses=yes" For impulse type plots. I.e. non-continuous data such as error plots. .TP .IR "\-a " | " aggr=yes" Aggregate values of each interface into a single line. .TP .IR "\-x " | " scalex=yes" Scale X-axis to current time. .TP .IR "\-y " | " scaley=yes" Scale Y-axis to interface speed. .TP .IR "\-l " | " filled=yes" Fill in area beneath first plotted line. .TP .IR "\-d percent " | " percentile=" Add a .RI percentile line. .TP .IR "\-v " | " debug=" Increase verbosity. Can be used multiple times. Use debug argument when debugging a CGI call; debug output is placed in /tmp directory. .RI is between 0 and 3, 3 being the most verbose debugging. .TP .IR "\-m size " | " xplot=" Set plot width to .RI pixels. .TP .IR "\-n size " | " yplot=" Set plot height to .RI pixels. .TP .IR "\-b size " | " borderb=" Set plot bottom border to .RI pixels. .TP .IR "title=" Set graph title to .RI <title> .PP .SH "EXAMPLES" .PP .br Example HTML IMG TAG: .PP <IMG SRC="rtgplot.cgi? t1=ifInOctets_2& t1_name=Input& t2=ifOutOctets_2& t2_name=Output& iid=4& begin=1046754000& end=1046840399& units=bits/s& factor=8& scalex=yes& title=Bandwidth+Graph"> .PP 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. It will have a graph title of "Bandwidth Graph" and legend tags of "Input" and "Output" for t1 and t2 respectively. .PP Draw a 95th percentile line: .PP <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> .PP Draw input and output bits per second for three different interfaces on the same plot. Enlarge the plot bottom border to fit extra legends: .PP <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> .PP As last example, but aggregate input and output bits per second for the three different interfaces. .PP <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> .SH "SEE ALSO" rtgpoll(1) .br .SH VERSION This manual page documents rtgplot version 0.7.4 .SH AUTHOR .br (c) 2002-2003 by Robert Beverly .PP