System information

44 System Analysis and Tuning Guide
2.10.1 Time Measurement with time
Determine the time spent by commands with the time utility. This utility is available
in two versions: as a shell built-in and as a program (/usr/bin/time).
tux@mercury:~> time find . > /dev/null
real 0m4.051s
user 0m0.042s
sys 0m0.205s
The real time that elapsed from the command's start-up until it finished.
CPU time of the user as reported by the times system call.
CPU time of the system as reported by the times system call.
2.11 Graph Your Data: RRDtool
There are a lot of data in the world around you, which can be easily measured in time.
For example, changes in the temperature, or the number of data sent or received by
your computer's network interface. RRDtool can help you store and visualize such da-
ta in detailed and customizable graphs.
RRDtool is available for most UNIX platforms and Linux distributions. SUSEĀ® Lin-
ux Enterprise Server ships RRDtool as well. Install it either with YaST or by entering
zypper install rrdtool in the command line as root.
TIP
There are Perl, Python, Ruby, or PHP bindings available for RRDtool, so that
you can write your own monitoring scripts with your preferred scripting lan-
guage.
2.11.1 How RRDtool Works
RRDtool is a shortcut of Round Robin Database tool. Round Robin is a method for
manipulating with a constant amount of data. It uses the principle of a circular buffer,
where there is no end nor beginning to the data row which is being read. RRDtool us-
es Round Robin Databases to store and read its data.