RRDTool

From ArmadeusWiki
Jump to: navigation, search

Introduction

One wanting to log periodic data on his embedded system with a standard and robust method might be interested by the following instructions.

From wikipedia: "RRDtool (round-robin database tool) aims to handle time series data. The data are stored in a circular buffer based database, thus the system storage footprint remains constant over time. It also includes tools to extract round-robin data in a graphical format, for which it was originally intended. Bindings exist for several programming languages."

Installation

$ make menuconfig
...
Target packages  --->
    ...
    Graphic libraries and applications (graphic/text)  --->
        ...
        [*] rrdtool
  • then reflash your rootfs

Usage

  • Check your system has the correct date/time:
# date
  • If not, then set it ;-)
  • Create the database:
# rrdtool create /data/battery.rrd --step 120 DS:cap:GAUGE:240:0:100 RRA:AVERAGE:0.5:1:1200
  • Feed the script with data (XX):
rrdtool update /data/battery.rrd -- N:

Links