]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Done a whole rework on the collectd config. Added changes to Core38.
authorChristian Schmidt <maniacikarus@ipfire.org>
Sun, 25 Apr 2010 10:41:35 +0000 (12:41 +0200)
committerChristian Schmidt <maniacikarus@ipfire.org>
Sun, 25 Apr 2010 10:41:35 +0000 (12:41 +0200)
Collectd now is able to drop not needed statistics and since we don t
use them all, we can drop them and save a whole lot of space on disk
and in system memory. Added an custom file to give the users changes
a place to be stored.

config/collectd/collectd.conf
config/rootfiles/common/collectd
config/rootfiles/core/38/update.sh
make.sh

index b0166e5d639b301f136e2d6befe0c0673ecae5d7..0c9aa12e55b7d17bb52425d20cf90aab9d3350b9 100644 (file)
@@ -10,7 +10,7 @@ PIDFile     "/var/run/collectd.pid"
 PluginDir   "/usr/lib/collectd"
 TypesDB     "/usr/share/collectd/types.db"
 Interval     30
-ReadThreads  3
+ReadThreads  1
 
 LoadPlugin cpu
 #LoadPlugin cpufreq
@@ -27,6 +27,9 @@ LoadPlugin sensors
 LoadPlugin swap
 LoadPlugin syslog
 #LoadPlugin wireless
+LoadPlugin match_regex
+
+include "/etc/collectd.precache"
 
 <Plugin interface>
        Interface "lo"
@@ -87,3 +90,4 @@ LoadPlugin syslog
 </Plugin>
 
 #include "/etc/collectd.thermal"
+include "/etc/collectd.custom"
\ No newline at end of file
index 0fe7afc037263aa84335e841a6bb83045c3f7c22..fd20d068eec863d4d6d44e925716fda5a0f1e0a1 100644 (file)
@@ -1,4 +1,6 @@
 etc/collectd.conf
+etc/collectd.custom
+etc/collectd.precache
 etc/collectd.thermal
 etc/rc.d/rc0.d/K50collectd
 etc/rc.d/rc3.d/S21collectd
index 769ba1500fba296aab08ef9903d68f836428014f..095d7ba2aa80fad63c8706ba08907d0ddd913768 100644 (file)
@@ -68,6 +68,7 @@ rm -rf /lib/modules/*-ipfire
 #
 # Stop Sevices
 #
+/etc/init.d/collectd stop
 /etc/init.d/squid stop
 
 #
@@ -132,6 +133,31 @@ grub-install --no-floppy ${ROOT::`expr length $ROOT`-1} --recheck
 #
 perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
 #
+# Delete old lm-sensor modullist...
+#
+rm -rf /etc/sysconfig/lm_sensors
+#
+# Cleanup Collectd statistics...
+#
+PRECLEAN=`du -sh /var/log/rrd/collectd`
+#
+rm -rf /var/log/rrd*/collectd/localhost/processes-*/ps_count*
+rm -rf /var/log/rrd*/collectd/localhost/processes-*/ps_pagefaults*
+rm -rf /var/log/rrd*/collectd/localhost/processes-*/ps_stacksize*
+rm -rf /var/log/rrd*/collectd/localhost/processes-*/ps_state*
+rm -rf /var/log/rrd*/collectd/localhost/processes-*/ps_vm*
+#
+rm -rf /var/log/rrd*/collectd/localhost/interface/if_errors*
+rm -rf /var/log/rrd*/collectd/localhost/interface/if_packets*
+#
+rm -rf /var/log/rrd*/collectd/localhost/disk-*/disk_merged*
+rm -rf /var/log/rrd*/collectd/localhost/disk-*/disk_ops*
+rm -rf /var/log/rrd*/collectd/localhost/disk-*/disk_time*
+POSTCLEAN=`du -sh /var/log/rrd/collectd`
+#
+echo Cleaned up collectd directory from $PRECLEAN to $POSTCLEAN size.
+#
+#
 # Todo: rebuild qosscript if enabled...
 #
 #
@@ -141,10 +167,7 @@ perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
 # Start Sevices
 #
 /etc/init.d/squid start
-#
-# Delete old lm-sensor modullist...
-#
-rm -rf /etc/sysconfig/lm_sensors
+/etc/init.d/collectd start
 #
 # This core-update need a reboot
 /usr/bin/logger -p syslog.emerg -t core-upgrade-38 "Upgrade finished. If you use a customized grub.cfg"
diff --git a/make.sh b/make.sh
index f84a5bd826184c1eeb93b9191bd8394a804d22c2..a36a4a86c957a69ba41fe506317417adb85cf220 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -32,6 +32,7 @@ SLOGAN="www.ipfire.org"                                               # Software slogan
 CONFIG_ROOT=/var/ipfire                                                # Configuration rootdir
 NICE=10                                                                # Nice level
 MAX_RETRIES=1                                                  # prefetch/check loop
+BUILD_IMAGES=1                                                 # Build USB, Flash and Xen Images
 KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'`
 MACHINE=`uname -m`
 GIT_TAG=$(git tag | tail -1)                                   # Git Tag
@@ -725,7 +726,7 @@ buildpackages() {
        ipfiremake cdrom ED=$IPFVER
 
   # Check if there is a loop device for building in virtual environments
-  if [ -e /dev/loop/0 ] || [ -e /dev/loop0 ]; then
+  if [ $BUILD_IMAGES && -e /dev/loop/0 ] || [ -e /dev/loop0 ]; then
        ipfiremake usb-stick ED=$IPFVER
        ipfiremake flash-images ED=$IPFVER
   fi
@@ -735,7 +736,7 @@ buildpackages() {
   ipfirepackages
 
   # Check if there is a loop device for building in virtual environments
-  if [ -e /dev/loop/0 ] || [ -e /dev/loop0 ]; then
+  if [ $BUILD_IMAGES && -e /dev/loop/0 ] || [ -e /dev/loop0 ]; then
         cp -f $BASEDIR/packages/linux-xen-*.ipfire $LFS/install/packages/
         cp -f $BASEDIR/packages/meta-linux-xen $LFS/install/packages/
        ipfiremake xen-image ED=$IPFVER