RRDFETCH(1) rrdtool RRDFETCH(1) (NAME) rrdfetch - RRD (SYNOPSIS) rrdtool fetch filename CF [--resolution|-r resolution] [--start|-s start] [--end|-e end] [--align-start|-a] [--daemon|-d address] (DESCRIPTION) fetch (graph) RRD . fetch RRD . stdout . *UNKNOWN* printf <> . filename RRD . CF (consolidation function) (AVERAGE MIN MAX LAST). --resolution|-r resolution ( ) ( ). ( "5m" 300 ). rrdfetch . <> . --start|-s start ( end-1day) . epoch (1970-01-01) . . . <> . --end|-e end ( now) epoch. <> . --align-start|-a (resolution). . RESOLUTION INTERVAL RRA . --daemon|-d address rrdcached. RRD "flush" . rrdtool . -l rrdcached . rrdtool fetch --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd AVERAGE (thread-safety) -s -e <> . << >> . epoch ( ) now . <<1272535035>> <<09:57:15 (UTC), April 29th 2010>> <<-3600>> << >> ..SS " (RESOLUTION INTERVAL)" RRDtool RRA . : rrdtool create subdata.rrd -s 10 \ DS:ds0:GAUGE:5m:0:U \ RRA:AVERAGE:0.5:5m:300h \ RRA:AVERAGE:0.5:15m:300h \ RRA:AVERAGE:0.5:1h:50d \ RRA:MAX:0.5:1h:50d \ RRA:AVERAGE:0.5:1d:600d \ RRA:MAX:0.5:1d:600d RRD . . : rrdtool fetch subdata.rrd AVERAGE -r 15m -s -1h RRA . RRA . : 1. ("15m") 2. RRA <> : end time == int(t/900)*900, start time == end time - 1hour, resolution == 900. bash : TIME=$(date +%s) RRDRES=900 rrdtool fetch subdata.rrd AVERAGE -r $RRDRES \ -e $(($TIME/$RRDRES*$RRDRES)) -s e-1h Perl: perl -e '$ctime = time; $rrdres = 900; \ system "rrdtool fetch subdata.rrd AVERAGE \ -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-1h"' --align-start: rrdtool fetch subdata.rrd AVERAGE -a -r 15m -s -1h AT (AT-STYLE TIME SPECIFICATION) Seconds since epoch ( ) RRDtool at . at(1) <> . at-style : TIME REFERENCE ( ) TIME OFFSET ( ). (TIME REFERENCE SPECIFICATION) ( ). now . time-of-day ( ) day () . time-of-day HH:MM HH.MM HH . am pm . midnight ( 00:00) noon ( 12:00) teatime ( 16:00). day month-name day-of-the-month year ( March 8 1999). day-of-week-name ( Monday) : yesterday today tomorrow . day MM/DD/[YY]YY DD.MM.[YY]YY YYYYMMDD . : at(1) MMDD[YY]YY . : day time-of-day . now start end epoch . Now ( ). Start (end) () (rrdfetch rrdgraph) epoch (*IX epoch 0 = 1970-01-01 00:00:00 UTC) . epoch / epoch+19711205s 19711205 1971-12-05 00:00:00 UTC. ( Dec December Sun Sunday ). now start end n s e ..SS " (TIME OFFSET SPECIFICATION)" / / . (+ -) . : years months weeks days hours minutes seconds. ( +3days -1wk -3y). ( -5mon1w2d) ( -5h45min = -5h-45min = -6h+15min = -7h+1h30m-15min ). : ( (DST) ). ( mktime(3) ). ( !) 'May 31 -1month' = 'Apr 31' () = 'May 1' ( mktime(3)) EET '3:30am Mar 29 1999 -1 day' '3:30am Mar 28 1999' () / ( DST 3am -> 4am ). ( EET '8:00 Mar 27 1999 +2 days' = '8:00 Mar 29 1999' 3:00 Mar 28 1999 DST 8:00 Mar 27 1999 8:00 Mar 29 1999 '8:00 Mar 27 1999 +48 hours' = '9:00 Mar 29 1999' ). : months minutes m . :) 1. m ( ) months minutes . ( -1y6m +3w1m m months -3h20m +5s2m minutes ). 2. ( + -) m . m months minutes . ( -6m == -6m minutes +5m == +5 months). : (case-insensitive). . ( 'midnight Thu'). (shell) '_' () ',' () ( midnight_Thu midnight,Thu). (TIME SPECIFICATION EXAMPLES) Oct 12 -- -1month -1m -- ( ). noon yesterday -3hours -- 9am-1day . 23:59 31.12.1999 -- . 12/31/99 11:59pm -- . 12am 01/01/01 -- end-3weeks e-3w -- ( ). start+6hours s+6h -- ( ). 931200300 -- : (UTC) ( ). 19970703 12:45 -- : ( ISO (8601) )..SH " (ENVIRONMENT VARIABLES)" "rrdtool fetch" : RRDCACHED_ADDRESS "--daemon" . . (AUTHOR) Tobias Oetiker 1.11.0 2026-08-08 RRDFETCH(1)