 |
Helpful Hints for Graphing with SarCheck
Here are some helpful hints for users of SarCheck. This page
assumes that you're already familiar with SarCheck.
- SarCheck uses gnuplot 3.7.1 to generate graphs
and assumes that gnuplot
can be found in /usr/local/bin. If gnuplot is located
somewhere else, use GNUPLOTDIR as the keyword and enter
the name of the directory in the sarcheck_parms
file. For example, if the gnuplot executable is
/opt/gnuplot/bin/X11/gnuplot, a line in the
sarcheck_parms file should be GNUPLOTDIR
/opt/gnuplot/bin/X11
- If you're using gnuplot version 4 or newer,
use GNUPLOT as the keyword followed by a space and a
"4" in the sarcheck_parms
file. For example, if the gnuplot executable is version
4.0, a line in the sarcheck_parms file should be GNUPLOT 4.0
- To create JPEG graphs, use the -jpg or
-jpeg keywords. To create PNG graphs,
use the -png keyword. If you use these switches without
the -html switch, the graphs will be created in your
working directory. If you want them to go someplace else,
use the sarcheck_parms keyword
GRAPHDIR. If you use these switches with the -html
switch, the graphs will be embedded in the HTML output
with <img> tags.
- The gnuplot utility is available from many
places. We did our testing using precompiled binaries that are
available here.
- We don't support the gnuplot terminal type of gif
and have never tried it. Since the production of gif
graphics used to fall under a Unisys patent, we decided
to avoid it when we developed SarCheck. It's gnuplot that
generates graphs, not SarCheck.
- The error message "unknown or ambiguous terminal
type" means that
your copy of gnuplot doesn't support the type of graphs
that you want to make. To see what kind of graphs are
supported by your copy of gnuplot, run gnuplot and type set terminal at the prompt. We
did our testing using precompiled
binaries that are available here and they work well
for creating both PNG and JPEG graphs.
- To create a SarCheck HTML report with graphs and
move it to another system, follow these steps:
- UNIX Example:
- Pick or create an empty directory to hold the
HTML and graphs. For this example, well use
the directory /tmp/sarcheck
- Create a SarCheck analysis of a sar report called
sarxx with the switches that will put all of the
pieces in /tmp/sarcheck, and put usable graph
names in the HTML files IMG tags:
analyze
png html gd /tmp/sarcheck -hgd
./ t ps sarxx >
/tmp/sarcheck/test.html
The HTML file is redirected to /tmp/sarcheck,
the gd switch puts the graphs in /tmp/sarcheck,
and the hgd switch puts ./ in
the IMG tags of the HTML report instead of the
actual directory name. As long as the graphs and
the HTML file are in the same directory, the
browser will have no trouble finding the graphs.
- Move the files in /tmp/sarcheck with FTP
or whatever tool you prefer. Be sure that the
graphs are transferred as binary and
not text. This is a common problem,
especially when a PC running Windows is in use.
- LINUX Example:
- Pick or create an empty directory to hold the
HTML and graphs. For this example, well use
the directory /tmp/sarcheck
- Create a SarCheck analysis of a /opt/sarcheck/procstat data file called
20070526 (remember, this is just an example and you might not find
this file on your system.) Run the following command with these switches to put
all of the pieces in /tmp/sarcheck, and put usable graph
names in the HTML files IMG tags:
analyze
png html gd /tmp/sarcheck -hgd
./ t ps 20070526 >
/tmp/sarcheck/test.html
The HTML file is redirected to /tmp/sarcheck,
the gd switch puts the graphs in /tmp/sarcheck,
and the hgd switch puts ./ in
the IMG tags of the HTML report instead of the
actual directory name. As long as the graphs and
the HTML file are in the same directory, the
browser will have no trouble finding the graphs.
- Move the files in /tmp/sarcheck with FTP
or whatever tool you prefer. Be sure that the
graphs are transferred as binary and
not text. This is a common problem,
especially when a PC running Windows is in use.
Go to the SarCheck home page
|
 |
 |