collected: (#2010)
authorOliver Ertl <oliver@ertl-net.net>
Sun, 15 Jul 2007 19:43:45 +0000 (19:43 +0000)
committerOliver Ertl <oliver@ertl-net.net>
Sun, 15 Jul 2007 19:43:45 +0000 (19:43 +0000)
 * Add restart() function to the init script
 * Add a config file
 * Cleanup Makefile
 * Update: 3.5.1 > 3.11.5

SVN-Revision: 7980

utils/collectd/Makefile
utils/collectd/files/collectd.conf [new file with mode: 0644]
utils/collectd/files/collectd.init

index 507b2f1..1d530b1 100644 (file)
@@ -9,13 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=collectd
-PKG_VERSION:=3.5.1
-PKG_RELEASE:=1
+PKG_VERSION:=3.11.5
+PKG_RELEASE:=2
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://verplant.org/collectd/files
-PKG_MD5SUM:=46a4b81e46d3bb58faab1d603649d737
-PKG_CAT:=zcat
+PKG_MD5SUM:=7a3e47ccaed2eb1d03f91c82a1406e8d
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
@@ -25,42 +24,63 @@ include $(INCLUDE_DIR)/package.mk
 define Package/collectd
   SECTION:=utils
   CATEGORY:=Utilities
+  DEPENDS=+libgcc
   TITLE:=Lightweight system statistics collection daemon
+  DESCRIPTION:=\
+       collectd is a small daemon which collects system information periodically \\\
+       and provides mechanismns to store the values in a variety of ways.
   URL:=http://verplant.org/collectd/
 endef
 
-define Build/Compile
-       $(call Build/Configure/Default, \
-               --disable-debug \
-               --enable-cpu \
-               --enable-load \
-               --enable-memory \
-               --enable-ping \
-               --enable-traffic \
-               --disable-cpufreq \
-               --disable-disk \
-               --disable-hddtemp \
-               --disable-nfs \
-               --disable-processes \
-               --disable-sensors \
-               --disable-serial \
-               --disable-swap \
-               --disable-tape \
-               --disable-users \
-       )
+define Package/collectd/conffiles 
+/etc/collectd.conf 
 endef
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
-endef
+CONFIGURE_ARGS += \
+       --disable-debug \
+       --enable-daemon \
+       --enable-getifaddrs \
+       --disable-apache \
+       --disable-apcups \
+       --disable-apple_sensors \
+       --disable-battery \
+       --enable-cpu \
+       --disable-cpufreq \
+       --enable-disk \
+       --enable-df \
+       --disable-dns \
+       --disable-email \
+       --disable-quota \
+       --disable-hddtemp \
+       --enable-load \
+       --disable-mbmon \
+       --enable-memory \
+       --disable-multimeter \
+       --disable-mysql \
+       --disable-nfs \
+       --disable-ntpd \
+       --enable-ping \
+       --enable-processes \
+       --disable-sensors \
+       --enable-serial \
+       --disable-swap \
+       --disable-tape \
+       --enable-traffic \
+       --disable-users \
+       --disable-vserver \
+       --enable-wireless
+
+MAKE_FLAGS += \
+       DESTDIR="$(PKG_INSTALL_DIR)" \
+       all install
 
 define Package/collectd/install
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/collectd $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/collectd $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/usr/lib/collectd
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/collectd/*.so $(1)/usr/lib/collectd/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/collectd/*.so $(1)/usr/lib/collectd/
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_CONF) ./files/collectd.conf $(1)/etc/
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/collectd.init $(1)/etc/init.d/collectd
 endef
diff --git a/utils/collectd/files/collectd.conf b/utils/collectd/files/collectd.conf
new file mode 100644 (file)
index 0000000..56bb3fc
--- /dev/null
@@ -0,0 +1,54 @@
+#
+# collectd(1) config for OpenWrt.
+# Please read collectd.conf(5) for a list of options.
+# http://collectd.org/
+#
+
+# Select one of the following modes:
+# In client mode the daemon collects the data locally and sends its results
+# to one or more network addresses. This is the default mode.
+Mode Client
+# In the log mode, data is collected locally and written in
+# text files that reside in DataDir. Be careful as it could fill
+# the memory of your device with Datadir pointing to /tmp.
+#Mode Log
+
+# Set the IP-address(es) and UDP-port(s) to send packets to. 
+# The port option is optional.
+#Server ff18::efc0:4a42 25826
+#Server 239.192.74.66 25826
+
+DataDir   /var/lib/collectd
+PIDFile   /var/run/collectd.pid
+PluginDir /usr/lib/collectd
+
+LoadPlugin cpu
+LoadPlugin disk
+LoadPlugin df
+LoadPlugin load
+LoadPlugin memory
+#LoadPlugin ping
+#LoadPlugin processes
+#LoadPlugin serial
+LoadPlugin traffic
+LoadPlugin wireless
+
+#<Plugin df>
+#      FSType tmpfs
+#      IgnoreSelected true
+#</Plugin>
+
+#<Plugin ping>
+#      Host host.foo.bar
+#</Plugin>
+
+#<Plugin processes>
+#      Process name
+#</Plugin>
+
+#<Plugin traffic>
+#      Interface lo
+#      Interface imq0
+#      Interface wifi
+#      IgnoreSelected true
+#</Plugin>
index 34886f7..4ec4771 100755 (executable)
@@ -23,3 +23,7 @@ start() {
 stop() {
        kill $(cat "$PIDFILE") 2>/dev/null
 }
+
+restart() {
+       start
+}