System information
48 System Analysis and Tuning Guide
2.11.2.4 Viewing Measured Values
We have already measured the values, created the database, and stored the measured
value in it. Now we can play with the database, and retrieve or view its values.
To retrieve all the values from our database, enter the following on the command line:
tux@mercury:~> rrdtool fetch free_mem.rrd AVERAGE --start 1272974830 \
--end 1272974871
memory
1272974832: nan
1272974836: 1.1729059840e+09
1272974840: 1.1461806080e+09
1272974844: 1.0807572480e+09
1272974848: 1.0030243840e+09
1272974852: 8.9019289600e+08
1272974856: 8.3162112000e+08
1272974860: 9.1693465600e+08
1272974864: 1.1801251840e+09
1272974868: 1.1799787520e+09
1272974872: nan
Points to Notice
• AVERAGE will fetch average value points from the database, because only one data
source is defined (Section2.11.2.2, “Creating Database” (page46)) with AV-
ERAGE processing and no other function is available.
• The first line of the output prints the name of the data source as defined in Sec-
tion2.11.2.2, “Creating Database” (page46).
• The left results column represents individual points in time, while the right one rep-
resents corresponding measured average values in scientific notation.
• The nan in the last line stands for “not a number”.
Now a graph representing representing the values stored in the database is drawn:
tux@mercury:~> rrdtool graph free_mem.png \
--start 1272974830 \
--end 1272974871 \
--step=4 \
DEF:free_memory=free_mem.rrd:memory:AVERAGE \
LINE2:free_memory#FF0000 \
--vertical-label "GB" \
--title "Free System Memory in Time" \
--zoom 1.5 \
--x-grid SECOND:1:SECOND:4:SECOND:10:0:%X