OpenWrt Forum Archive

Topic: RRDTool?

The content of this topic has been archived on 13 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Any chance of anyone having the rrdtools running on a WRT?  I'm comtemplating turning one of mine into a datalogging device for my weather station and temperature sensors.  I have written all the code to do the actual logging on linux, but it relies on rrdtool.  I can get it to run on my WRT, collect the data from a serial interface, but it would be nifty to be able to serve it directly from the WRT.

If not, are there other similar tools already available (mostly for generating the graphs, I can rewrite the logging part).

Thanks.

rrdtool/rrdcollect is already packaged for OpenWRT at http://openwrt.brainabuse.de/rrdcollect/ but the version is outdated.

When I tried to compile a new version of rrdtool I always get I always get an IEEE math compile error. Maybe someone could build an updated package.

Sweet, thanks so much.  I got the rrdtool pkg and installed it.  My program runs great with this version!

http://www.kegit.com:88/temp05

(Last edited by pcbroch on 11 Jul 2005, 13:45)

I wrote a mail to the guy who offers rrdtool as ipk:


I will do that after vacation.

greets
Christian

> Hello,
>
> can you update rrdtool to 1.2?
> Some people have problems to compile the current package:
> (the last version you offer is http://openwrt.brainabuse.de/
> rrdcollect/ipk/rrdtool_1.0.49_mipsel.ipk )
>
> http://openwrt.org/forum/viewtopic.php?id=1961
>
> thanks
>
> Raymond
>

(Last edited by raymond on 18 Jul 2005, 21:26)

I've packaged already rrdtool 1.2.10 and rrdcollect 0.2.3 for latest OpenWRT.

The only thing I need to fix is printing graphs with rrdcollect (rrdcgi). The rest is working.

When it's ready I'll give it to nbd, so he can put it into cvs.

(Last edited by olli_04 on 18 Jul 2005, 23:33)

Ok. Here is the package directory for the OpenWRT SDK to build the rrdtool, rrdcollect and the other required packages.

Just extract the tarball in the package directory from the SDK and run make clean compile
For now it isn't watching for dependencies, but it compiles fine.

I've problems to update /usr/bin/rrd.sh (for the new version) which creates /tmp/rrd.cgi . Is only required for rrdcollect.

Buildroot - Usage und documentation

You are welcome to help, to get this thing working.

(Last edited by olli_04 on 19 Jul 2005, 10:58)

rrdtool v1.2.11 and rrdcollect v0.2.3 are ported to OpenWRT and is waiting for testing.

You can find it in the CVS tree.

Feedback is welcome. Also, if you found a bug please report it. Thanks.

(Last edited by olli_04 on 14 Aug 2005, 09:49)

I made some changes when integrating to CVS :

* rrdtool now builds a shared librrd
* rrdcollect is linked against the previous library and uses it directly (no need for rrdtool anymore)

can someone confirm rrdcollect is still working as expected ?

Oliver, is it wise to do so ?

Thanks for your help

Nico, works almost fine now.

Found two things:

1) rrd.cgi is created in / instead of /var/lib/rrdcollect

2) In /etc/init.d/S98rrdcollect I found some small things, I make changes on lines 19, 20 and 21

root@OpenWrt:/# cat /etc/init.d/S98rrdcollect | awk '{printf "%3d %s\n", NR, $0}'  
  1 #!/bin/sh
  2 
  3 BIN=rrdcollect
  4 DEFAULT=/etc/default/$BIN
  5 RUN_D=/var/run
  6 PID_F=$RUN_D/$BIN.pid
  7 LIB_D=/var/lib/rrdcollect
  8 CGI_S=$LIB_D/rrd.cgi
  9 IMG_D=$LIB_D/img
 10 RRD_D=$LIB_D/rrd
 11 RRD_F=$(find $RRD_D -name "*.rrd" 2>/dev/null)
 12 [ -f $DEFAULT ] && . $DEFAULT
 13 
 14 case $1 in
 15  start)
 16   mkdir -p $RUN_D
 17   mkdir -p $IMG_D
 18   mkdir -p $RRD_D
 19   mkdir -p $LIB_D
 20   [ -x "$RRD_D" ] && /usr/bin/rrd.sh init
 21   [ -n "$CGI_S" ] && /usr/bin/rrd.sh cgi
 22   $BIN $OPTIONS
 23   ;;
 24  stop)
 25   [ -f $PID_F ] && kill $(cat $PID_F)
 26   ;;
 27  *)
 28   echo "usage: $0 (start|stop)"
 29   exit 1
 30 esac
 31 
 32 exit $?
root@OpenWrt:/#

EDIT: Don't add line 19, I saw they where created before. Just change line 20 and 21.

Thanks for fixing.

(Last edited by olli_04 on 15 Aug 2005, 11:51)

I have made some new packages to OpenWRT, and then I found some minor problems with the
package fuse and rrdtool at the time.

I have updated the old package rrdtool 1.0.49, since it's really saving some flash space instead of using
rrdtool 1.2.11.  Many smaller systems doesn't need cgilib, libgd, libpng, libart, freetype, etc as
dynamic libraries since they are only used by two appliications  (rrdtool, rrdcgi)

rrdtool 1.2.11   1321873 bytes  (All binaries + all libraries)
rrdtool 1.0.49   684919 bytes   (All binaries + librrd.so)

The package (which I have called rrdtool1) looks very much like the rrdtool. Some dependencies are
added to avoid both versions defined at the same time. It's possible to use the package rrdcollect with
the 1.0.49 version as well.

Where should I send the patches  (for fuse and rrdtool1)?

/Christian

The discussion might have continued from here.