these variables will contain totals of the user time, system time and
real time as seen by RRDtool. User time is the time RRDtool is
-running, System time is the time spend in system calls and real time
+running, System time is the time spent in system calls and real time
is the total time RRDtool has been running.
The difference between user + system and real is the time spent
=head2 Error Handling
-The RRD functions will not abort your program even when they can not make
+The RRD functions will not abort your program even when they cannot make
sense out of the arguments you fed them.
The function RRDs::error should be called to get the error status
B<RRDs::fetch> is the most complex of
the pack regarding return values. There are 4 values. Two normal
-integers, a pointer to an array and a pointer to a array of pointers.
+integers, a pointer to an array and a pointer to an array of pointers.
my ($start,$step,$names,$data) = RRDs::fetch ...
print "Start: ", scalar localtime($start), " ($start)\n";
be able to call rrdgraph on it. Using a custom callback, you can supply your own
code for handling the data requests from graph, xport and fetch.
-Todo this, you have to first write a fetch function in perl, and then register
+To do this, you have to first write a fetch function in perl, and then register
this function using C<RRDs::fetch_register_callback>.
Finally you can use the pseudo path name B<cb//>[I<filename>] to tell
=head1 NOTE
If you are manipulating the TZ variable you should also call the POSIX
-function L<tzset(3)> to initialize all internal state of the library for properly
+function L<tzset(3)> to initialize all internal states of the library for properly
operating in the timezone of your choice.
use POSIX qw(tzset);
INSTALL_DIR=/opt/rrdtool-1.7.0
-If your F</tmp> is mounted with the option noexec (RHEL seems todo that) you have to choose
+If your F</tmp> is mounted with the option noexec (RHEL seems to do that) you have to choose
a different directory!
Now make sure the BUILD_DIR exists and go there:
$MAKE
$MAKE install
-When building on Solaris you may want todo
+When building on Solaris you may want to do
./configure --prefix=$INSTALL_DIR \
--enable-xlib=no \
=head2 Error Handling
The Lua RRDtool module functions will abort your program with a stack
-traceback when they can not make sense out of the arguments you fed them.
+traceback when they cannot make sense out of the arguments you fed them.
However, you can capture and handle the errors yourself, instead of just
letting the program abort, by calling the module functions through Lua
protected calls - 'pcall' or 'xpcall'.
B<rrd.graphv> takes the same parameters as rrd.graph but it returns a table
only. The table returned contains meta information about the graph, like
its size as well as the position of the graph area on the image. When
-called with and empty filename, the contents of the graph will be returned
+called with an empty filename, the contents of the graph will be returned
in the table as well (key 'image').
B<rrd.updatev> also returns a table. The keys of the table are strings
language. This wrapper implementation has been written from the scratch
(without SWIG)
-The API's expects strings and/or list of strings as parameters to the functions.
+The API expects strings and/or a list of strings as parameters to the functions.
Please refer to the other B<rrdtool> documentation for functions and valid arguments.
=head1 EXAMPLES
language. This wrapper implementation has been written from the scratch
(without SWIG)
-The API's simply expects string parameters to the functions. Please refer
+The API simply expects string parameters to the functions. Please refer
to the other B<rrdtool> documentation for functions and valid arguments.
=head1 EXAMPLE
understand the basics, the examples will not be as meaningful to you.
Sometimes things change. This example used to provide numbers like
-"0.04" in stead of "4.00000e-02". Those are really the same numbers,
+"0.04" instead of "4.00000e-02". Those are really the same numbers,
just written down differently. Don't be alarmed if a future version
of rrdtool displays a slightly different form of output. The examples
in this document are correct for version 1.2.0 of RRDtool.
the counter starts over at zero. This is the same as many counters
in the world such as the mileage counter in a car.
-Most discussions about networking talk about bits per second so lets
+Most discussions about networking talk about bits per second so let's
get used to that right away. Assume a byte is eight bits and start to
think in bits not bytes. The counter, however, still counts bytes!
In the SNMP world most of the counters are 32 bits. That means they are
one data source (DS) named "speed" that represents a counter. This counter
is read every five minutes (this is the default therefore you don't have to
put C<--step=300>). In the same database two round robin archives (RRAs)
-are kept, one averages the data every time it is read (e.g., there's nothing
+are kept, one averages the data every time it is read (i.e., there's nothing
to average) and keeps 24 samples (24 times 5 minutes is 2 hours). The other
averages 6 values (half hour) and contains 10 such averages (e.g. 5 hours).
system or shell which behaves differently.
After viewing this PNG, you notice the "m" (milli) has
-disappeared. This it what the correct result would be. Also, a label
+disappeared. This is what the correct result would be. Also, a label
has been added to the image. Apart from the things mentioned above,
the PNG should look the same.
This is all. Run the above script every five minutes. When you need to know
what the graphs look like, run the examples above. You could put them
in a script as well. After running that script, view the page
-index.html we created above.
+speed.html we created above.
=head2 Some words on SNMP
for an increased speed in the examples and explanations.
You know that in order to view a counter over time, you have to
-take two numbers and divide the difference of them between the
+take two numbers and divide the difference of them by the
time lapsed. This makes sense for the examples I gave you but there
are other possibilities. For instance, I'm able to retrieve the
temperature from my router in three places namely the inlet, the
=item *
-Line C: Again, the start-out value is unknown. The same story is holds
+Line C: Again, the start-out value is unknown. This is the same story
as for line A. In this case the deltas are not constant, therefore the line
is not either. If we would put the same numbers in the database as we did for
line A, we would have gotten the same line. Unlike type counter,