Convert sar text output into RRDTool Graphs

Background

sar2rrd.pl is a Perl script that can be used to generate RRDTool graphs from sar output.

It creates a PNG Graph for each statistics group collected by sar.
Version 2.6 handles Linux, HP-UX, AIX and Solaris sar output.
Each statistics of the group is represented as a single line in the graph.

Only the filename to parse is mandatory. This filename if produced by a command such as "sar -A -f filename"

Without any additional parameters, sar2rrd.pl creates graphs for the period of time specified in the given filename.

Starting with the version 2.4, the script is able to concatenate data in an existing RRD file. It can truncate archives to a maximum size.

A new "companion" script : sar2rrd-graph.pl can generate graphs from existing RRD archives without re-parsing the "sar" data.

Before running the script, make sure the path to "rrdtool" command is correct.

This is probably because the date format in the SAR output is not the default month-day-year format.
You should try the "-t DMY" option.

How do I concatenate data to an existing graph ?

Imagine you run "sar" and get a single output file per day. The new -C option allows you to add new values to an existing RRD file.

Is there a way to limit the size of the RRD files when I use the concatenation ?

Yes, you can add the -T #days option with the -C option.

Is there a way to generate new graphs without re-parsing the data ?

Yes, you can. Since v2.4, the main script sar2rrd.pl writes in a XML file, which contains all the necessary
parameters to build new graphs with the same RRD files. The graphs can be rebuilt with the new sar2rdd-graph.pl script.

Is there a way to generate graphs with single indicators ?

Yes, you can. The main script sar2rrd.pl allows you to generate graphs with all or some of the indicators
for the same "sar data block". Using the '-g' option, you can precisely choose what you want to generate...