FILEIN="costam.rrd"
FILEOUT="costam.png"
START="-1 day"
STOP="0"
TITLE="Jakis wykres ($(date +'%Y-%m-%d'))"
rrdtool graph "$FILEOUT" \
    --imgformat 'PNG' \
    --start "$START" \
    --end "$STOP" \
    --vertical-label 'bps' \
    --width '900' \
    --height '300' \
    --title "$TITLE" \
    "DEF:IN=${FILEIN}:in:AVERAGE" \
    "DEF:OUT=${FILEIN}:out:AVERAGE" \
    'CDEF:INb=IN,8,*' \
    'CDEF:OUTb=OUT,8,*' \
    'AREA:OUTb#00FF00:out' \
    'LINE2:INb#0000FF:in'
