summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-08-14 02:57:28 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-08-14 02:57:28 +0000
commit4bff4b6a8ff28d843bfe6fa15315c4108f18bfda (patch)
tree5c95bf4c94d95e4be1fe3b79afb69b5b5d64faa0
parent7278f81f2eba2683f737abd90d8e769e36ee1279 (diff)
add rrdcollect package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1653 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--openwrt/package/Config.in1
-rw-r--r--openwrt/package/Makefile2
-rw-r--r--openwrt/package/rrdcollect/Config.in14
-rw-r--r--openwrt/package/rrdcollect/Makefile76
-rw-r--r--openwrt/package/rrdcollect/files/rrdcollect.conf33
-rw-r--r--openwrt/package/rrdcollect/files/rrdcollect.init24
-rw-r--r--openwrt/package/rrdcollect/ipkg/rrdcollect.conffiles1
-rw-r--r--openwrt/package/rrdcollect/ipkg/rrdcollect.control12
8 files changed, 163 insertions, 0 deletions
diff --git a/openwrt/package/Config.in b/openwrt/package/Config.in
index 5482c23f3c..b0e7cd3e5e 100644
--- a/openwrt/package/Config.in
+++ b/openwrt/package/Config.in
@@ -24,6 +24,7 @@ source "package/sablevm/Config.in"
source "package/sablevm-classpath/Config.in"
source "package/libffi-sable/Config.in"
endmenu
+source "package/rrdcollect/Config.in"
source "package/rrdtool/Config.in"
source "package/screen/Config.in"
diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile
index def03c4ac3..86d110319d 100644
--- a/openwrt/package/Makefile
+++ b/openwrt/package/Makefile
@@ -117,6 +117,7 @@ package-$(BR2_PACKAGE_RADVD) += radvd
package-$(BR2_PACKAGE_READLINE) += readline
package-$(BR2_PACKAGE_ROBOCFG) += robocfg
package-$(BR2_PACKAGE_RP_PPPOE) += rp-pppoe
+package-$(BR2_COMPILE_RRDCOLLECT) += rrdcollect
package-$(BR2_COMPILE_RRDTOOL) += rrdtool
package-$(BR2_PACKAGE_RSYNC) += rsync
package-$(BR2_PACKAGE_SABLEVM) += sablevm
@@ -201,6 +202,7 @@ osiris-compile: openssl-compile
portmap-compile: tcp_wrappers-compile
postgresql-compile: zlib-compile
quagga-compile: readline-compile ncurses-compile
+rrdcollect-compile: rrdtool-compile
rrdtool-compile: cgilib-compile freetype-compile libart-compile libpng-compile
rsync-compile: popt-compile
screen-compile: ncurses-compile
diff --git a/openwrt/package/rrdcollect/Config.in b/openwrt/package/rrdcollect/Config.in
new file mode 100644
index 0000000000..39369914c2
--- /dev/null
+++ b/openwrt/package/rrdcollect/Config.in
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_RRDCOLLECT
+ tristate "rrdcollect - Round-Robin Database Collecting Daemon"
+ default m if CONFIG_DEVEL
+ select BR2_PACKAGE_LIBRRD
+ help
+ RRDcollect is a daemon which polls ceratin files in /proc/
+ directory, gathering data and storing it inside RRDtool's
+ database files. Being written in C should be both fast
+ and resources-friendly. Supports both scanf(3)-style
+ pattern matches and perl compatible regular expressions.
+
+ http://rrdcollect.sourceforge.net/
+
+
diff --git a/openwrt/package/rrdcollect/Makefile b/openwrt/package/rrdcollect/Makefile
new file mode 100644
index 0000000000..4bf899b512
--- /dev/null
+++ b/openwrt/package/rrdcollect/Makefile
@@ -0,0 +1,76 @@
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=rrdcollect
+PKG_VERSION:=0.2.3
+PKG_RELEASE:=1
+PKG_MD5SUM:=5e4305c612bc3cccbaf802c275c81a11
+
+PKG_SOURCE_URL:=@SF/rrdcollect
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(TOPDIR)/package/rules.mk
+
+$(eval $(call PKG_template,RRDCOLLECT,rrdcollect,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+
+$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
+ (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS) -DSOCKET_COMM" \
+ CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
+ LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
+ LIBS="-lart_lgpl_2 -lfreetype -lpng -lz" \
+ PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
+ ac_cv_func_malloc_0_nonnull=yes \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --program-prefix="" \
+ --program-suffix="" \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ $(DISABLE_NLS) \
+ $(DISABLE_LARGEFILE) \
+ --enable-shared \
+ --disable-static \
+ --enable-exec \
+ --without-rrdtool \
+ --with-librrd \
+ --without-libpcre \
+ --without-libpcap \
+ );
+ touch $@
+
+$(PKG_BUILD_DIR)/.built:
+ rm -rf $(PKG_INSTALL_DIR)
+ mkdir -p $(PKG_INSTALL_DIR)
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ all install
+ touch $@
+
+$(IPKG_RRDCOLLECT):
+ install -d -m0755 $(IDIR_RRDCOLLECT)/etc
+ install -m0644 ./files/rrdcollect.conf $(IDIR_RRDCOLLECT)/etc
+ install -d -m0755 $(IDIR_RRDCOLLECT)/etc/init.d
+ install -m0755 ./files/rrdcollect.init $(IDIR_RRDCOLLECT)/etc/init.d/rrdcollect
+ ln -sf rrdcollect $(IDIR_RRDCOLLECT)/etc/init.d/S98rrdcollect
+ install -d -m0755 $(IDIR_RRDCOLLECT)/usr/sbin
+ cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/rrdcollect $(IDIR_RRDCOLLECT)/usr/sbin/
+ $(RSTRIP) $(IDIR_RRDCOLLECT)
+ $(IPKG_BUILD) $(IDIR_RRDCOLLECT) $(PACKAGE_DIR)
+
diff --git a/openwrt/package/rrdcollect/files/rrdcollect.conf b/openwrt/package/rrdcollect/files/rrdcollect.conf
new file mode 100644
index 0000000000..dfeb7b3bf4
--- /dev/null
+++ b/openwrt/package/rrdcollect/files/rrdcollect.conf
@@ -0,0 +1,33 @@
+step = 360
+directory = /var/lib/rra
+
+file:///proc/stat
+"cpu0 %d %d %d %d" SYS.rrd:cu,cn,cs,ci
+"ctxt %u" SYS.rrd:ct
+"processes %u" SYS.rrd:fk
+"intr %u" SYS.rrd:ira
+
+file:///proc/meminfo
+#"Mem: %*d %d %d %d %d %d" SYS.rrd:mu,mf,ms,mb,mc
+"Mem: %*d %d %d %*d %d %d" SYS.rrd:mu,mf,mb,mc
+
+file:///proc/loadavg
+"%f %f %f %d/%d %*d" SYS.rrd:l1,l2,l3,pr,pt
+
+exec:///bin/df
+"/dev/mtdblock/4 %*d %d %d" SYS.rrd:us,av
+
+# LAN: vlan0, WAN: vlan1, WIFI: eth1
+file:///proc/net/dev
+" vlan0: %d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Labi,Lapi,Labo,Lapo
+" vlan1: %d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Wabi,Wapi,Wabo,Wapo
+" eth1: %d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Wibi,Wipi,Wibo,Wipo
+#" tun0: %d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:tbi,tpi,tbo,tpo
+
+file:///proc/slabinfo
+"ip_conntrack %d %*d %*d %*d %*d %*d" SYS.rrd:con
+"arp_cache %d %*d %*d %*d %*d %*d" SYS.rrd:arp
+
+file:///proc/interrupts
+" 4: %d MIPS eth1" SYS.rrd:irw
+" 5: %d MIPS eth0" SYS.rrd:ire
diff --git a/openwrt/package/rrdcollect/files/rrdcollect.init b/openwrt/package/rrdcollect/files/rrdcollect.init
new file mode 100644
index 0000000000..dafb4624eb
--- /dev/null
+++ b/openwrt/package/rrdcollect/files/rrdcollect.init
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+BIN=rrdcollect
+DEFAULT=/etc/default/$BIN
+RUN_D=/var/run
+RRA_D=/var/lib/rra
+PID_F=$RUN_D/$BIN.pid
+[ -f $DEFAULT ] && . $DEFAULT
+
+case $1 in
+ start)
+ mkdir -p $RUN_D
+ mkdir -p $RRA_D
+ $BIN $OPTIONS
+ ;;
+ stop)
+ [ -f $PID_F ] && kill $(cat $PID_F)
+ ;;
+ *)
+ echo "usage: $0 (start|stop)"
+ exit 1
+esac
+
+exit $?
diff --git a/openwrt/package/rrdcollect/ipkg/rrdcollect.conffiles b/openwrt/package/rrdcollect/ipkg/rrdcollect.conffiles
new file mode 100644
index 0000000000..991cfd27d8
--- /dev/null
+++ b/openwrt/package/rrdcollect/ipkg/rrdcollect.conffiles
@@ -0,0 +1 @@
+/etc/rrdcollect.conf
diff --git a/openwrt/package/rrdcollect/ipkg/rrdcollect.control b/openwrt/package/rrdcollect/ipkg/rrdcollect.control
new file mode 100644
index 0000000000..75eb97705b
--- /dev/null
+++ b/openwrt/package/rrdcollect/ipkg/rrdcollect.control
@@ -0,0 +1,12 @@
+Package: rrdcollect
+Priority: optional
+Section: admin
+Maintainer: Oliver Ertl <oliver@ertl-net.net>, OpenWrt Developers <bugs@openwrt.org>
+Source: http://openwrt.org/cgi-bin/viewcvs.cgi/openwrt/package/rrdcollect/
+Depends: librrd
+Description: Round-Robin Database Collecting Daemon
+ RRDcollect is a daemon which polls ceratin files in /proc/
+ directory, gathering data and storing it inside RRDtool's
+ database files. Being written in C should be both fast
+ and resources-friendly. Supports both scanf(3)-style
+ pattern matches and perl compatible regular expressions.