diff options
author | nico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-08-14 02:57:28 +0000 |
---|---|---|
committer | nico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-08-14 02:57:28 +0000 |
commit | ad5a144e9f567717513d0de7d93c7e5a83a3b8f0 (patch) | |
tree | b2de25c13b8754fbea16eff78d905a630587dae0 /package/rrdcollect/files | |
parent | 8ad8b95dcc1401f37beccafceb54b27bfe710c4f (diff) |
add rrdcollect package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1653 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/rrdcollect/files')
-rw-r--r-- | package/rrdcollect/files/rrdcollect.conf | 33 | ||||
-rw-r--r-- | package/rrdcollect/files/rrdcollect.init | 24 |
2 files changed, 57 insertions, 0 deletions
diff --git a/package/rrdcollect/files/rrdcollect.conf b/package/rrdcollect/files/rrdcollect.conf new file mode 100644 index 0000000000..dfeb7b3bf4 --- /dev/null +++ b/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/package/rrdcollect/files/rrdcollect.init b/package/rrdcollect/files/rrdcollect.init new file mode 100644 index 0000000000..dafb4624eb --- /dev/null +++ b/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 $? |