mysqlar_graph

Langue: en

Version: 112515 (mandriva - 01/05/08)

Section: 1 (Commandes utilisateur)

NAME

mysqlar_graph - MySQL Activity Report graphics generation

SYNOPSIS

mysqlar_graph

DESCRIPTION

The mysqlar_graph script generates graphic image files from data collected by the mysqlard daemon and stored in a Round Robin Database.

If you want to save graphic images of your data collection, you'll have to run this program regulary from a cron job because of the nature of Round Robin Databases. There are sample cron.daily, cron.weekly, cron.monthly scripts distributed in the package. If you used the RPM, they should be installed in the proper location to be run from cron.

The mysqlar_graph script is distributed with the mysqlard daemon in tar.gz, rpm and srpm packages. It is released under the Gnu General Public License version 2.

ENVIRONMENT

Usually the script will be called from other scripts like cron jobs.

The mysqlar_graph script is completely controlled by environment variables as they are set in the /usr/local/etc/mysqlard.cnf file. The environment variables can be overridden on the command line. See the EXAMPLES section for some usefull invocations.

hourly
If set to 1 the mysqlar_graph will generate a graph for the period of 1 hour.
daily
If set to 1 the mysqlar_graph will generate a graph for the period of 1 day.
weekly
If set to 1 the mysqlar_graph will generate a graph for the period of 1 week.
monthly
If set to 1 the mysqlar_graph will generate a graph for the period of 1 month.
yearly
If set to 1 the mysqlar_graph will generate a graph for the period of 1 yearly.
ext
The value of ext will be used in the filename of the image file. Usefull to include a date in the filename.
start
The start date/time. Every date specification acceptable for the -d argument to the date program can be used. If you want to be sure of the result use the ISO date format : YYYY-MM-DD HH:MM:SS.
Following environment variables can be used to override the defaults in /usr/local/etc/mysqlard.cnf.
datadir
Location of the Round Robin Database files, .rrd files.
imgdir
Output directory for the image files.
graphwidth, graphheight
Width and height of the graphing area of resulting graph, this is not the total width and height of the graph, only the width and height of the area where the data points are plotted. Legends, titles, etc. will be plotted outside this area.
backcol
Background color of the image.
canvascol
Background color of the graphing area of the image.
gridcol
Color of the minor grid lines
mgridcol
Color of the major grid lines
fontcol
Color of the font used to draw the title, legend, etc.

EXAMPLES

start='2004-03-09' ext='-09-03-2004' daily=1 mysqlar_graph

This will create image files for 1 days worth of data starting at 0h 0m 0s on 9 March 2004 and store the image with filenames like : queries-day-09-03-2004.png, con-day-09-03-2004.png, etc.

imgdir=/var/www/img/archive start='2004-03-09' ext='11' weekly=1 mysqlar_graph

This will create image files for 1 week worth of data starting at 0h 0m 0s on 9 March 2004 and store the image with filenames like : queries-week-11.png, con-week-11.png in the /var/www/img/archive directory.

BUGS

It's not possible to generate only 1 graphic image file. All available datacollections are used to generate images. Maybe I'll add it later.

AUTHOR

Gert Dewit <gert.dewit@sos.be> (http://gert.sos.be).