summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e5a6da4)
raw | patch | inline | side by side (parent: e5a6da4)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 17 May 2012 13:41:38 +0000 (15:41 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 17 May 2012 13:41:38 +0000 (15:41 +0200) |
… explaining how to get rid of out-dated data files (e.g. RRD files).
debian/README.Debian | patch | blob | history | |
debian/changelog | patch | blob | history |
diff --git a/debian/README.Debian b/debian/README.Debian
index 7513ac293a30b96e62e8dbafaadbcaead0cec2a6..fbbb43f5d475429d6dae1e8f0fc9ad8e8cb466ca 100644 (file)
--- a/debian/README.Debian
+++ b/debian/README.Debian
with collectd. See /usr/share/doc/collectd/examples/collection3/README for
details. This is a successor for collection.cgi.
+Cleanup of old data:
+--------------------
+
+collectd itself does not take care of removing any data files (e.g. RRDtool)
+that are no longer updated (e.g., no longer existing hosts or instances).
+There are a couple of ways to take care of that. In any case, double-check the
+list of files to be removed before doing so! We do not take responsibility for
+any data loss or similar.
+
+- Check the last modification time of all RRD files:
+
+ find /var/lib/collectd/rrd/ -mtime +30 -type f
+
+ This will list all files that have not been updated within the last 30 days.
+ After double-checking the list of files, use a command like the following to
+ delete old files:
+
+ find /var/lib/collectd/rrd/ -mtime +30 -type f | xargs rm
+
+ NOTE: Some versions of RRDtool did not update mtime when writing to a file.
+ This has been fixed in version 1.3.5 of RRDtool. If your version is
+ affected by that, this approach does not work.
+
+- Check the 'last_update' header of the RRD files:
+
+ export IFS="
+ "
+ for file in $( find /var/lib/collectd/rrd/ -type f -name '*.rrd' ); do
+ last_update=$( rrdtool info $file | grep last_update | cut -d' ' -f3 )
+ if test -n "$last_update" \
+ -a $(( $( date +%s ) - $last_update )) -gt 2592000; then
+ echo $file
+ fi
+ done
+
+ This will also list all files that have not been updated within the last 30
+ days. It's a bit more expensive since each and every RRD file will have to
+ be read from disk rather than checking the file-system meta-data only.
+
+When doing those checks, take into account any caching times configured in the
+RRDtool plugin or when using RRDCacheD.
+
Building your own plugins:
--------------------------
diff --git a/debian/changelog b/debian/changelog
index 43a9012c8b581e18424d9482ae284f94d99c7f14..9d17e279a79d313bc0b9dd12d45af9a613d947be 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
- Use dpkg-buildflags to determine compiler/linker flags; this also
enables hardening build flags; thanks to Moritz Muehlenhoff for
providing the patch (Closes: #656271).
+ * debian/README.Debian:
+ - Added section 'Cleanup of old data' explaining how to get rid of
+ out-dated data files (e.g. RRD files).
- -- Sebastian Harl <tokkee@debian.org> Tue, 14 Feb 2012 08:05:43 +0100
+ -- Sebastian Harl <tokkee@debian.org> Thu, 17 May 2012 15:39:49 +0200
collectd (4.10.4-1) unstable; urgency=low