--- collectd-4.6.2.orig/debian/collectd.templates +++ collectd-4.6.2/debian/collectd.templates @@ -0,0 +1,26 @@ +Template: collectd/migration-3-4 +Type: note +_Description: Layout of RRD files has changed + The layout of the RRD files created by collectd has changed significantly + since version 3.x. In order to keep your old data you have to migrate it. + This can be done by using /usr/lib/collectd/utils/migrate-3-4.px. + . + This step requires both the perl and the rrdtool packages to be installed, + which is currently not the case. You need to perform the migration manually. + . + See /usr/share/doc/collectd/NEWS.Debian for details. + +Template: collectd/auto-migrate-3-4 +Type: boolean +Default: false +_Description: Automatically try to migrate your RRD files? + The layout of the RRD files created by collectd has changed significantly + since version 3.x. In order to keep your old data you have to migrate it. + This can be done by using /usr/lib/collectd/utils/migrate-3-4.px. + . + This step can be done automatically. In this case a backup of + /var/lib/collectd/ is made in /var/backups/. This script is still + experimental, though. Do not expect it to work in all cases. + . + See /usr/share/doc/collectd/NEWS.Debian for details. + --- collectd-4.6.2.orig/debian/collectd.default +++ collectd-4.6.2/debian/collectd.default @@ -0,0 +1,18 @@ +# /etc/default/collectd + +# 0: start collectd on boot, 1: do not start collectd on boot +# default: 0 +DISABLE=0 + +# 0: start collectd in stand-alone mode, 1: monitor collectd using collectdmon +# default: 1 +USE_COLLECTDMON=1 + +# number of seconds to wait for collectd to shut down +# default: 30 +MAXWAIT=30 + +# 0: do not enable core-files, 1: enable core-files ... if collectd crashes +# default: 0 +ENABLE_COREFILES=0 + --- collectd-4.6.2.orig/debian/collectd-dev.install +++ collectd-4.6.2/debian/collectd-dev.install @@ -0,0 +1,3 @@ +src/liboconfig/oconfig.h usr/include/collectd/liboconfig +src/*.h usr/include/collectd + --- collectd-4.6.2.orig/debian/rules +++ collectd-4.6.2/debian/rules @@ -0,0 +1,159 @@ +#! /usr/bin/make -f +# debian/rules for collectd +# +# Written by Sebastian Harl . + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +CPPFLAGS = -I$(CURDIR)/debian/include +CFLAGS = -Wall -g + +# There is no way to tell lt_dlopen() to use the RTLD_GLOBAL flag which is +# however required by the perl plugin (which would otherwise be unable to find +# symbols defined in libperl when loading perl modules that require such +# symbols). This is a workaround for this issue. +CPPFLAGS += -DLT_LAZY_OR_NOW='RTLD_LAZY|RTLD_GLOBAL' + +# Upstream defaults to ${sysconfdir}/collectd.conf. Setting ${sysconfdir} to +# /etc/collectd would be wrong though. +CPPFLAGS += -UCONFIGFILE +CPPFLAGS += -DCONFIGFILE='\"/etc/collectd/collectd.conf\"' + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +include /usr/share/dpatch/dpatch.make + +confflags = --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \ + --mandir=\$${prefix}/share/man \ + --localstatedir=/var --sysconfdir=/etc \ + --with-perl-bindings="INSTALLDIRS=vendor" \ + --disable-onewire \ + --disable-xmms \ + --without-libstatgrab + +# These plugins do not provide any functionality under Linux. +confflags += --disable-apple_sensors --disable-tape + +# The static library netstat cannot be linked into shared objects on some +# architectures (see bugs #358637 and #419684 for more details). +ifneq (,$(findstring $(DEB_BUILD_ARCH),alpha amd64 hppa ia64 ppc64)) + confflags += --disable-netlink +endif + +# libvirt is only available on amd64, i386 and powerpc. +ifeq (,$(findstring $(DEB_BUILD_ARCH),amd64 i386 powerpc)) + confflags += --disable-libvirt +endif + +config.status: configure $(DPATCH_STAMPFN) + dh_testdir + CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" ./configure $(confflags) + +build: build-stamp + +build-stamp: config.status + dh_testdir + + $(MAKE) + perl ./debian/bin/check_plugins.pl + + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + + [ ! -f Makefile ] || $(MAKE) distclean + + rm -f debian/README.Debian.plugins + rm -f src/*.1 src/*.5 + + dh_clean + debconf-updatepo + +install-indep: + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs -i + dh_install -i + +install-arch: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs -a + + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp + + rm -f debian/tmp/usr/lib/collectd/*.la + rm -f debian/tmp/etc/collectd.conf + + dh_install -a --sourcedir=$(CURDIR)/debian/tmp --fail-missing + + perl ./debian/bin/gen_plugin_deps.pl + + mkdir -p debian/collectd/usr/share/lintian/overrides/ + cp debian/collectd.overrides \ + debian/collectd/usr/share/lintian/overrides/collectd + +binary-indep: install-indep + dh_testdir + dh_testroot + dh_installchangelogs -i ChangeLog + dh_installdocs -A -i debian/README.Debian AUTHORS README TODO + dh_installexamples -i contrib/examples/myplugin.c \ + contrib/examples/MyPlugin.pm + dh_compress -i -Xexamples/ + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +binary-arch: build install-arch + dh_testdir + dh_testroot + dh_installchangelogs -a ChangeLog + dh_installdocs -A -a debian/README.Debian AUTHORS README TODO + dh_installdocs -a debian/NEWS.Debian debian/README.Debian.plugins + dh_installexamples -a contrib/collectd2html.pl contrib/collection.cgi \ + contrib/collection3/ \ + contrib/exec-munin.conf contrib/exec-munin.px contrib/exec-smartctl \ + contrib/exec-nagios.conf contrib/exec-nagios.px \ + contrib/SpamAssassin/ contrib/iptables/ contrib/cussh.pl \ + contrib/snmp-data.conf contrib/add_rra.sh contrib/network-proxy.py \ + contrib/snmp-probe-host.px + dh_installdebconf -a + dh_installinit -a -- defaults 95 + dh_link -a + dh_strip -a --dbg-package=collectd-dbg + dh_compress -a -Xexamples/ + dh_fixperms -a + dh_makeshlibs -a + dh_installdeb -a + dpkg-shlibdeps -Tdebian/collectd.substvars \ + -dDepends debian/collectd/usr/bin/* debian/collectd/usr/sbin/* \ + debian/collectd/usr/lib/collectd/rrdtool.so \ + -dRecommends debian/collectd/usr/lib/collectd/*.so + dh_shlibdeps -a -Ncollectd + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-arch binary-indep +.PHONY: build clean binary-indep binary-arch binary install-indep install-arch + --- collectd-4.6.2.orig/debian/libcollectdclient0.symbols +++ collectd-4.6.2/debian/libcollectdclient0.symbols @@ -0,0 +1,13 @@ +libcollectdclient.so.0 libcollectdclient0 #MINVER# + lcc_connect@Base 4.6.0 + lcc_disconnect@Base 4.6.0 + lcc_flush@Base 4.6.0 + lcc_getval@Base 4.6.0 + lcc_identifier_to_string@Base 4.6.0 + lcc_listval@Base 4.6.0 + lcc_putval@Base 4.6.0 + lcc_strerror@Base 4.6.0 + lcc_string_to_identifier@Base 4.6.0 + lcc_version@Base 4.6.0 + lcc_version_extra@Base 4.6.0 + lcc_version_string@Base 4.6.0 --- collectd-4.6.2.orig/debian/collectd.config +++ collectd-4.6.2/debian/collectd.config @@ -0,0 +1,42 @@ +#! /bin/sh +# config script for collectd +# +# see: dh_installdebconf(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `configure' +# * `reconfigure' + +. /usr/share/debconf/confmodule + +case "$1" in + configure) + db_set collectd/auto-migrate-3-4 false + + if dpkg --compare-versions "$2" lt-nl "4.0.0~"; then + if perl -e '1' 2> /dev/null && rrdtool > /dev/null 2>&1; then + db_input high collectd/auto-migrate-3-4 || true + db_go || true + else + db_input high collectd/migration-3-4 || true + db_go || true + fi + fi + ;; + + reconfigure) + ;; + + *) + echo "config called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +db_stop + +exit 0 + --- collectd-4.6.2.orig/debian/collectd.install +++ collectd-4.6.2/debian/collectd.install @@ -0,0 +1,19 @@ +../../contrib/migrate-3-4.px usr/lib/collectd/utils +../../contrib/rrd_filter.px usr/lib/collectd/utils +../collectd.conf ../collection.conf ../thresholds.conf etc/collectd/ +usr/lib/collectd/*.so +usr/sbin +usr/share/collectd +usr/share/man/man1/collectdmon.1 +usr/share/man/man1/collectd.1 +usr/share/man/man3/Collectd::Unixsock.3pm +usr/share/man/man5/collectd-unixsock.5 +usr/share/man/man5/collectd-email.5 +usr/share/man/man5/collectd-exec.5 +usr/share/man/man5/collectd.conf.5 +usr/share/man/man5/collectd-snmp.5 +usr/share/man/man5/collectd-perl.5 +usr/share/man/man5/types.db.5 +usr/share/perl5 +var + --- collectd-4.6.2.orig/debian/collectd-utils.install +++ collectd-4.6.2/debian/collectd-utils.install @@ -0,0 +1,3 @@ +usr/bin/collectd-nagios +usr/share/man/man1/collectd-nagios.1 + --- collectd-4.6.2.orig/debian/collection.conf +++ collectd-4.6.2/debian/collection.conf @@ -0,0 +1,3 @@ +datadir: "/var/lib/collectd/rrd/" +libdir: "/usr/lib/collectd/" + --- collectd-4.6.2.orig/debian/collectd.conf +++ collectd-4.6.2/debian/collectd.conf @@ -0,0 +1,436 @@ +# Config file for collectd(1). +# +# Some plugins need additional configuration and are disabled by default. +# Please read collectd.conf(5) for details. +# +# You should also read /usr/share/doc/collectd/README.Debian.plugins before +# enabling any more plugins. + +#Hostname "localhost" +FQDNLookup true +#BaseDir "/var/lib/collectd" +#PluginDir "/usr/lib/collectd" +#TypesDB "/usr/lib/collectd/types.db" "/etc/collectd/my_types.db" +#Interval 10 +#ReadThreads 5 + +#LoadPlugin logfile +LoadPlugin syslog + +# +# LogLevel "info" +# File STDOUT +# Timestamp true +# + + + LogLevel info + + +#LoadPlugin apache +#LoadPlugin apcups +#LoadPlugin ascent +LoadPlugin battery +LoadPlugin cpu +#LoadPlugin cpufreq +#LoadPlugin csv +LoadPlugin df +LoadPlugin disk +#LoadPlugin dns +#LoadPlugin email +LoadPlugin entropy +#LoadPlugin exec +#LoadPlugin filecount +#LoadPlugin hddtemp +LoadPlugin interface +#LoadPlugin ipmi +#LoadPlugin iptables +#LoadPlugin ipvs +LoadPlugin irq +#LoadPlugin libvirt +LoadPlugin load +#LoadPlugin mbmon +#LoadPlugin memcached +LoadPlugin memory +#LoadPlugin multimeter +#LoadPlugin mysql +#LoadPlugin netlink +#LoadPlugin network +#LoadPlugin nfs +#LoadPlugin nginx +#LoadPlugin notify_desktop +#LoadPlugin notify_email +#LoadPlugin ntpd +#LoadPlugin nut +#LoadPlugin perl +#LoadPlugin ping +#LoadPlugin postgresql +#LoadPlugin powerdns +LoadPlugin processes +LoadPlugin rrdtool +#LoadPlugin sensors +#LoadPlugin serial +#LoadPlugin snmp +LoadPlugin swap +#LoadPlugin tail +#LoadPlugin tcpconns +#LoadPlugin teamspeak2 +#LoadPlugin thermal +#LoadPlugin unixsock +LoadPlugin users +#LoadPlugin uuid +#LoadPlugin vmem +#LoadPlugin vserver +#LoadPlugin wireless + +# +# URL "http://localhost/status?auto" +# User "www-user" +# Password "secret" +# VerifyPeer false +# VerifyHost false +# CACert "/etc/ssl/ca.crt" +# + +# +# Host "localhost" +# Port "3551" +# + +# +# URL "http://localhost/ascent/status/" +# User "www-user" +# Password "secret" +# CACert "/etc/ssl/ca.crt" +# + +# +# DataDir "/var/lib/collectd/csv" +# StoreRates false +# + +# +# Device "/dev/sda1" +# Device "192.168.0.2:/mnt/nfs" +# MountPoint "/home" +# FSType "ext3" +# IgnoreSelected false +# + +# +# Disk "hda" +# Disk "/sda[23]/" +# IgnoreSelected false +# + +# +# Interface "eth0" +# IgnoreSource "192.168.0.1" +# + +# +# SocketGroup "collectd" +# SocketPerms "0770" +# MaxConns 5 +# + +# +# Exec user "/path/to/exec" +# Exec "user:group" "/path/to/exec" +# NotificationExec user "/path/to/exec" +# + +# +# +# Instance "foodir" +# Name "*.conf" +# MTime "-5m" +# Size "+10k" +# +# + +# +# Host "127.0.0.1" +# Port 7634 +# TranslateDevicename false +# + +# +# Interface "eth0" +# IgnoreSelected false +# + +# +# Chain "table" "chain" +# + +# +# Irq 7 +# Irq 8 +# Irq 9 +# IgnoreSelected true +# + +# +# Connection "xen:///" +# RefreshInterval 60 +# Domain "name" +# BlockDevice "name:device" +# InterfaceDevice "name:device" +# IgnoreSelected false +# HostnameFormat name +# + +# +# Host "127.0.0.1" +# Port 411 +# + +# +# Host "127.0.0.1" +# Port "11211" +# + +# +# Host "database.serv.er" +# User "db_user" +# Password "secret" +# Database "db_name" +# + +# +# Interface "All" +# VerboseInterface "All" +# QDisc "eth0" "pfifo_fast-1:0" +# Class "ppp0" "htb-1:10" +# Filter "ppp0" "u32-1:0" +# IgnoreSelected false +# + +# +# Server "ff18::efc0:4a42" "25826" +# Server "239.192.74.66" "25826" +# Listen "ff18::efc0:4a42" "25826" +# Listen "239.192.74.66" "25826" +# TimeToLive "128" +# Forward false +# CacheFlush 1800 +# + +# +# URL "http://localhost/status?auto" +# User "www-user" +# Password "secret" +# VerifyPeer false +# VerifyHost false +# CACert "/etc/ssl/ca.crt" +# + +# +# OkayTimeout 1000 +# WarningTimeout 5000 +# FailureTimeout 0 +# + +# +# SMTPServer "localhost" +# SMTPPort 25 +# SMTPUser "my-username" +# SMTPPassword "my-password" +# From "collectd@main0server.com" +# # on . +# # Beware! Do not use not more than two placeholders (%)! +# Subject "[collectd] %s on %s!" +# Recipient "email1@domain1.net" +# Recipient "email2@domain2.com" +# + +# +# Host "localhost" +# Port 123 +# ReverseLookups false +# + +# +# UPS "upsname@hostname:port" +# + +# +# IncludeDir "/my/include/path" +# BaseName "Collectd::Plugin" +# EnableDebugger "" +# LoadPlugin "foo" +# LoadPlugin "bar" +# +# +# Foo "Bar" +# Qux "Baz" +# +# + +# +# Host "host.foo.bar" +# Host "host.baz.qux" +# TTL 255 +# + +# +# +# Query "SELECT magic, spells FROM wizard WHERE host = $1;" +# Param hostname +# Column gauge magic +# Column counter spells +# +# +# +# Host "hostname" +# Port 5432 +# User "username" +# Password "secret" +# +# SSLMode "prefer" +# KRBSrvName "kerberos_service_name" +# +# Query magic +# +# +# +# Service "service_name" +# +# + +# +# +# Collect "latency" +# Collect "udp-answers" "udp-queries" +# Socket "/var/run/pdns.controlsocket" +# +# +# Collect "questions" +# Collect "cache-hits" "cache-misses" +# Socket "/var/run/pdns_recursor.controlsocket" +# +# LocalSocket "/opt/collectd/var/run/collectd-powerdns" +# + +# +# Process "name" +# + + + DataDir "/var/lib/collectd/rrd" +# CacheTimeout 120 +# CacheFlush 900 +# +# The following settings are rather advanced +# and should usually not be touched: +# StepSize 10 +# HeartBeat 20 +# RRARows 1200 +# RRATimespan 158112000 +# XFF 0.1 + + +# +# Sensor "it8712-isa-0290/temperature-temp1" +# Sensor "it8712-isa-0290/fanspeed-fan3" +# Sensor "it8712-isa-0290/voltage-in8" +# IgnoreSelected false +# + +# See /usr/share/doc/collectd/examples/snmp-data.conf.gz for a +# comprehensive sample configuration. +# +# +# Type "voltage" +# Table false +# Instance "input_line1" +# Values "SNMPv2-SMI::enterprises.6050.5.4.1.1.2.1" +# +# +# Type "users" +# Table false +# Instance "" +# Values "HOST-RESOURCES-MIB::hrSystemNumUsers.0" +# +# +# Type "if_octets" +# Table true +# Instance "IF-MIB::ifDescr" +# Values "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets" +# +# +# +# Address "192.168.0.2" +# Version 1 +# Community "community_string" +# Collect "std_traffic" +# Inverval 120 +# +# +# Address "192.168.0.42" +# Version 2 +# Community "another_string" +# Collect "std_traffic" "hr_users" +# +# +# Address "192.168.0.3" +# Version 1 +# Community "more_communities" +# Collect "powerplus_voltge_input" +# Interval 300 +# +# + +# +# +# Instance "exim" +# +# Regex "S=([1-9][0-9]*)" +# DSType "CounterAdd" +# Type "ipt_bytes" +# Instance "total" +# +# +# Regex "\\" +# DSType "CounterInc" +# Type "counter" +# Instance "local_user" +# +# +# + +# +# ListeningPorts false +# LocalPort "25" +# RemotePort "25" +# + +# +# Host "127.0.0.1" +# Port "51234" +# Server "8767" +# + +# +# ForceUseProcfs false +# Device "THRM" +# IgnoreSelected false +# + +# +# SocketFile "/var/run/collectd-unixsock" +# SocketGroup "collectd" +# SocketPerms "0660" +# + +# +# UUIDFile "/etc/uuid" +# + +# +# Verbose false +# + +Include "/etc/collectd/thresholds.conf" + --- collectd-4.6.2.orig/debian/collectd.postrm +++ collectd-4.6.2/debian/collectd.postrm @@ -0,0 +1,43 @@ +#! /bin/bash +# postrm script for collectd +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge) + rm -rf /var/lib/collectd + rm -rf /etc/collectd + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + --- collectd-4.6.2.orig/debian/changelog +++ collectd-4.6.2/debian/changelog @@ -0,0 +1,538 @@ +collectd (4.6.2-1ubuntu1) karmic; urgency=low + + * Merge from debian unstable, remaining changes: + - debian/patches/upstream_fix_ftbfs.dpatch + - Fix FTBFS with gcc4.4 by cherrypicking the change from + upstream's git-repository. + * Closes LP: #373462 + + -- Andreas Moog Fri, 08 May 2009 01:45:18 +0200 + +collectd (4.6.2-1) unstable; urgency=low + + * New upstream release. + - Fixed the use of struct in6_addr (Closes: #521748). + - Added a filter infrastructure based on "matches" and "targets". + - Added support for vmem graphs to collection.cgi (Closes: #521993). + New plugins: + - bind9 name-server and zone statistics: bind + - Parse statistics from websites: curl + - Query data from a relational database: dbi + - OpenVPN traffic and compression statistics: openvpn + - Query data from an Oracle database: oracle (disabled in Debian, + libclntsh is not available) + - Write data via the RRD accelerator daemon: rrdcached (disabled in + Debian, rrdclient support is not yet available) + New matches: + - Match values by their identifier based on regular expressions: regex + - Match values with an invalid timestamp: timediff + - Select values by their data sources' values: value + New targets: + - Create and dispatch a notification: notification + - Replace parts of an identifier using regular expressions: replace + - Set (overwrite) entire parts of an identifier: set + * Uploading to unstable, since Lenny has been released. + * New debconf template translations: + - vi.po, thanks to Clytie Siddall (Closes: #515872). + - es.po, thanks to Francisco Javier Cuadrado and Erika Chacón Vivas + (Closes: #520988). + * debian/patches: + - Removed perl-uninitialized-var.dpatch - included upstream. + * debian/control: + - Added new binary packages libcollectdclient0 and libcollectdclient-dev + for the newly added client library. + - Added new binary package collectd-utils for optional utilities that pull + in additional dependencies. Currently, this only includes + collectd-nagios. The new package replaces collectd (<< 4.6.1-1~), + because it overwrites /usr/bin/collectd-nagios. + - Added libdbi0-dev to the build dependencies - this is required by the + dbi plugin. + - Moved collectd-dbg from section "utils" to the newly added "debug". + - Updated Standards-Version to 3.8.1. + * debian/rules: + - Use dh_install and *.install files to specify which package some file + belongs to. + * debian/libcollectdclient0.symbols: + - Added symbols file for libcollectdclient. + * debian/collectd.overrides: + - Override "spelling-error-in-description" for the apache plugin name - + all plugins are spelled lowercase. + * debian/collectd.init.d: + - Start the daemon using start-stop-daemon's --oknodo option to exit + successfully if the daemon is already running as requested by section + 9.3.2 of the Debian Policy 3.8.1. + * debian/copyright: + - Reference GPL-2 in addition to GPL (latest version), since GPL2-only is + used by some files. + + -- Sebastian Harl Thu, 02 Apr 2009 16:38:57 +0200 + +collectd (4.5.1-1) experimental; urgency=low + + * New upstream release. + New plugins: + - Count the number of files in directories: filecount + - Send desktop notifications to a notification daemon: notify_desktop + - Send notification E-mails: notify_email + - One-wire sensors information: onewire (experimental, disabled in Debian) + - PostgreSQL database statistics: postgresql + - Linux ACPI thermal zone information: thermal (Closes: #492580) + * Uploading to experimental because of the Lenny freeze. + * debian/control: + - Added build dependency on libglib2.0-dev and libnotify-dev required by + the notify_desktop plugin. + - Added build dependency on libesmtp-dev required by the notify_email + plugin. + - Added build dependency on libpq-dev required by the postgresql plugin. + - Let collectd-dbg and collectd-dev depend on ${misc:Depends} - this is + required when using debhelper. + * debian/rules: + - Disabled onewire plugin - owfs is not yet available in Debian. + - Install contrib/snmp-probe-host.px to /usr/share/doc/collectd/examples/. + - Set CONFIGFILE to /etc/collectd/collectd.conf. + * debian/patches: + - Added perl-uninitialized-var.dpatch - upstream patch to fix an + uninitialized variable warning causing a FTBFS because of -Werror. + - Removed myplugin_strcpy.dpatch - applied upstream. + - Removed perl_deadlock.dpatch - included upstream. + - Removed memory_libstatgrab.dpatch - included upstream. + - Removed collectd_memleak.dpatch - included upstream. + - Removed snmp_memleak.dpatch - included upstream. + - Removed memcached_fdleak.dpatch - included upstream. + - Removed memcached_timeout.dpatch - included upstream. + - Removed pod-errors.dpatch - included upstream. + * debian/collectd.overrides: + - Override "spelling-error-in-description" for the postgresql plugin name + - all plugins are spelled lowercase. + * debian/collectd.init.d: + - Do not restart collectd if the configuration test fails. + + -- Sebastian Harl Fri, 12 Dec 2008 10:09:48 +0100 + +collectd (4.4.2-3ubuntu1) jaunty; urgency=low + + * Merge from debian unstable, remaining changes: (LP: #307683) + - Add ubuntu_in6-glibc28.dpatch patch, fix FTBFS. + - Add ubuntu_hardening.dpatch patch, fix FTBFS. + - Add ubuntu_perl.c.dpatch, fix FTBFS. + + -- Bhavani Shankar Sat, 20 Dec 2008 05:33:07 +0530 + +collectd (4.4.2-3) unstable; urgency=low + + * New debconf template translation: + - nl.po, thanks to Eric Spreen (Closes: #502204). + - sv.po, thanks to Martin Bagge (Closes: #504248). + * debian/patches: + - Added pod-errors.dpatch to fix some minor POD errors. + * debian/rules: + - Remove generated manpages in the clean target to avoid cluttering the + source diff with the rebuilt manpages. + * debian/collectd.conf: + - Fixed a wrong type used in the "tail" plugin example. + + -- Sebastian Harl Sat, 06 Dec 2008 16:53:25 +0100 + +collectd (4.4.2-2ubuntu1) jaunty; urgency=low + + * Merge from Debian unstable (LP: #298828). Remaining Ubuntu changes: + * Add ubuntu_in6-glibc28.dpatch patch, fix FTBFS. + * Add ubuntu_hardening.dpatch patch, fix FTBFS. + * Add ubuntu_perl.c.dpatch, fix FTBFS. + + -- Morten Kjeldgaard Tue, 18 Nov 2008 15:54:20 +0100 + +collectd (4.4.2-2) unstable; urgency=low + + * Removed the work around for #474087 (broken openipmi .pc files) introduced + in 4.4.1-1 and instead build depend on libopenipmi-dev (>= 2.0.14-1~) + which includes fixed .pc files. This fixes an undefined symbol error when + loading the ipmi plugin caused by that work around (Closes: #494665). + * debian/collectd.init.d: + - The "status" command now exits with 1 if collectd is not running. + - Do not suppress output when checking the configuration with the -t + command line option. This will also show errors that don't cause + collectd to abort, e.g. failure to load plugins (Closes: #499232). + * debian/control: + - Added librrd-dev as the preferred option to the librrd2-dev build + dependency - the latter one is a virtual package since rrdtool 1.3. + * Added debian/patches/perl_deadlock.dpatch - upstream patch to fix a + possible deadlock in the perl plugin (Closes: #499179). + * Added debian/patches/memory_libstatgrab.dpatch - trivial upstream patch to + fix a typo in the libstatgrab code of the memory plugin. + * Added debian/patches/collectd_memleak.dpatch - trivial upstream patch to + fix a possible memory leak. + * Added debian/patches/snmp_memleak.dpatch - trivial upstream patch to fix a + possible memory leak in the snmp plugin. + * Added debian/patches/memcached_fdleak.dpatch - trivial upstream patch to + fix a possible file descriptor leak in the memcached plugin. + * Added debian/patches/memcached_timeout.dpatch - trivial upstream patch to + fix the timeout passed to poll(2). + + -- Sebastian Harl Thu, 18 Sep 2008 19:12:54 +0200 + +collectd (4.4.2-1) unstable; urgency=low + + * New upstream release. + * Removed librrd0-dev and libmysqlclient14-dev from the build-dependencies - + those package are no longer available since Etch. + * Removed byacc from the build-dependencies - collectd now requires bison. + * Removed libupsclient-config.sh - upstream now supports pkg-config for + libupsclient. + * Include collection3 in /usr/share/doc/collectd/examples/: + - Updated README.Debian to point the collection3's README. + - Added libconfig-general-perl to the suggested packages. + * README.Debian: Added a note about how to get collectd2html.pl working with + version 4 of collectd. + * Added debian/patches/myplugin_strcpy.dpatch - use sstrncpy() instead of + strcpy() which is poisoned in collectd.h. + * collectd.overrides: Removed shlib-with-non-pic-code for nut.so - the + plugin now links against the shared libupsclient. + * Do not compress any example files, so they may be used directly. + + -- Sebastian Harl Fri, 25 Jul 2008 19:58:58 +0200 + +collectd (4.4.1-2) unstable; urgency=low + + * Restrict libcurl4-gnutls-dev build dependency to versions which are not + affected by #488701 (Closes: #489091). + * Added linux-libc-dev (<< 2.6.25-1) as an option to the linux-libc-dev + (>= 2.6.25-4) build dependency - those versions are not affected by + #479899. + * Added build dependency on pkg-config - this is used by collectd's + configure script to check for a couple of libraries. + * Added libupsclient-config.sh to imitate libupsclient-config which is no + longer available. libupsclient-config.sh is a simple wrapper around + pkg-config. This is a workaround until upstream supports pkg-config for + libupsclient. + * Replaced nut-dev build dependency with libupsclient1-dev: + Reenabled the "nut" plugin on all architectures. + + -- Sebastian Harl Mon, 07 Jul 2008 20:45:53 +0000 + +collectd (4.4.1-1ubuntu1) intrepid; urgency=low + + * Add in6-glibc28.dpatch patch, fix FTBFS (LP: #255837). + * Add ubuntu_hardening.dpatch patch, fix FTBFS. + + -- Devid Antonio Filoni Thu, 07 Aug 2008 21:00:53 +0200 + +collectd (4.4.1-1) unstable; urgency=low + + * New upstream release. + - Fixed another issue of the sensors plugin affecting some chip types + (Closes: #468143). + - Fixed creation of "vserver" graphs in collection.cgi (Closes: #475120). + - Fixed a segfault when using libperl 5.10. + - collectd now ships libiptc itself. + New plugins: + - Ascent server statistics: ascent + - IPMI sensors information: ipmi + - PowerDNS name server statistics: powerdns + - incremental parsing of logfiles: tail + - TeamSpeak2 server statistics: teamspeak2 + - detailed virtual memory statistics: vmem + * Disable "tcpconns" plugin by default (Closes: #478759). + * Reenabled iptables plugin on all architectures (Closes: #473435). + - Added the plugin to collectd.conf. + - Added /usr/share/doc/collectd/examples/iptables/. + - Added build dependency on linux-libc-dev (>= 2.6.25-4) - that version is + required because of #479899. + * New debconf template translations: + - gl.po, thanks to Jacobo Tarrio (Closes: #482667). + * Added a work around for #474087 (broken openipmi .pc files) by forcing the + inclusion of the ipmi plugin and manually specifying the dependencies. + * Updated standards-version to 3.8.0 (no changes). + + -- Sebastian Harl Tue, 17 Jun 2008 10:35:51 +0200 + +collectd (4.3.2-1) unstable; urgency=low + + * New upstream release. + - Fixed handling of ignored sensors instances (Closes: #468143). + - Fixed reading of wireless noise values (Closes: #471788). + * Adopted patches and script to extractDS.px being renamed to rrd_filter.px. + * Clarified debconf template in respect to packages required for the data + migration (Closes: #469336). + * collectd.conf: Moved logging plugins to the top of the file. + * New debconf template translations: + - de.po, thanks to Kai Wasserbäch (Closes: #469334). + - fr.po, thanks to Florent Usseil (Closes: #468813). + - pt.po, thanks to Américo Monteiro (Closes: #469745, #472183). + * collectd.init.d: Consider the DISABLE option only when starting collectd. + * Disabled iptables plugin - libiptc is no longer available in Debian. + - Removed the plugin from collectd.conf. + - Removed /usr/share/doc/collectd/examples/iptables/. + + -- Sebastian Harl Mon, 31 Mar 2008 12:13:18 +0200 + +collectd (4.3.0-2) unstable; urgency=low + + * Added "lm-sensors" to the recommended packages and README.Debian.plugins + (this is required by the sensors plugin). + * Restrict the libvirt-dev build dependency and the libvirt plugin to amd64, + i386 and powerpc (libvirt is only available on those architectures). + * Restrict the libvirt-dev build dependency to versions >= 0.4.0-6 to make + sure Xen is supported and to fix some strange FTBFS complaining about a + missing symbol "virDomainBlockStats". + + -- Sebastian Harl Thu, 06 Mar 2008 23:37:44 +0100 + +collectd (4.3.0-1) unstable; urgency=low + + * New upstream release. + - Added basic support for monitoring by introducing notifications and + threshold checking. + - Reverse lookups can be disabled using the "ReverseLookups" option of the + ntpd plugin (Closes: #455162). + New plugins: + - Set the hostname to an unique identifier: uuid + - CPU, dist, network statistics of guest systems: libvirt + * Upload to unstable: With the latest changes to the perl plugin, all parts + of collectd are suitable for a release. + * Added libvirt-dev, libxml2-dev and libhal-dev to the build dependencies. + * Updated package description to mention the monitoring support. + * Install liboping/oping.h to collectd-dev as well. + * collectd.init.d: Optionally start collectdmon to monitor collectd. This + can be configured using the USE_COLLECTDMON variable - enabled by default. + * collectd.init.d: Added ENABLE_COREFILES option - if enabled the core file + limit will be set to unlimited - disabled by default. + * Compile collectd with -DLT_LAZY_OR_NOW='RTLD_LAZY|RTLD_GLOBAL' to force + lt_dlopen() to use the RTLD_GLOBAL flag which is required by the perl + plugin (which would otherwise be unable to find symbols defined in libperl + when loading perl modules that require such symbols). + * Disable debugging support. + * watch file: Added uversionmangle for "beta" and "-rc". + * Override "spelling-error-in-description" for the mysql plugin name - all + plugins are spelled lowercase. + + -- Sebastian Harl Tue, 19 Feb 2008 21:44:42 +0100 + +collectd (4.2.4-1) experimental; urgency=low + + * New upstream release. + * Added versioned build-dependency on dpkg-dev (>= 1.14.10); collectd FTBFS + with earlier versions because of #452262. + * Added libregexp-common-perl (required by Collectd::Unixsock) to the + suggested packages. + * Added support for the "status" command to the init script. + * Updated standards-version to 3.7.3 (no changes). + * Added --without-libstatgrab to the configure options to prevent collectd + from being linked against this library if it's available. + * Disabled xmms plugin - xmms will be removed from unstable + (Closes: #459707). + + -- Sebastian Harl Sun, 27 Jan 2008 18:34:23 +0100 + +collectd (4.2.1-1) experimental; urgency=low + + * New upstream release. + * Changed XS-Vcs-* to Vcs-*. + * Marked advanced rrdtool configuration options as such in collectd.conf. + * Added exec-munin.px, exec-munin.conf, exec-smartctl and snmp-data.conf to + /usr/share/doc/collectd/examples/. + * Moved "Homepage" field from package description to the source stanza. + + -- Sebastian Harl Wed, 21 Nov 2007 09:50:46 +0000 + +collectd (4.2.0-1) experimental; urgency=low + + * New upstream release. + - Added options to collectd2html.pl to specify host and data directory + (Closes: #438499). + - Link against a thread-safe version of librrd. + New plugins: + - IPVS connection statistics: ipvs + - Statistic of the memcached distributed caching system: memcached + - Detailed Linux network interface and routing statistics: netlink (32bit + systems only) + - Nginx (a HTTP and E-Mail server/proxy) statistics: nginx + - Values from SNMP enabled network devices: snmp + - Number of TCP connections to specific ports: tcpconns + - Bitrate and frequency of music played with XMMS: xmms + * Updated init script to wait for collectd to shut down (Closes: #422208). + * Merged all plugin packages into the collectd binary package. + * Added README.Debian.plugins and gen_plugin_deps.pl to document the plugin + dependencies. + * Added collectd.overrides to override shlib-with-non-pic-code errors of + plugins liked against static libraries which have not been linked with + -fPIC. + * Removed debian/examples/myplugin.c and debian/examples/MyPlugin.pm - they + are included in the upstream sources now. + * Added libcurl4-gnutls-dev as option to the libcurl3-gnutls-dev build + dependency. + + -- Sebastian Harl Sun, 28 Oct 2007 13:38:21 +0100 + +collectd (4.0.7-1) experimental; urgency=low + + * New upstream release. + * Disable iptables and nut plugins on hppa as well to work around a FTBFS + caused by #358637 and presumably #419684 (Closes: #430933). + * Changed collectd-dbg's section to "utils". + * Added httpd-cgi to suggested packages. + * Added documentation of the provided examples to README.Debian, thanks to + Eduard Bloch for his proposal (Closes: #434182). + + -- Sebastian Harl Fri, 31 Aug 2007 10:04:41 +0200 + +collectd (4.0.3-1) experimental; urgency=low + + * New upstream release. + + -- Sebastian Harl Tue, 19 Jun 2007 21:41:21 +0100 + +collectd (4.0.2-1) experimental; urgency=low + + * New upstream release (Closes: #428114). + - Added large file support (Closes: #422212). + - Rewrite of the plugin system to allow more flexibility by using + different types of plugins. + - Added Nagios plugin to query collectd from Nagios. + New plugins: + - Output to "comma separated values" (CSV) files: csv + - Output to RRD files: rrdtool + - IO via the network: network + - External runtime interface: unixsock + - Embedding a Perl interpreter: perl + - Logging to files, STDOUT or STDERR: logfile + - Logging to syslog: syslog + - Amount of available entropy: entropy + - Execution of external programs: exec + - Iptables statistics: iptables (32bit systems only) + - IRQ counters: irq + - UPS information: nut (32bit systems only) + * New binary package collectd-perl (linking against libperl). + - Added collectd-perl to suggested packages. + * examples/myplugin.c: Converted to the new plugin interface. + * Enabled debugging. + * Added possibility to automatically migrate RRD files to collectd-4 using + migrate-3-4.px and extractDS.px provided by upstream. + - Added extractDS_path.dpatch to set an absolute path in migrate-3-4.px. + - Using po-debconf to make translations of debconf templates possible. + * Added NEWS.Debian with notes regarding the upgrade to collectd-4. + * Updated init script to only start a single collectd process. + * Added examples/MyPlugin.pm. + * Added XS-Vcs-{Git,Browser} tags. + * Added check_plugins.pl to check the build result of all plugins. + * Do not build apple_sensors and tape plugins as they do not provide any + functionality any longer. + + -- Sebastian Harl Wed, 13 Jun 2007 18:58:34 +0100 + +collectd (3.11.2-1) experimental; urgency=low + + * New upstream release. + * Removed sensors-ignorelist.dpatch - has been merged upstream. + * Removed email-ignore-size-le-0.dpatch - has been merged upstream. + * Added watch file. + * examples/myplugin.c: Pass "-" instead of NULL to plugin_submit(). + + -- Sebastian Harl Thu, 15 Feb 2007 09:19:15 +0000 + +collectd (3.11.0-1) experimental; urgency=low + + * New upstream release. + New plugins: + - DNS traffic (query types, response codes, opcodes and traffic): dns + - E-Mail statistics (count, traffic, spam scores and checks): email + - Motherboard monitor: mbmon + - Multimeter statistics: multimeter (beta version) + * Upload to experimental because of Etch freeze. + * New binary package collectd-dns (linking against libpcap). + - Added collectd-dns to suggested packages. + * Do not split off packages introducing new recommendations or suggestions. + - Merge collectd-hddtemp into collectd. + - Add hddtemp and mbmon to suggested packages. + * Added sensors-ignorelist.dpatch: Avoid assertion in ignorelist_match () + when sensors plugin is not configured. + * Added email-ignore-size-le-0.dpatch: Ignore the size of an email if it is + less than or equal to zero. + + -- Sebastian Harl Sun, 24 Dec 2006 14:09:39 +0000 + +collectd (3.10.4-1) unstable; urgency=low + + * New upstream release. + - Fix an infinite loop in server mode if binding to a socket fails and + close the socket descriptor (Closes: #404018). + * examples/myplugin.c: Include system headers before collectd headers to + make it compile without any autoconf defines set (Closes: #401075). + + -- Sebastian Harl Fri, 22 Dec 2006 00:33:30 +0000 + +collectd (3.10.3-1) unstable; urgency=low + + * New upstream release. + * Made package binNMUable: + - Upstream assures API backward compatibility only between patch releases. + * LSBized init script. + + -- Sebastian Harl Mon, 6 Nov 2006 13:09:28 +0000 + +collectd (3.10.2-1) unstable; urgency=low + + * New upstream release. + - Retry connecting to remote host and database in ping and mysql plugins + respectively (Closes: #393742). + * Replaced libcurl3-dev build dependency with libcurl3-gnutls-dev to prevent + linking against libssl. + + -- Sebastian Harl Fri, 3 Nov 2006 15:18:17 +0000 + +collectd (3.10.1-4) unstable; urgency=low + + * Changed collectd-dbg's section and priority to "devel" and "extra" + respectively. + * Set init start sequence code to 95 to be sure to start after any daemons + that data is collected from. + + -- Sebastian Harl Thu, 5 Oct 2006 10:25:07 +0000 + +collectd (3.10.1-3) unstable; urgency=low + + * Added --oknodo to start-stop-daemon in the init script (Closes: #379703). + + -- Sebastian Harl Tue, 25 Jul 2006 18:34:55 +0200 + +collectd (3.10.1-2) unstable; urgency=low + + * Added collectd-dbg package. + + -- Sebastian Harl Sun, 23 Jul 2006 23:39:42 +0200 + +collectd (3.10.1-1) unstable; urgency=low + + * New upstream release. + * Dynamically link against external liboping. + - New binary package collectd-ping. + - Added collectd-ping to suggested packages. + * Moved config file from /usr/share/doc/collectd/examples/ to + /etc/collectd/. + + -- Sebastian Harl Sat, 22 Jul 2006 21:43:37 +0200 + +collectd (3.10.0-1) unstable; urgency=low + + * New upstream release. + New plugins: + - APC UPS's charge, load, input/output/battery voltage, etc.: apcups + - NTP daemon's local clock drift, offset to peers, etc.: ntpd + * Upstream no longer provides a debian/ directory. Thus no repackaging is + required any longer. + * Not using getifaddrs() is now the default in upstream. getifaddrs.dpatch + no longer needed. + * Added collectd-hddtemp as a suggestion to the collectd package. + + -- Sebastian Harl Sun, 9 Jul 2006 21:52:13 +0200 + +collectd (3.9.4+debian-1) unstable; urgency=low + + * Initial release (Closes: #373008). + * Removed upstream's debian/ directory from .orig.tar.gz. + * getifaddrs.dpatch: Patching src/traffic.c to read data from /proc instead + of using getifaddrs(). getifaddrs() does not seem to work correctly on + AMD64. + + -- Sebastian Harl Fri, 7 Jul 2006 15:49:42 +0200 + --- collectd-4.6.2.orig/debian/thresholds.conf +++ collectd-4.6.2/debian/thresholds.conf @@ -0,0 +1,38 @@ +# Threshold configuration for collectd(1). +# +# See the section "THRESHOLD CONFIGURATION" in collectd.conf(5) for details. + +# +# +# WarningMin 0.00 +# WarningMax 1000.00 +# FailureMin 0 +# FailureMax 1200.00 +# Invert false +# Persist false +# Instance "some_instance" +# +# +# +# Instance "eth0" +# +# DataSource "rx" +# FailureMax 10000000 +# +# +# +# +# +# Instance "idle" +# FailureMin 10 +# +# +# +# +# Instance "cached" +# WarningMin 100000000 +# +# +# +# + --- collectd-4.6.2.orig/debian/collectd.postinst +++ collectd-4.6.2/debian/collectd.postinst @@ -0,0 +1,63 @@ +#! /bin/sh +# postinst script for collectd +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +. /usr/share/debconf/confmodule + +case "$1" in + configure) + db_get collectd/auto-migrate-3-4 + if [ "$RET" = "true" ]; then + tmpdir=`mktemp -dt collectd.XXXXXXXXXX` + hostname=`hostname` + + if [ -z "$hostname" ]; then hostname="localhost"; fi + + cp -a /var/lib/collectd/ /var/backups/collectd-"$2" + /usr/lib/collectd/utils/migrate-3-4.px \ + --hostname="$hostname" --outdir="$tmpdir" | bash + + rm -rf /var/lib/collectd/ + mkdir /var/lib/collectd/ + mv $tmpdir /var/lib/collectd/rrd + chmod 0755 /var/lib/collectd/rrd + + # this is only available on Solaris using libkstat + rm -f /var/lib/collectd/rrd/$hostname/swap/swap-reserved.rrd + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +db_stop + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- collectd-4.6.2.orig/debian/control +++ collectd-4.6.2/debian/control @@ -0,0 +1,173 @@ +Source: collectd +Section: utils +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Sebastian Harl +Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.14.10), po-debconf, dpatch, bison, flex, autotools-dev, pkg-config, linux-libc-dev (>= 2.6.25-4) | linux-libc-dev (<< 2.6.25-1), libcurl4-gnutls-dev (>= 7.18.2-5) | libcurl4-gnutls-dev (<= 7.18.2-1) | libcurl3-gnutls-dev, libmysqlclient15-dev, librrd-dev | librrd2-dev, libsensors-dev, liboping-dev (>= 0.3.3), libpcap0.8-dev | libpcap-dev, libupsclient1-dev, libperl-dev, iproute-dev [!alpha !amd64 !hppa !ia64 !ppc64], libsnmp-dev | libsnmp9-dev, libvirt-dev (>= 0.4.0-6) [amd64 i386 powerpc], libxml2-dev, libhal-dev, libopenipmi-dev (>= 2.0.14-1~), libglib2.0-dev, libnotify-dev, libesmtp-dev, libpq-dev, libdbi0-dev +Build-Conflicts: libpthread-dev +Standards-Version: 3.8.1 +Homepage: http://collectd.org/ +Vcs-Git: git://git.tokkee.org/pkg-collectd.git +Vcs-Browser: http://git.tokkee.org/?p=pkg-collectd.git + +Package: collectd +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: perl, rrdtool, lm-sensors, ${shlibs:Recommends} +Suggests: collectd-dev, librrds-perl, liburi-perl, libhtml-parser-perl, + libregexp-common-perl, libconfig-general-perl, httpd-cgi, hddtemp, mbmon +Conflicts: collectd-apache, collectd-dns, collectd-hddtemp, collectd-mysql, + collectd-perl, collectd-ping, collectd-sensors +Provides: collectd-apache, collectd-dns, collectd-hddtemp, collectd-mysql, + collectd-perl, collectd-ping, collectd-sensors +Replaces: collectd-apache, collectd-dns, collectd-hddtemp, collectd-mysql, + collectd-perl, collectd-ping, collectd-sensors +Description: statistics collection and monitoring daemon + collectd is a small daemon which collects system information periodically and + provides mechanisms to monitor and store the values in a variety of ways. + Since the daemon doesn't need to startup every time it wants to update the + values it's very fast and easy on the system. Also, the statistics are very + fine grained since the files are updated every 10 seconds by default. + . + The collected information can be used to find current performance bottlenecks + (performance analysis) and predict future system load (capacity planning). + . + This package contains the main program file and the following plugins (some + of those plugins require additional libraries - for more details see + /usr/share/doc/collectd/README.Debian.plugins): + . + * Apache and lighttpd statistics provided by mod_status: apache + * APC UPS's charge, load, input/output/battery voltage, etc.: apcups + * Ascent server statistics: ascent + * battery status: battery + * bind9 name-server and zone statistics: bind + * CPU utilization: cpu + * CPU frequency: cpufreq + * output to comma separated values (CSV) files: csv + * parse statistics from websites: curl + * query data from a relational database: dbi + * disk space usage: df + * disk and partition throughput: disk + * DNS traffic information: dns + * E-Mail statistics (count, traffic, spam scores and checks): email + * amount of available entropy: entropy + * execution of external programs: exec + * count the number of files in directories: filecount + * harddisk temperature: hddtemp + * network traffic: interface + * IPMI sensors information: ipmi + * iptables statistics: iptables + * IPVS connection statistics: ipvs + * IRQ counters: irq + * CPU, dist, network statistics of guest systems: libvirt + * system load averages: load + * logging to files, STDOUT and STDERR: logfile + * motherboard monitor: mbmon + * statistics of the memcached distributed caching system: memcached + * memory usage: memory + * multimeter statistics: multimeter + * MySQL statistics provided by MySQL's "show status" command: mysql + * detailed Linux network interface and routing statistics: netlink + * IO via the network: network + * NFS utilization: nfs + * Nginx (a HTTP and E-Mail server/proxy) statistics: nginx + * send desktop notifications to a notification daemon: notify_desktop + * send notification E-mails: notify_email + * NTP daemon's local clock drift, offset to peers, etc.: ntpd + * UPS information: nut + * OpenVPN traffic and compression statistics: openvpn + * PostgreSQL database statistics: postgresql + * PowerDNS name server statistics: powerdns + * number of processes: processes + * output to RRD files: rrdtool + * embedded Perl interpreter: perl + * network latency statistics: ping + * lm_sensors information (e.g. CPU temperature, fan speeds): sensors + * serial port traffic: serial + * values from SNMP enabled network devices: snmp + * swap usage: swap + * logging to syslog: syslog + * incremental parsing of logfiles: tail + * number of TCP connections to specific ports: tcpconns + * Linux ACPI thermal zone information: thermal + * TeamSpeak2 server statistics: teamspeak2 + * external runtime interface: unixsock + * number of users logged into the system: users + * set the hostname to an unique identifier: uuid + * detailed virtual memory statistics: vmem + * system resources used by Linux-VServers: vserver + * wireless network stats: wireless + +Package: collectd-utils +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: collectd +Suggests: nagios3 | nagios2 +Replaces: collectd (<< 4.6.1-1~) +Description: statistics collection and monitoring daemon (utilities) + collectd is a small daemon which collects system information periodically and + provides mechanisms to monitor and store the values in a variety of ways. + Since the daemon doesn't need to startup every time it wants to update the + values it's very fast and easy on the system. Also, the statistics are very + fine grained since the files are updated every 10 seconds by default. + . + This package contains the following utility: + . + * collectd-nagios: Nagios plugin for querying collectd + +Package: collectd-dbg +Section: debug +Architecture: any +Priority: extra +Depends: collectd (= ${binary:Version}), ${misc:Depends} +Recommends: collectd-utils (= ${binary:Version}), + libcollectdclient0 (= ${binary:Version}) +Description: statistics collection and monitoring daemon (debugging symbols) + collectd is a small daemon which collects system information periodically and + provides mechanisms to monitor and store the values in a variety of ways. + Since the daemon doesn't need to startup every time it wants to update the + values it's very fast and easy on the system. Also, the statistics are very + fine grained since the files are updated every 10 seconds by default. + . + This package contains the debugging symbols. + +Package: collectd-dev +Architecture: all +Depends: collectd (>= ${source:Version}), collectd (<< 4.7~), ${misc:Depends} +Description: statistics collection and monitoring daemon (development files) + collectd is a small daemon which collects system information periodically and + provides mechanisms to monitor and store the values in a variety of ways. + Since the daemon doesn't need to startup every time it wants to update the + values it's very fast and easy on the system. Also, the statistics are very + fine grained since the files are updated every 10 seconds by default. + . + This package contains the development files needed to create your own + plugins. + +Package: libcollectdclient-dev +Section: libdevel +Architecture: any +Depends: libcollectdclient0 (= ${binary:Version}), ${misc:Depends} +Description: client library for collectd's control interface (development files) + libcollectdclient provides an API to access the control interface provided by + the unixsock plugin of collectd, a statistics collection and monitoring + daemon. It can be used to access values collected by collectd or dispatch new + values and notifications to the daemon. This allows for integration with + other applications such as monitoring solutions. + . + This package contains the header files and the static library. + +Package: libcollectdclient0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: collectd +Description: client library for collectd's control interface + libcollectdclient provides an API to access the control interface provided by + the unixsock plugin of collectd, a statistics collection and monitoring + daemon. It can be used to access values collected by collectd or dispatch new + values and notifications to the daemon. This allows for integration with + other applications such as monitoring solutions. + . + This package contains the shared library. + --- collectd-4.6.2.orig/debian/README.Debian.plugins.in +++ collectd-4.6.2/debian/README.Debian.plugins.in @@ -0,0 +1,17 @@ +collectd plugins on Debian +========================== + +Some plugins require additional libraries. To prevent you from having to +install dependencies that you don't actually need those libraries are +recommendations rather than dependencies. + +apt-get(8) and aptitude(8) will install recommended packages automatically by +default. If you did not disable this feature you will have everything in place +to operate all plugins. Else you have to install missing dependencies manually +(see the section "Plugin dependencies" below). + +Plugin dependencies: +-------------------- + +@PLUGIN_DEPS@ + --- collectd-4.6.2.orig/debian/collectd.init.d +++ collectd-4.6.2/debian/collectd.init.d @@ -0,0 +1,167 @@ +#! /bin/bash +# +# collectd - start and stop the statistics collection daemon +# http://collectd.org/ +# +# Copyright (C) 2005-2006 Florian Forster +# Copyright (C) 2006-2008 Sebastian Harl +# + +### BEGIN INIT INFO +# Provides: collectd +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Should-Start: $network $named $syslog $time +# Should-Stop: $network $named $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: start the statistics collection daemon +### END INIT INFO + +set -e + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +DISABLE=0 + +DESC="statistics collection and monitoring daemon" +NAME=collectd +DAEMON=/usr/sbin/collectd + +CONFIGFILE=/etc/collectd/collectd.conf +PIDFILE=/var/run/collectd.pid + +USE_COLLECTDMON=1 +COLLECTDMON_DAEMON=/usr/sbin/collectdmon +COLLECTDMON_PIDFILE=/var/run/collectdmon.pid + +MAXWAIT=30 + +# Gracefully exit if the package has been removed. +test -x $DAEMON || exit 0 + +if [ -r /etc/default/$NAME ]; then + . /etc/default/$NAME +fi + +if test "$DISABLE" != 0 -a "$1" == "start"; then + echo "$NAME has been disabled - see /etc/default/$NAME." + exit 0 +fi + +if test "$ENABLE_COREFILES" == 1; then + ulimit -c unlimited +fi + +if test "$USE_COLLECTDMON" == 1; then + _PIDFILE="$COLLECTDMON_PIDFILE" +else + _PIDFILE="$PIDFILE" +fi + +check_config() { + if ! $DAEMON -t -C "$CONFIGFILE"; then + if test -n "$1"; then + echo "$1" >&2 + fi + exit 1 + fi +} + +d_start() { + if test "$DISABLE" != 0; then + # we get here during restart + echo -n " - disabled by /etc/default/$NAME" + return 0 + fi + + check_config + + if test "$USE_COLLECTDMON" == 1; then + start-stop-daemon --start --quiet --oknodo --pidfile "$_PIDFILE" \ + --exec $COLLECTDMON_DAEMON -- -P "$_PIDFILE" -- -C "$CONFIGFILE" + else + start-stop-daemon --start --quiet --oknodo --pidfile "$_PIDFILE" \ + --exec $DAEMON -- -C "$CONFIGFILE" -P "$_PIDFILE" + fi +} + +still_running_warning=" +WARNING: $NAME might still be running. +In large setups it might take some time to write all pending data to +the disk. You can adjust the waiting time in /etc/default/collectd." + +d_stop() { + PID=$( cat "$_PIDFILE" 2> /dev/null ) || true + + start-stop-daemon --stop --quiet --oknodo --pidfile "$_PIDFILE" + + sleep 1 + if test -n "$PID" && kill -0 $PID 2> /dev/null; then + i=0 + while kill -0 $PID 2> /dev/null; do + i=$(( $i + 2 )) + echo -n " ." + + if test $i -gt $MAXWAIT; then + echo "$still_running_warning" >&2 + return 1 + fi + + sleep 2 + done + return 0 + fi +} + +d_status() { + PID=$( cat "$_PIDFILE" 2> /dev/null ) || true + + if test -n "$PID" && kill -0 $PID 2> /dev/null; then + echo "collectd ($PID) is running." + exit 0 + else + PID=$( pidof collectd ) || true + + if test -n "$PID"; then + echo "collectd ($PID) is running." + exit 0 + else + echo "collectd is stopped." + fi + fi + exit 1 +} + +case "$1" in + start) + echo -n "Starting $DESC: $NAME" + d_start + echo "." + ;; + stop) + echo -n "Stopping $DESC: $NAME" + d_stop + echo "." + ;; + status) + d_status + ;; + restart|force-reload) + echo -n "Restarting $DESC: $NAME" + check_config "Not restarting collectd." + d_stop + sleep 1 + d_start + echo "." + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 + +# vim: syntax=sh noexpandtab sw=4 ts=4 : + --- collectd-4.6.2.orig/debian/collectd.overrides +++ collectd-4.6.2/debian/collectd.overrides @@ -0,0 +1,5 @@ +collectd: shlib-with-non-pic-code usr/lib/collectd/netlink.so +collectd: spelling-error-in-description apache Apache +collectd: spelling-error-in-description mysql MySQL +collectd: spelling-error-in-description postgresql PostgreSQL + --- collectd-4.6.2.orig/debian/compat +++ collectd-4.6.2/debian/compat @@ -0,0 +1 @@ +5 --- collectd-4.6.2.orig/debian/libcollectdclient0.install +++ collectd-4.6.2/debian/libcollectdclient0.install @@ -0,0 +1,2 @@ +usr/lib/libcollectdclient.so.* + --- collectd-4.6.2.orig/debian/libcollectdclient-dev.install +++ collectd-4.6.2/debian/libcollectdclient-dev.install @@ -0,0 +1,6 @@ +usr/include/collectd/client.h usr/include/collectd +usr/include/collectd/lcc_features.h usr/include/collectd +usr/lib/pkgconfig/libcollectdclient.pc +usr/lib/libcollectdclient.la +usr/lib/libcollectdclient.so + --- collectd-4.6.2.orig/debian/watch +++ collectd-4.6.2/debian/watch @@ -0,0 +1,5 @@ +version=3 + +opts="uversionmangle=s/beta/~beta/;s/-rc/~rc/" \ +http://collectd.org/files/ collectd-(.*)\.tar\.gz + --- collectd-4.6.2.orig/debian/README.Debian +++ collectd-4.6.2/debian/README.Debian @@ -0,0 +1,153 @@ +collectd on Debian +================== + +General notes: +-------------- + +- Some plugins require additional libraries. To prevent you from having to + install dependencies that you don't actually need those libraries are + recommendations rather than dependencies. See README.Debian.plugins in the + "collectd" package for details. + +Configuring collectd: +--------------------- + +- See collectd.conf(5) for details about configuring collectd. + +Access the collected data: +-------------------------- + +collectd is able to write data to CSV (comma separated list) and RRD (round +robin database - see http://oss.oetiker.ch/rrdtool/) files. However it does +not create graphs from these files. This package contains two sample scripts +in /usr/share/doc/collectd/examples/ which can be used for this purpose. They +are meant to be a starting point for your own experiments - more sophisticated +solutions are welcome. + +- collectd2html.pl: This script by Vincent Stehlé will search for RRD files in + "/var/lib/collectd/" and generate a static HTML file and a directory + containing several PNG files which are graphs of the RRD files found. + + This script was intended to be used with version 3 of collectd but still + seems to be in use by some people. To get it working with version 4, you + have to call it once for each subdirectory containing RRD files. A sample + wrapper might look like this: + + for dir in /var/lib/collectd/rrd/$hostname/*; do + out_dir=`basename "$dir"` + mkdir -p $out_dir + ( cd $out_dir && collectd2html.pl --data-dir="$dir" ) + done + +- collection.cgi: Sample CGI script that creates graphs on the fly. The Perl + modules "RRDs" (package librrds-perl), "URI:Escape" (package liburi-perl), + "HTML::Entities" (package libhtml-parser-perl) and a CGI capable web server + (e.g. apache2 or boa) are required for this script to run. Simply install + the (gunzip'ed) script to a place where the webserver will treat it as a CGI + script (/usr/lib/cgi-bin/ by default) and visit that page in a browser + (http://localhost/cgi-bin/collection.cgi by default). Please refer to your + webserver's documentation for more details. + + Starting with version 4, collection.cgi requires a small config file, which + is installed to /etc/collectd/collection.conf. You should not need to change + anything there. + +- collection3: A graphing front-end for the RRD files created by and filled + with collectd. See /usr/share/doc/collectd/examples/collection3/README for + details. This is a successor for collection.cgi. + +Building your own plugins: +-------------------------- + +- Originally, plugins for collectd had to be written in C and linked as shared + objects. Starting with version 4.0.0, it is also possible to use plugins + written in the scripting language Perl or implemented as separate processes. + See collectd-perl(5) and collectd-exec(5) for details. + +- If you want to contribute plugins to the official distribution you should + read http://collectd.org/dev-info.shtml. + +- If you want to build C plugins for your personal use only simply install the + collectd-dev package and use /usr/share/doc/collectd-dev/examples/myplugin.c + as a starting point (Note: This is already a working example, though it does + not collect any useful data). + + The resulting file can be compiled as follows: + + gcc -DHAVE_CONFIG_H -shared -fPIC -o myplugin.so myplugin.c + + Copy myplugin.so to /usr/lib/collectd and add the following line to your + collectd config file: + + LoadPlugin myplugin + + Restart collectd and you're done. + +- The collectd-dev package also provides an example Perl plugin that can be + used as a starting point for your own development. It can be found in + /usr/share/doc/collectd-dev/examples/MyPlugin.pm (Note: This is already a + working example, though it does not collect any useful data). + + To enable the plugin, copy it to a place where Perl can find it (i.e. a + subdirectory named "Collectd/Plugin" of a directory listed in @INC) and add + the following line to the perl plugin section in your config file: + + LoadPlugin "Collectd::Plugin::MyPlugin" + + or + + BaseName "Collectd::Plugin" + LoadPlugin MyPlugin + + Restart collectd and you're done. + +Examples: +--------- + +- SpamAssassin/: This directory contains a SpamAssassin plugin which passes + statistics to collectd using the email plugin. See the embedded POD + documentation for information about setup and configuration: perldoc + Collectd.pm. + +- iptables/: This directory contains a script which will setup iptables to do + global logging of all traffic going in and out of an interface. This + information can then be collected by collectd's iptables plugin. + +- cussh.pl: "Collectd Unix Socket SHell" is a small, interactive front-end for + the unixsock plugin. See the embedded POD documentation for details: perldoc + cussh.pl. + +- exec-munin.px: Script to be used with the exec-plugin (see collectd-exec(5) + for details) which executes munin plugins, parses the output and translates + it to a format the exec-plugin understands. The features are limited - + changing the munin plugins to use the output format understood by the + exec-plugin is recommended. See the embedded POD documentation for more + details: perldoc exec-munin.px. + +- exec-smartctl: Sample script for the exec plugin. Please refer to the + documentation in the file - you will have to adapt it to your needs anyway. + +- network-proxy.py: A simple unicast proxy for collectd traffic. + +- snmp-data.conf: Sample configuration for the SNMP plugin. This config + includes a few standard definitions that you can include in your + own config using the `Include' statement (available since version 4.2.0). + The config includes some data that is defined in the IF-MIB, e. g. octet or + packet counters, UPS-MIB and whatever people have send in. If you have some + more definitions please send them in, so others can profit from it. + +- snmp-probe-host.px: Script to be used to automatically generate SNMP + configuration snippets for the "snmp" plugin. See the embedded POD + documentation for more details: perldoc snmp-probe-host.px. + +Additional helper scripts: +-------------------------- + +- add_rra.sh: Before version 3.9.0 collectd used to create a different set of + RRAs. The most detailed of these old RRAs had a one minute resolution. This + script can be used to add three more RRAs: minimum, maximum and average with + a ten second resolution and 2200 rows (~6 hours). This will make hourly + statistics much more interesting. Please note that no sanity-checking + whatsoever is performed. You can seriously screw up your RRD files if you + don't know what you're doing. + --- collectd-4.6.2.orig/debian/copyright +++ collectd-4.6.2/debian/copyright @@ -0,0 +1,364 @@ +This package was debianized by Sebastian Harl on +Wed, 10 May 2006 09:20:39 +0200. + +It was downloaded from . + +Upstream Authors: + Core Developer: + Florian Forster + + For individual credits, see AUTHORS. + +Copyright Holders (in alphabetical order): + Alessandro Iurlano + Alexander Wirt + Américo Monteiro + Andre M. Hedrick + Anthony Gialluca + Antony Dovgal + Bruno Prémont + C-Ware, Inc. + David Bacher + Doug MacEachern + Eric Spreen + Flavio Stanchina + Florent Monbillard + Florent Usseil + Florian Forster + Free Software Foundation, Inc. + Jacobo Tarrio + Jason Pepas + Juan Jose Ciarlante + Julian Anastasov + Kai Wasserbäch + Kern Sibbald + Lubos Stanek + Lyonel Vincent + Martin Bagge + Michał Mirosław + Netfilter Core Team + Niki W. Waibel + Oleg King + Pavel Shramov + Peter Holik + Peter Kese + Red Hat Inc. + Scott Garrett + Sebastian Harl + Sjoerd van der Berg + Stefan Hacker + Steven Clarke + The Regents of the University of California + Vincent Stehlé + Wensong Zhang + Wouter Gadeyne + +Licenses: + + Files bindings/perl/Collectd.pm + contrib/examples/MyPlugin.pm + contrib/examples/myplugin.c + contrib/cussh.pl + src/libcollectdclient/lcc_features.h + src/libcollectdclient/lcc_features.h.in + src/collectdmon.c + src/collectdmon.pod + src/email.c + src/notify_desktop.c + src/perl.c + src/types.db.pod + src/users.c + src/utils_cmd_flush.h + src/utils_subst.c + src/utils_subst.h + src/vserver.c + Copyright © 2006-2008 Sebastian Harl + License: GNU General Public License + + Files contrib/collectd2html.pl + src/hddtemp.c + Copyright © 2006 Vincent Stehlé + License: GNU General Public License + + File contrib/network-proxy.py + Copyright © 2007 Pavel Shramov + License: GNU General Public License + + Files contrib/php-collection/* + Copyright © 2009 Bruno Prémont + License: GNU General Public License + + File debian/include/net/ip_vs.h + Copyright © Wensong Zhang + Copyright © Julian Anastasov + Copyright © Peter Kese + Copyright © Juan Jose Ciarlante + Copyright © Wouter Gadeyne + License: GNU General Public License + + File src/apache.c + Copyright © 2006-2008 Florian Forster + Copyright © 2007 Florent Monbillard + License: GNU General Public License + + File src/apcups.c + Copyright © 2007 Florian Forster + Copyright © 2006 Anthony Gialluca + Copyright © 2000-2004 Kern Sibbald + Copyright © 1996-99 Andre M. Hedrick + License: GNU General Public License + + File src/bind.c + Copyright © 2009 Bruno Prémont + Copyright © 2009 Florian Forster + License: GNU General Public License + + Files src/collectd-perl.pod + src/logfile.c + src/match_regex.c + src/postgresql.c + src/scanner.l + src/utils_cmd_flush.c + src/utils_complain.c + src/utils_complain.h + Copyright © 2006-2009 Florian Forster + Copyright © 2007-2009 Sebastian Harl + + Files src/cpufreq.c + src/irq.c + src/multimeter.c + Copyright © 2005-2007 Peter Holik + License: GNU General Public License + + File src/filecount.c + Copyright © 2008 Alessandro Iurlano + Copyright © 2008 Florian Forster + License: GNU General Public License + + File src/ipmi.c + Copyright © 2008 Florian Forster + Copyright © 2008 Peter Holik + License: GNU General Public License + + File src/iptables.c + Copyright © 2007 Sjoerd van der Berg + License: GNU General Public License + + File src/ipvs.c + Copyright © 1997 Steven Clarke + Copyright © 1998-2004 Wensong Zhang + Copyright © 2003-2004 Peter Kese + Copyright © 2007 Sebastian Harl + License: GNU General Public License + + Files src/libiptc/* + Copyright © 1999-2008 Netfilter Core Team + License: GNU General Public License + + Files src/libvirt.c + src/uuid.c + Copyright © 2006-2008 Red Hat Inc. + License: GNU General Public License + + File src/mbmon.c + Copyright © 2006 Flavio Stanchina + License: GNU General Public License + + File src/memcached.c + Copyright © 2005,2006 Vincent Stehlé + Copyright © 2007 Antony Dovgal + License: GNU General Public License + + File src/nfs.c + Copyright © 2005, 2006 Jason Pepas + License: GNU General Public License + + File src/notify_email.c + Copyright © 2008 Oleg King + License: GNU General Public License + + File src/openvpn.c + Copyright © 2008 Doug MacEachern + Copyright © 2008 Florian Forster + License: GNU General Public License + + Files src/powerdns.c + src/utils_tail.c + src/utils_tail_match.c + src/utils_tail_match.h + Copyright © 2007-2008 C-Ware, Inc. + Copyright © 2008 Florian Forster + License: GNU General Public License + + File src/processes.c + Copyright © 2005 Lyonel Vincent + Copyright © 2006-2008 Florian Forster (Mach code) + Copyright © 2008 Oleg King + License: GNU General Public License + + File src/serial.c + Copyright © 2005, 2006 David Bacher + License: GNU General Public License + + File src/tape.c + Copyright © 2005, 2006 Scott Garrett + License: GNU General Public License + + File src/teamspeak2.c + Copyright © 2008 Stefan Hacker + Copyright © 2008 Florian Forster + License: GNU General Public License + + File src/thermal.c + Copyright © 2008 Michał Mirosław + License: GNU General Public License + + File src/utils_ignorelist.c + Copyright © 2006 Lubos Stanek + Copyright © 2008 Florian Forster + License: GNU General Public License + + File src/utils_ignorelist.h + Copyright © 2006 Lubos Stanek + License: GNU General Public License + + Files src/utils_mount.c + src/utils_mount.h + Copyright © 2005, 2006 Niki W. Waibel + License: GNU General Public License + + File src/utils_tail.h + Copyright © 2007-2008 C-Ware, Inc. + License: GNU General Public License + + All other files (except libltdl/*, src/utils_dns.* and + contrib/SpamAssassin/*): + Copyright © 2005-2009 Florian Forster + License: GNU General Public License + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, + USA. + + Some files are licensed under version 2 only, while any others allow to + use version 2 or (at your option) any later version. + +On Debian systems, the complete text of the GNU General Public License, +version 2, can be found in `/usr/share/common-licenses/GPL-2'. The complete +text of the latest version can be found in `/usr/share/common-licenses/GPL'. + + File libltdl/ltdl.c + Copyright © 1998-2001, 2003-2007 Free Software Foundation, Inc. + Originally by Thomas Tanner + License: GNU Lesser General Public License + + File libltdl/ltdl.h + Copyright © 1998-2000 Free Software Foundation, Inc. + Originally by Thomas Tanner + License: GNU Lesser General Public License + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, + USA. + +On Debian systems, the complete text of the GNU Lesser General Public License +can be found in `/usr/share/common-licenses/LGPL'. + + Parts of the file src/tcpconns.c + Copyright © 1983, 1988, 1993 The Regents of the University of California + License: BSD License + + File src/utils_dns.c + Copyright © 2002 The Measurement Factory, Inc. + Copyright © 2006 Florian Forster + License: BSD License + + File src/utils_dns.h + Copyright © 2006 Florian Forster + License: BSD License + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of The Measurement Factory nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + Files contrib/SpamAssassin/* + Copyright © 2006 Alexander Wirt + + This program is free software; you can redistribute it and/or modify it + under the the terms of either: + + a) the Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + + or + + b) the GPL (http://www.gnu.org/copyleft/gpl.html) + + Use whatever you like more. + +The Debian packaging is © 2006-2008, Sebastian Harl and +is licensed under the GPL, see above. The debconf template translations are +distributed under the same license as the package itself. + + de.po: + Copyright © 2008 Kai Wasserbäch + Copyright © 2008 Sebastian Harl + + fr.po: + Copyright © 2008 Florent Usseil + + gl.po: + Copyright © 2008 Jacobo Tarrio + + nl.po: + Copyright © 2008 Eric Spreen + + pt.po: + Copyright © 2008 Américo Monteiro + + sv.po: + Copyright © 2008 Martin Bagge + + vi.po: + Copyright © 2009 Free Software Foundation, Inc. + --- collectd-4.6.2.orig/debian/NEWS.Debian +++ collectd-4.6.2/debian/NEWS.Debian @@ -0,0 +1,55 @@ +collectd (4.2.0-1) experimental; urgency=low + + Prior to this version any plugin that has dependencies other than libc6 got + its own binary package. As the number of such packages was getting quite big + they have been merged into the "collectd" binary package and all plugin + dependencies were added as recommendations. See + /usr/share/doc/collectd/README.Debian.plugins for details. + + -- Sebastian Harl Sun, 28 Oct 2007 13:38:21 +0100 + +collectd (4.0.2-1) experimental; urgency=low + + This version introduces significant changes to the layout of the RRD files + created by collectd. In order to keep your old data you have to migrate it. + This can be done by using /usr/lib/collectd/utils/migrate-3-4.px. This + script will output a series of shell commands that should do all the work + automatically. However, depending on your setup, a couple of minor changes + might be necessary to migrate all of your data. In this case, please file a + bug report so that the necessary changes can be added to the script. The + script creates the new RRD files in /tmp/collectd-4/ which can be moved to + /var/lib/collectd/rrd/ if everything went right. + + Thus, the migration can be done like this (you might want to backup your + data before): + + /usr/lib/collectd/utils/migrate-3-4.px | bash + rm -rf /var/lib/collectd + mkdir /var/lib/collectd + mv /tmp/collectd-4 /var/lib/collectd/rrd + + Thanks to the new plugin infrastructure, the functionality to write RRD and + CSV files and the logging and networking facilities could be removed from + collectd's core and put into separate plugins, allowing more flexible + configurations. To get the behavior of collectd 3.x you have to enable the + "rrdtool" and "syslog" plugins (enabled by default) and enable and configure + the network plugin. See collectd.conf(5) for details. + + This also means that a single configuration file is sufficient and there are + no longer any different modes that need to be configured. The init script + does no longer start one collectd process for each config file found in + /etc/collectd/ but only for collectd.conf. + + Additionally, the syntax of the configuration file has changed slightly. All + strings need to be surrounded by double quotes. See collectd.conf(5) for + details. + + Please note that there is no longer the need to load any plugins on the + server side just to be able to save values submitted by clients. All + required information are automatically loaded by collectd. You only need to + load plugins which are supposed to collect data locally. + + See also: http://collectd.org/migrate-v3-v4.shtml + + -- Sebastian Harl Thu, 7 Jun 2007 17:36:58 +0200 + --- collectd-4.6.2.orig/debian/patches/collection_conf_path.dpatch +++ collectd-4.6.2/debian/patches/collection_conf_path.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## collection_conf_path.dpatch by Sebastian Harl +## +## DP: Set the path of collection.conf to /etc/collectd/. + +@DPATCH@ + +diff a/contrib/collection.cgi b/contrib/collection.cgi +--- a/contrib/collection.cgi ++++ b/contrib/collection.cgi +@@ -11,7 +11,7 @@ use URI::Escape ('uri_escape'); + use RRDs (); + use Data::Dumper (); + +-our $Config = "/etc/collection.conf"; ++our $Config = "/etc/collectd/collection.conf"; + our @DataDirs = (); + our $LibDir; + --- collectd-4.6.2.orig/debian/patches/upstream_fix_ftbfs.dpatch +++ collectd-4.6.2/debian/patches/upstream_fix_ftbfs.dpatch @@ -0,0 +1,56 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## upstream_fix_ftbfs.dpatch by Andreas Moog +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix a FTBFS with gcc4.4 by cherrypicking the change from upstream. + +@DPATCH@ +diff -urNad collectd-4.6.2~/src/ntpd.c collectd-4.6.2/src/ntpd.c +--- collectd-4.6.2~/src/ntpd.c 2009-04-14 04:25:31.000000000 +0200 ++++ collectd-4.6.2/src/ntpd.c 2009-05-08 01:35:06.000000000 +0200 +@@ -878,25 +878,33 @@ + + if (ptr->v6_flag) + { +- struct sockaddr_in6 *sa_ptr; +- sa_ptr = (struct sockaddr_in6 *) &sa; ++ struct sockaddr_in6 sa6; + +- sa_ptr->sin6_family = AF_INET6; +- sa_ptr->sin6_port = htons (123); +- memcpy (&sa_ptr->sin6_addr, &ptr->srcadr6, ++ assert (sizeof (sa) >= sizeof (sa6)); ++ ++ memset (&sa6, 0, sizeof (sa6)); ++ sa6.sin6_family = AF_INET6; ++ sa6.sin6_port = htons (123); ++ memcpy (&sa6.sin6_addr, &ptr->srcadr6, + sizeof (struct in6_addr)); +- sa_len = sizeof (struct sockaddr_in6); ++ sa_len = sizeof (sa6); ++ ++ memcpy (&sa, &sa6, sizeof (sa6)); + } + else + { +- struct sockaddr_in *sa_ptr; +- sa_ptr = (struct sockaddr_in *) &sa; ++ struct sockaddr_in sa4; + +- sa_ptr->sin_family = AF_INET; +- sa_ptr->sin_port = htons (123); +- memcpy (&sa_ptr->sin_addr, &ptr->srcadr, ++ assert (sizeof (sa) >= sizeof (sa4)); ++ ++ memset (&sa4, 0, sizeof (sa4)); ++ sa4.sin_family = AF_INET; ++ sa4.sin_port = htons (123); ++ memcpy (&sa4.sin_addr, &ptr->srcadr, + sizeof (struct in_addr)); +- sa_len = sizeof (struct sockaddr_in); ++ sa_len = sizeof (sa4); ++ ++ memcpy (&sa, &sa4, sizeof (sa4)); + } + + if (do_reverse_lookups == 0) --- collectd-4.6.2.orig/debian/patches/00list +++ collectd-4.6.2/debian/patches/00list @@ -0,0 +1,5 @@ +rrd_filter_path.dpatch +collection_conf_path.dpatch +upstream_fix_ftbfs.dpatch + + --- collectd-4.6.2.orig/debian/patches/rrd_filter_path.dpatch +++ collectd-4.6.2/debian/patches/rrd_filter_path.dpatch @@ -0,0 +1,43 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rrd_filter_path.dpatch by Sebastian Harl +## +## DP: Set the path of rrd_filter.px to /usr/lib/collectd/utils/. + +@DPATCH@ + +diff a/contrib/migrate-3-4.px b/contrib/migrate-3-4.px +--- a/contrib/migrate-3-4.px ++++ b/contrib/migrate-3-4.px +@@ -166,7 +166,7 @@ for (@Files) + my $src_ds = $src_dses->[$i]; + $dest->{'type_instance'} = $type_instances->[$i]; + $dest_filename = get_filename ($dest); +- print "./rrd_filter.px -i '$InDir/$orig_filename' -m '${src_ds}:${dst_ds}' -o '$OutDir/$dest_filename'\n"; ++ print "/usr/lib/collectd/utils/rrd_filter.px -i '$InDir/$orig_filename' -m '${src_ds}:${dst_ds}' -o '$OutDir/$dest_filename'\n"; + } + } + elsif (exists ($TypeRename{$orig->{'type'}})) +@@ -361,19 +361,19 @@ sub special_disk + $OutDirs{$dest_directory} = 1; + } + +- print "./rrd_filter.px -i '$InDir/$orig_filename' -m 'rmerged:read' -m 'wmerged:write' -o '$OutDir/$dest_filename'\n"; ++ print "/usr/lib/collectd/utils/rrd_filter.px -i '$InDir/$orig_filename' -m 'rmerged:read' -m 'wmerged:write' -o '$OutDir/$dest_filename'\n"; + + $dest->{'type'} = 'disk_octets'; + $dest_filename = get_filename ($dest); +- print "./rrd_filter.px -i '$InDir/$orig_filename' -m 'rbytes:read' -m 'wbytes:write' -o '$OutDir/$dest_filename'\n"; ++ print "/usr/lib/collectd/utils/rrd_filter.px -i '$InDir/$orig_filename' -m 'rbytes:read' -m 'wbytes:write' -o '$OutDir/$dest_filename'\n"; + + $dest->{'type'} = 'disk_ops'; + $dest_filename = get_filename ($dest); +- print "./rrd_filter.px -i '$InDir/$orig_filename' -m 'rcount:read' -m 'wcount:write' -o '$OutDir/$dest_filename'\n"; ++ print "/usr/lib/collectd/utils/rrd_filter.px -i '$InDir/$orig_filename' -m 'rcount:read' -m 'wcount:write' -o '$OutDir/$dest_filename'\n"; + + $dest->{'type'} = 'disk_time'; + $dest_filename = get_filename ($dest); +- print "./rrd_filter.px -i '$InDir/$orig_filename' -m 'rtime:read' -m 'wtime:write' -o '$OutDir/$dest_filename'\n"; ++ print "/usr/lib/collectd/utils/rrd_filter.px -i '$InDir/$orig_filename' -m 'rtime:read' -m 'wtime:write' -o '$OutDir/$dest_filename'\n"; + } + + sub exit_usage --- collectd-4.6.2.orig/debian/bin/check_plugins.pl +++ collectd-4.6.2/debian/bin/check_plugins.pl @@ -0,0 +1,158 @@ +#! /usr/bin/perl -- +# +# collectd - check_plugins.pl +# Copyright (C) 2006, 2007 Sebastian Harl +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; only version 2 of the License is applicable. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Author: +# Sebastian Harl + +# This script checks each plugin and reports the address of each plugin's +# registered functions. It uses src/.libs/*.so for its checks. This can be +# used to check what kind of operations each plugin supports after it has been +# built. + +use strict; +use warnings; + +my $srcdir = 'src/'; +my $libdir = 'src/.libs'; + +my $plugins = {}; + +my ($srcs, $libs) = (undef, undef); + +if (! opendir($srcs, $srcdir)) { + print STDERR "Could not open directory '$srcdir': $!\n" + . "Make sure you are in the toplevel source directory.\n"; + exit 1; +} + +while (my $dirent = readdir($srcs)) { + if ($dirent !~ m/^(.*)\.c$/) { + next; + } + + my $name = $1; + my $src = undef; + + if (! open($src, "<", "$srcdir/$dirent")) { + print STDERR "Unable to open '$srcdir/$dirent': $!\n"; + next; + } + + while (my $line = <$src>) { + if ($line =~ m/plugin_register_(\w+)\s*\("([^"]+)",\s*(\w+)/) { + my ($t, $n, $f) = ($1, $2, $3); + + $plugins->{$name}->{$n}->{$t} = $f; + } + } + + close($src); +} # while (my $dirent = readdir($srcs)) + +closedir($srcs); + +if (! opendir($libs, $libdir)) { + print STDERR "Could not open directory '$libdir': $!\n" + . "Make sure you ran 'make'.\n"; + exit 1; +} + +while (my $dirent = readdir($libs)) { + if ($dirent !~ m/^(.*)\.so$/) { + next; + } + + my $name = $1; + my $nm = undef; + + if (! defined $plugins->{$name}) { + print STDERR "No information available for plugin '$name'!\n"; + next; + } + + if (! open($nm, "-|", "nm $libdir/$dirent")) { + print STDERR "Unable to open pipe from nm(1): $!\n"; + next; + } + + while (my $line = <$nm>) { + if ($line !~ m/^([0-9a-fA-F]{8,}) [tT] (\w+)$/) { + next; + } + + my $adr = $1; + my $sym = $2; + + for my $n (keys %{$plugins->{$name}}) { + for my $t (keys %{$plugins->{$name}->{$n}}) { + if (defined $plugins->{$name}->{$n}->{$t} + && ($sym eq $plugins->{$name}->{$n}->{$t})) { + $plugins->{$name}->{$n}->{$t} = "0x" . $adr; + } + } + } + } + + close($nm); +} # while (my $dirent = readdir($libs)) + +closedir($libs); + +print 'plugin name config init read write log shutdown'; +print $/ . '-' x 70 . $/; + +for my $name (sort keys %$plugins) { + if (! -f "$libdir/$name.so") { + print "$name.c has not been compiled.\n"; + next; + } + + for my $n (sort keys %{$plugins->{$name}}) { + dump_plugin_data($n, $plugins->{$name}->{$n}); + } +} + +exit 0; + +sub dump_plugin_data { + my $name = shift || return; + my $funcs = shift || return; + + if (length($name) > 15) { + $name = substr($name, 0, 12) . '...'; + } + + printf '%-15s ', $name; + + foreach my $t ("config", "init", "read", "write", "log", "shutdown") { + if (! defined $funcs->{$t}) { + print '- '; + } + elsif ($funcs->{$t} =~ m/^0x[A-Fa-f0-9]{8,}$/) { + print substr($funcs->{$t}, -8, 8) . " "; + } + else { + print 'nA '; + } + } + + print $/; + return 1; +} # sub dump_plugin_data + +# vim: set sw=4 ts=4 tw=78 noexpandtab : --- collectd-4.6.2.orig/debian/bin/gen_plugin_deps.pl +++ collectd-4.6.2/debian/bin/gen_plugin_deps.pl @@ -0,0 +1,104 @@ +#! /usr/bin/perl +# +# collectd - gen_plugin_deps.pl +# Copyright (C) 2007 Sebastian Harl +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; only version 2 of the License is applicable. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Author: +# Sebastian Harl + +use strict; +use warnings; + +my $extra_deps = { + sensors => [ 'lm-sensors' ], +}; + +my $infile = "debian/README.Debian.plugins.in"; +my $outfile = "debian/README.Debian.plugins"; + +my ($ifile, $ofile); + +if (! open($ifile, "<", $infile)) { + print STDERR "Could not open file '$infile': $!\n"; + exit 1; +} + +if (! open($ofile, ">", $outfile)) { + print STDERR "Could not open file '$outfile': $!\n"; + exit 1; +} + +while (my $line = <$ifile>) { + if ($line !~ m/^\@PLUGIN_DEPS\@\n$/) { + print $ofile $line; + } + else { + print_plugin_deps($ofile); + } +} + +close($ofile); +close($ifile); + +sub print_plugin_deps +{ + my $fh = shift; + my $pdir = undef; + my $i = 0; + + my $plugindir = "debian/collectd/usr/lib/collectd/"; + + if (! opendir($pdir, $plugindir)) { + print STDERR "Could not open directory '$plugindir': $!\n"; + exit 1; + } + + foreach my $dirent (sort readdir($pdir)) { + if ($dirent !~ m/^(\w+).so$/) { + next; + } + + my $name = $1; + my $deps = `dpkg-shlibdeps -O $plugindir/$dirent`; + + chomp $deps; + + $deps =~ s/^shlibs:Depends=//; + + my @deps = grep !m/^libc6\b/, split m/, /, $deps; + + if (scalar @deps) { + if (0 < $i) { + print $fh "\n"; + } + + ++$i; + + print $fh "$name:\n"; + + if (defined $extra_deps->{$name}) { + unshift @deps, @{$extra_deps->{$name}}; + } + + foreach my $dep (@deps) { + print $fh " * $dep\n"; + } + } + } +} + +# vim: set tw=78 sw=4 ts=4 noexpandtab : + --- collectd-4.6.2.orig/debian/po/vi.po +++ collectd-4.6.2/debian/po/vi.po @@ -0,0 +1,76 @@ +# Vietnamese translation for Collect D. +# Copyright © 2009 Free Software Foundation, Inc. +# Clytie Siddall , 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: collectd 4.4.2-3\n" +"Report-Msgid-Bugs-To: collectd@packages.debian.org\n" +"POT-Creation-Date: 2008-03-12 17:35+0100\n" +"PO-Revision-Date: 2009-02-18 15:36+1030\n" +"Last-Translator: Clytie Siddall \n" +"Language-Team: Vietnamese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: LocFactoryEditor 1.8\n" + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "Layout of RRD files has changed" +msgstr "Bố trí tập tin RRD đã thay đổi" + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 ../collectd.templates:2001 +msgid "" +"The layout of the RRD files created by collectd has changed significantly " +"since version 3.x. In order to keep your old data you have to migrate it. " +"This can be done by using /usr/lib/collectd/utils/migrate-3-4.px." +msgstr "" +"Bố trí của tập tin RRD được collectd thu thập đã thay đổi nhiều kể từ phiên " +"bản 3.x. Muốn giữ lại dữ liệu cũ thì bạn cần phải nâng cấp, dùng « " +"/usr/lib/collectd/utils/migrate-3-4.px »." + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "" +"This step requires both the perl and the rrdtool packages to be installed, " +"which is currently not the case. You need to perform the migration manually." +msgstr "" +"Bước này yêu cầu cài đặt cả hai gói perl và gói rrdtool mà chưa. Bạn cần " +"phải tự làm quá trình nâng cấp này." + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 ../collectd.templates:2001 +msgid "See /usr/share/doc/collectd/NEWS.Debian for details." +msgstr "" +"Xem tài liệu Tin Tức « /usr/share/doc/collectd/NEWS.Debian » để tìm chi " +"tiết." + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "Automatically try to migrate your RRD files?" +msgstr "Tự động thử nâng cấp các tập tin RRD của bạn ?" + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "" +"This step can be done automatically. In this case a backup of /var/lib/" +"collectd/ is made in /var/backups/. This script is still experimental, " +"though. Do not expect it to work in all cases." +msgstr "" +"Bước này có thể được tự động làm. Trong trường hợp này, một bản sao của « " +"/var/lib/collectd/ » được tạo trong thư mục « /var/backups/ ». Tuy nhiên, " +"văn lệnh này vẫn còn dựa vào thí nghiệm. Không nên nhờ nó trong mọi trường " +"hợp." --- collectd-4.6.2.orig/debian/po/POTFILES.in +++ collectd-4.6.2/debian/po/POTFILES.in @@ -0,0 +1,2 @@ +[type: gettext/rfc822deb] collectd.templates + --- collectd-4.6.2.orig/debian/po/pt.po +++ collectd-4.6.2/debian/po/pt.po @@ -0,0 +1,75 @@ +# translation of collectd debconf to Portuguese +# Copyright (C) 2008 Américo Monteiro +# This file is distributed under the same license as the collectd package. +# +# Américo Monteiro , 2008. +msgid "" +msgstr "" +"Project-Id-Version: collectd 4.3.0-2\n" +"Report-Msgid-Bugs-To: collectd@packages.debian.org\n" +"POT-Creation-Date: 2008-03-12 17:35+0100\n" +"PO-Revision-Date: 2008-03-22 00:49+0000\n" +"Last-Translator: Américo Monteiro \n" +"Language-Team: Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "Layout of RRD files has changed" +msgstr "A disposição dos ficheiros RRD foi alterada" + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 ../collectd.templates:2001 +msgid "" +"The layout of the RRD files created by collectd has changed significantly " +"since version 3.x. In order to keep your old data you have to migrate it. " +"This can be done by using /usr/lib/collectd/utils/migrate-3-4.px." +msgstr "" +"A disposição dos ficheiros RRD criada pelo collectd foi alterada " +"significativamente desde a versão 3.x. De forma a manter os seus dados " +"antigos você terá que migrá-los. Isto pode ser feito usando /usr/lib/" +"collectd/utils/migrate-3-4.px." + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "" +"This step requires both the perl and the rrdtool packages to be installed, " +"which is currently not the case. You need to perform the migration manually." +msgstr "" +"Este passo necessita que ambos os pacotes perl e rrdtool estejam instalados, " +"o que não é correntemente o caso. Você precisa executar manualmente a migração." + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 ../collectd.templates:2001 +msgid "See /usr/share/doc/collectd/NEWS.Debian for details." +msgstr "Veja /usr/share/doc/collectd/NEWS.Debian para mais detalhes." + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "Automatically try to migrate your RRD files?" +msgstr "Tentar migrar automaticamente os seus ficheiros RRD?" + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "" +"This step can be done automatically. In this case a backup of /var/lib/" +"collectd/ is made in /var/backups/. This script is still experimental, " +"though. Do not expect it to work in all cases." +msgstr "" +"Este passo pode ser feito automaticamente. Neste caso uma cópia de segurança " +"de /var/lib/collectd/ é criada em /var/backups/. Este script ainda é " +"experimental. Não espere que ele funcione em todos os casos." + --- collectd-4.6.2.orig/debian/po/templates.pot +++ collectd-4.6.2/debian/po/templates.pot @@ -0,0 +1,65 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: collectd@packages.debian.org\n" +"POT-Creation-Date: 2008-03-12 17:35+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "Layout of RRD files has changed" +msgstr "" + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 ../collectd.templates:2001 +msgid "" +"The layout of the RRD files created by collectd has changed significantly " +"since version 3.x. In order to keep your old data you have to migrate it. " +"This can be done by using /usr/lib/collectd/utils/migrate-3-4.px." +msgstr "" + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "" +"This step requires both the perl and the rrdtool packages to be installed, " +"which is currently not the case. You need to perform the migration manually." +msgstr "" + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 ../collectd.templates:2001 +msgid "See /usr/share/doc/collectd/NEWS.Debian for details." +msgstr "" + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "Automatically try to migrate your RRD files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "" +"This step can be done automatically. In this case a backup of /var/lib/" +"collectd/ is made in /var/backups/. This script is still experimental, " +"though. Do not expect it to work in all cases." +msgstr "" --- collectd-4.6.2.orig/debian/po/sv.po +++ collectd-4.6.2/debian/po/sv.po @@ -0,0 +1,74 @@ +# translation of collectd.po to swedish +# Copyright (C) 2008 Martin Bagge +# This file is distributed under the same license as the collectd package. +# +# Martin Bagge , 2008. +msgid "" +msgstr "" +"Project-Id-Version: collectd\n" +"Report-Msgid-Bugs-To: collectd@packages.debian.org\n" +"POT-Creation-Date: 2008-03-12 17:35+0100\n" +"PO-Revision-Date: 2008-11-02 05:17+0100\n" +"Last-Translator: Martin Bagge \n" +"Language-Team: swedish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "Layout of RRD files has changed" +msgstr "Strukturen för RRD-filen har ändrats." + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 ../collectd.templates:2001 +msgid "" +"The layout of the RRD files created by collectd has changed significantly " +"since version 3.x. In order to keep your old data you have to migrate it. " +"This can be done by using /usr/lib/collectd/utils/migrate-3-4.px." +msgstr "" +"Strukturen för RRD-filen som collectd skapar har ändrats mycket sedan " +"version 3.x. För att behålla dina gamla data måste dessa migreras, detta kan " +"göras genom att köra '/usr/lib/collectd/utils/migrate-3-4.px'." + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "" +"This step requires both the perl and the rrdtool packages to be installed, " +"which is currently not the case. You need to perform the migration manually." +msgstr "" +"Detta steg kräver att både perl och rrdtool är installerade och så är inte " +"fallet just nu. Du måste genomföra migreringen manuellt." + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 ../collectd.templates:2001 +msgid "See /usr/share/doc/collectd/NEWS.Debian for details." +msgstr "" +"Läs även /usr/share/doc/collectd/NEWS.Debian för ytterligare information." + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "Automatically try to migrate your RRD files?" +msgstr "Vill du försöka migrera RRD-filerna automatiskt?" + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "" +"This step can be done automatically. In this case a backup of /var/lib/" +"collectd/ is made in /var/backups/. This script is still experimental, " +"though. Do not expect it to work in all cases." +msgstr "" +"Detta steg kan genomföras automatiskt, då kommer en säkerhetskopia av /var/" +"lib/collectd i /var/backups. Detta skript är dock fortfarande inte helt " +"uttestat, det kan finnas tillfällen när det inte fungerar." --- collectd-4.6.2.orig/debian/po/de.po +++ collectd-4.6.2/debian/po/de.po @@ -0,0 +1,75 @@ +# German translation of the collectd debconf template +# Copyright © 2008 Kai Wasserbäch +# Copyright © 2008 Sebastian Harl +# This file is distributed under the same license as the collectd package. +# +msgid "" +msgstr "" +"Project-Id-Version: collectd 4.3.0-1\n" +"Report-Msgid-Bugs-To: collectd@packages.debian.org\n" +"POT-Creation-Date: 2008-03-12 17:35+0100\n" +"PO-Revision-Date: 2008-03-12 23:33+0100\n" +"Last-Translator: Kai Wasserbäch \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "Layout of RRD files has changed" +msgstr "Das Layout der RRD-Dateien hat sich geändert." + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 ../collectd.templates:2001 +msgid "" +"The layout of the RRD files created by collectd has changed significantly " +"since version 3.x. In order to keep your old data you have to migrate it. " +"This can be done by using /usr/lib/collectd/utils/migrate-3-4.px." +msgstr "" +"Das Layout der von collectd erstellten RRD-Dateien hat sich seit Version 3.x " +"grundlegend geändert. Um Ihre alten Daten beizubehalten, müssen Sie diese " +"migrieren. Dies kann unter Verwendung von »/usr/lib/collectd/utils/migrate-3-" +"4.px« erreicht werden." + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "" +"This step requires both the perl and the rrdtool packages to be installed, " +"which is currently not the case. You need to perform the migration manually." +msgstr "" +"Für diesen Schritt müssen sowohl das perl- als auch das rrdtool-Paket " +"installiert sein. Da dies im Moment nicht der Fall ist, müssen Sie die " +"Migration manuell durchführen." + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 ../collectd.templates:2001 +msgid "See /usr/share/doc/collectd/NEWS.Debian for details." +msgstr "Siehe »/usr/share/doc/collectd/NEWS.Debian« für Details." + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "Automatically try to migrate your RRD files?" +msgstr "Soll eine automatische Migration Ihrer RRD-Dateien versucht werden?" + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "" +"This step can be done automatically. In this case a backup of /var/lib/" +"collectd/ is made in /var/backups/. This script is still experimental, " +"though. Do not expect it to work in all cases." +msgstr "" +"Dieser Schritt kann automatisch ausgeführt werden. Sollten Sie sich hierfür " +"entscheiden, wird eine Sicherungskopie von »/var/lib/collectd/« unter »/var/" +"backups/« erstellt. Dieses Skript ist aber noch experimentell. Erwarten " +"Sie nicht, dass es in allen Fällen problemlos funktioniert." --- collectd-4.6.2.orig/debian/po/es.po +++ collectd-4.6.2/debian/po/es.po @@ -0,0 +1,84 @@ +# collectd po-debconf translation to spanish +# Copyright (C) 2008, 2009 Software in the Public Interest +# This file is distributed under the same license as the collectd package. +# +# Changes: +# - Initial translation +# Erika Chacón Vivas , 2008 +# +# - Updates +# Francisco Javier Cuadrado , 2009 +# +# Traductores, si no conocen el formato PO, merece la pena leer la +# documentación de gettext, especialmente las secciones dedicadas a este +# formato, por ejemplo ejecutando: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Equipo de traducción al español, por favor lean antes de traducir +# los siguientes documentos: +# +# - El proyecto de traducción de Debian al español +# http://www.debian.org/intl/spanish/coordinacion +# especialmente las notas de traducción en +# http://www.debian.org/intl/spanish/notas +# +# - La guía de traducción de po's de debconf: +# /usr/share/doc/po-debconf/README-trans +# o http://www.debian.org/intl/l10n/po-debconf/README-trans +# +msgid "" +msgstr "" +"Project-Id-Version: collectd 4.4.2-3\n" +"Report-Msgid-Bugs-To: collectd@packages.debian.org\n" +"POT-Creation-Date: 2008-03-12 17:35+0100\n" +"PO-Revision-Date: 2009-03-21 23:09+0100\n" +"Last-Translator: Francisco Javier Cuadrado \n" +"Language-Team: Debian l10n Spanish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "Layout of RRD files has changed" +msgstr "Ha cambiado la distribución de los archivos RRD" + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 +#: ../collectd.templates:2001 +msgid "The layout of the RRD files created by collectd has changed significantly since version 3.x. In order to keep your old data you have to migrate it. This can be done by using /usr/lib/collectd/utils/migrate-3-4.px." +msgstr "La distribución de los archivos RRD creados por collectd ha cambiado significativamente desde la versión 3.x. Los datos antiguos se deben migrar para que se puedan seguir utilizando. Puede hacer esto utilizando el programa «/usr/lib/collectd/utils/migrate-3-4.px». " + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "This step requires both the perl and the rrdtool packages to be installed, which is currently not the case. You need to perform the migration manually." +msgstr "Actualmente no tiene instalados los paquetes perl y rrdtool, que son necesarios para poder llevar a cabo este paso. Tendrá que realizar la migración manualmente." + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 +#: ../collectd.templates:2001 +msgid "See /usr/share/doc/collectd/NEWS.Debian for details." +msgstr "Vea el archivo «/usr/share/doc/collectd/NEWS.Debian» para más detalles." + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "Automatically try to migrate your RRD files?" +msgstr "¿Desea migrar automáticamente los archivos RRD?" + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "This step can be done automatically. In this case a backup of /var/lib/collectd/ is made in /var/backups/. This script is still experimental, though. Do not expect it to work in all cases." +msgstr "Este paso se puede realizar automáticamente. En este caso se genera una copia de seguridad de «/var/lib/collectd/» en «/var/backups/». El script que hace esto es aún experimental. No se espera que funcione en todos los casos." + --- collectd-4.6.2.orig/debian/po/fr.po +++ collectd-4.6.2/debian/po/fr.po @@ -0,0 +1,79 @@ +# Translation of collectd debconf templates to French +# Copyright (C) 2008 Florent USSEIL +# This file is distributed under the same license as the collectd package. +# +# Florent USSEIL , 2008. +msgid "" +msgstr "" +"Project-Id-Version: collectd\n" +"Report-Msgid-Bugs-To: collectd@packages.debian.org\n" +"POT-Creation-Date: 2008-03-12 17:35+0100\n" +"PO-Revision-Date: 2008-03-14 01:00+0100\n" +"Last-Translator: Florent USSEIL \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "Layout of RRD files has changed" +msgstr "Changement du format des fichiers RRD" + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 ../collectd.templates:2001 +msgid "" +"The layout of the RRD files created by collectd has changed significantly " +"since version 3.x. In order to keep your old data you have to migrate it. " +"This can be done by using /usr/lib/collectd/utils/migrate-3-4.px." +msgstr "" +"Le format des fichiers RRD créés par collectd a changé de façon " +"significative depuis la version 3.x. Afin de conserver les " +"données, il est nécessaire de les convertir." +"Cette opération peut être réalisée avec la commande " +"« /usr/lib/collectd/utils/migrate-3-4.px »." + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "" +"This step requires both the perl and the rrdtool packages to be installed, " +"which is currently not the case. You need to perform the migration manually." +msgstr "" +"Cette étape a besoin des paquets perl et rrdtool qui ne sont pas " +"actuellement installés. La conversion doit donc être effectuée manuellement." + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 ../collectd.templates:2001 +msgid "See /usr/share/doc/collectd/NEWS.Debian for details." +msgstr "" +"Veuillez lire le fichier /usr/share/doc/collectd/NEWS.Debian pour plus d'informations." + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "Automatically try to migrate your RRD files?" +msgstr "Faut-il tenter de convertir automatiquement les fichiers RRD ?" + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "" +"This step can be done automatically. In this case a backup of /var/lib/" +"collectd/ is made in /var/backups/. This script is still experimental, " +"though. Do not expect it to work in all cases." +msgstr "" +"La conversion des fichiers RRD peut être effectuée automatiquement. Pour cela, " +"une sauvegarde de /var/lib/collectd/ aura lieu " +"dans /var/backups/. Veuillez noter que cette " +"conversion est expérimentale : il est recommandé de " +"contrôler sa bonne exécution." + --- collectd-4.6.2.orig/debian/po/gl.po +++ collectd-4.6.2/debian/po/gl.po @@ -0,0 +1,72 @@ +# Galician translation of collectd's debconf templates +# This file is distributed under the same license as the collectd package. +# Jacobo Tarrio , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: collectd\n" +"Report-Msgid-Bugs-To: collectd@packages.debian.org\n" +"POT-Creation-Date: 2008-03-12 17:35+0100\n" +"PO-Revision-Date: 2008-05-24 11:24+0100\n" +"Last-Translator: Jacobo Tarrio \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "Layout of RRD files has changed" +msgstr "A organización dos ficheiros RRD cambiou" + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 ../collectd.templates:2001 +msgid "" +"The layout of the RRD files created by collectd has changed significantly " +"since version 3.x. In order to keep your old data you have to migrate it. " +"This can be done by using /usr/lib/collectd/utils/migrate-3-4.px." +msgstr "" +"A organización dos ficheiros RRD creados por collectd cambiou " +"significativamente desde a versión 3.x. Para conservar os seus datos antigos " +"ten que migralos. Pódese facer empregando /usr/lib/collectd/utils/migrate-3-" +"4.px." + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "" +"This step requires both the perl and the rrdtool packages to be installed, " +"which is currently not the case. You need to perform the migration manually." +msgstr "" +"Este paso precisa de que os paquetes perl e rrd estean instalados, o que " +"actualmente non é o caso. Ten que realizar a migración manualmente." + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 ../collectd.templates:2001 +msgid "See /usr/share/doc/collectd/NEWS.Debian for details." +msgstr "Consulte /usr/share/doc/collectd/NEWS.Debian para máis detalles." + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "Automatically try to migrate your RRD files?" +msgstr "¿Migrar automaticamente os ficheiros RRD?" + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "" +"This step can be done automatically. In this case a backup of /var/lib/" +"collectd/ is made in /var/backups/. This script is still experimental, " +"though. Do not expect it to work in all cases." +msgstr "" +"Este paso pódese realizar automaticamente. Neste caso faise unha copia de /" +"var/lib/collectd/ en /var/backups/. Este script aínda é experimental, porén. " +"Non espere que funcione en tódolos casos." --- collectd-4.6.2.orig/debian/po/nl.po +++ collectd-4.6.2/debian/po/nl.po @@ -0,0 +1,58 @@ +# Translation of collectd_4.4.2-2_nl.po to Dutch +# Copyright (C) 2008 Eric Spreen +# This file is distributed under the same license as the collectd package. +# +msgid "" +msgstr "" +"Project-Id-Version: collectd_4.4.2-2_nl\n" +"Report-Msgid-Bugs-To: collectd@packages.debian.org\n" +"POT-Creation-Date: 2008-03-12 17:35+0100\n" +"PO-Revision-Date: 2008-09-28 15:22+0100\n" +"Last-Translator: Eric Spreen \n" +"Language-Team: Dutch \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "Layout of RRD files has changed" +msgstr "De lay-out van RRD-bestanden is gewijzigd." + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 +#: ../collectd.templates:2001 +msgid "The layout of the RRD files created by collectd has changed significantly since version 3.x. In order to keep your old data you have to migrate it. This can be done by using /usr/lib/collectd/utils/migrate-3-4.px." +msgstr "De lay-out van de RRD-bestanden, die zijn gemaakt door collectd, is sterk gewijzigd sinds versie 3.x. Om uw oude gegevens te behouden zult u deze moeten migreren. Dit kunt u doen door /usr/lib/collectd/utils/migrate-3-4.px te gebruiken." + +#. Type: note +#. Description +#: ../collectd.templates:1001 +msgid "This step requires both the perl and the rrdtool packages to be installed, which is currently not the case. You need to perform the migration manually." +msgstr "Deze stap vereist dat zowel de perl als de rrdtool pakketten worden geïnstalleerd, wat op dit moment niet het geval is. U zult de migratie handmatig moeten verrichten." + +#. Type: note +#. Description +#. Type: boolean +#. Description +#: ../collectd.templates:1001 +#: ../collectd.templates:2001 +msgid "See /usr/share/doc/collectd/NEWS.Debian for details." +msgstr "Zie /usr/share/doc/collectd/NEWS.Debian voor meer informatie." + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "Automatically try to migrate your RRD files?" +msgstr "Proberen om uw RRD-bestanden automatisch te migreren?" + +#. Type: boolean +#. Description +#: ../collectd.templates:2001 +msgid "This step can be done automatically. In this case a backup of /var/lib/collectd/ is made in /var/backups/. This script is still experimental, though. Do not expect it to work in all cases." +msgstr "Deze stap kan automatisch verricht worden. In dat geval wordt er in /var/backups/ een back-up gemaakt van /var/lib/collectd/. Dit script is echter nog experimenteel. Verwacht u niet dat het in alle gevallen werkt." + --- collectd-4.6.2.orig/debian/include/net/ip_vs.h +++ collectd-4.6.2/debian/include/net/ip_vs.h @@ -0,0 +1,999 @@ +/* + * IP Virtual Server + * data structure and functionality definitions + */ + +#ifndef _IP_VS_H +#define _IP_VS_H + +#include /* For __uXX types */ + +#define IP_VS_VERSION_CODE 0x010200 +#define NVERSION(version) \ + (version >> 16) & 0xFF, \ + (version >> 8) & 0xFF, \ + version & 0xFF + +/* + * Virtual Service Flags + */ +#define IP_VS_SVC_F_PERSISTENT 0x0001 /* persistent port */ +#define IP_VS_SVC_F_HASHED 0x0002 /* hashed entry */ + +/* + * Destination Server Flags + */ +#define IP_VS_DEST_F_AVAILABLE 0x0001 /* server is available */ +#define IP_VS_DEST_F_OVERLOAD 0x0002 /* server is overloaded */ + +/* + * IPVS sync daemon states + */ +#define IP_VS_STATE_NONE 0x0000 /* daemon is stopped */ +#define IP_VS_STATE_MASTER 0x0001 /* started as master */ +#define IP_VS_STATE_BACKUP 0x0002 /* started as backup */ + +/* + * IPVS socket options + */ +#define IP_VS_BASE_CTL (64+1024+64) /* base */ + +#define IP_VS_SO_SET_NONE IP_VS_BASE_CTL /* just peek */ +#define IP_VS_SO_SET_INSERT (IP_VS_BASE_CTL+1) +#define IP_VS_SO_SET_ADD (IP_VS_BASE_CTL+2) +#define IP_VS_SO_SET_EDIT (IP_VS_BASE_CTL+3) +#define IP_VS_SO_SET_DEL (IP_VS_BASE_CTL+4) +#define IP_VS_SO_SET_FLUSH (IP_VS_BASE_CTL+5) +#define IP_VS_SO_SET_LIST (IP_VS_BASE_CTL+6) +#define IP_VS_SO_SET_ADDDEST (IP_VS_BASE_CTL+7) +#define IP_VS_SO_SET_DELDEST (IP_VS_BASE_CTL+8) +#define IP_VS_SO_SET_EDITDEST (IP_VS_BASE_CTL+9) +#define IP_VS_SO_SET_TIMEOUT (IP_VS_BASE_CTL+10) +#define IP_VS_SO_SET_STARTDAEMON (IP_VS_BASE_CTL+11) +#define IP_VS_SO_SET_STOPDAEMON (IP_VS_BASE_CTL+12) +#define IP_VS_SO_SET_RESTORE (IP_VS_BASE_CTL+13) +#define IP_VS_SO_SET_SAVE (IP_VS_BASE_CTL+14) +#define IP_VS_SO_SET_ZERO (IP_VS_BASE_CTL+15) +#define IP_VS_SO_SET_MAX IP_VS_SO_SET_ZERO + +#define IP_VS_SO_GET_VERSION IP_VS_BASE_CTL +#define IP_VS_SO_GET_INFO (IP_VS_BASE_CTL+1) +#define IP_VS_SO_GET_SERVICES (IP_VS_BASE_CTL+2) +#define IP_VS_SO_GET_SERVICE (IP_VS_BASE_CTL+3) +#define IP_VS_SO_GET_DESTS (IP_VS_BASE_CTL+4) +#define IP_VS_SO_GET_DEST (IP_VS_BASE_CTL+5) /* not used now */ +#define IP_VS_SO_GET_TIMEOUT (IP_VS_BASE_CTL+6) +#define IP_VS_SO_GET_DAEMON (IP_VS_BASE_CTL+7) +#define IP_VS_SO_GET_MAX IP_VS_SO_GET_DAEMON + + +/* + * IPVS Connection Flags + */ +#define IP_VS_CONN_F_FWD_MASK 0x0007 /* mask for the fwd methods */ +#define IP_VS_CONN_F_MASQ 0x0000 /* masquerading/NAT */ +#define IP_VS_CONN_F_LOCALNODE 0x0001 /* local node */ +#define IP_VS_CONN_F_TUNNEL 0x0002 /* tunneling */ +#define IP_VS_CONN_F_DROUTE 0x0003 /* direct routing */ +#define IP_VS_CONN_F_BYPASS 0x0004 /* cache bypass */ +#define IP_VS_CONN_F_SYNC 0x0020 /* entry created by sync */ +#define IP_VS_CONN_F_HASHED 0x0040 /* hashed entry */ +#define IP_VS_CONN_F_NOOUTPUT 0x0080 /* no output packets */ +#define IP_VS_CONN_F_INACTIVE 0x0100 /* not established */ +#define IP_VS_CONN_F_OUT_SEQ 0x0200 /* must do output seq adjust */ +#define IP_VS_CONN_F_IN_SEQ 0x0400 /* must do input seq adjust */ +#define IP_VS_CONN_F_SEQ_MASK 0x0600 /* in/out sequence mask */ +#define IP_VS_CONN_F_NO_CPORT 0x0800 /* no client port set yet */ + +/* Move it to better place one day, for now keep it unique */ +#define NFC_IPVS_PROPERTY 0x10000 + +#define IP_VS_SCHEDNAME_MAXLEN 16 +#define IP_VS_IFNAME_MAXLEN 16 + + +/* + * The struct ip_vs_service_user and struct ip_vs_dest_user are + * used to set IPVS rules through setsockopt. + */ +struct ip_vs_service_user { + /* virtual service addresses */ + u_int16_t protocol; + u_int32_t addr; /* virtual ip address */ + u_int16_t port; + u_int32_t fwmark; /* firwall mark of service */ + + /* virtual service options */ + char sched_name[IP_VS_SCHEDNAME_MAXLEN]; + unsigned flags; /* virtual service flags */ + unsigned timeout; /* persistent timeout in sec */ + u_int32_t netmask; /* persistent netmask */ +}; + + +struct ip_vs_dest_user { + /* destination server address */ + u_int32_t addr; + u_int16_t port; + + /* real server options */ + unsigned conn_flags; /* connection flags */ + int weight; /* destination weight */ + + /* thresholds for active connections */ + u_int32_t u_threshold; /* upper threshold */ + u_int32_t l_threshold; /* lower threshold */ +}; + + +/* + * IPVS statistics object (for user space) + */ +struct ip_vs_stats_user +{ + __u32 conns; /* connections scheduled */ + __u32 inpkts; /* incoming packets */ + __u32 outpkts; /* outgoing packets */ + __u64 inbytes; /* incoming bytes */ + __u64 outbytes; /* outgoing bytes */ + + __u32 cps; /* current connection rate */ + __u32 inpps; /* current in packet rate */ + __u32 outpps; /* current out packet rate */ + __u32 inbps; /* current in byte rate */ + __u32 outbps; /* current out byte rate */ +}; + + +/* The argument to IP_VS_SO_GET_INFO */ +struct ip_vs_getinfo { + /* version number */ + unsigned int version; + + /* size of connection hash table */ + unsigned int size; + + /* number of virtual services */ + unsigned int num_services; +}; + + +/* The argument to IP_VS_SO_GET_SERVICE */ +struct ip_vs_service_entry { + /* which service: user fills in these */ + u_int16_t protocol; + u_int32_t addr; /* virtual address */ + u_int16_t port; + u_int32_t fwmark; /* firwall mark of service */ + + /* service options */ + char sched_name[IP_VS_SCHEDNAME_MAXLEN]; + unsigned flags; /* virtual service flags */ + unsigned timeout; /* persistent timeout */ + u_int32_t netmask; /* persistent netmask */ + + /* number of real servers */ + unsigned int num_dests; + + /* statistics */ + struct ip_vs_stats_user stats; +}; + + +struct ip_vs_dest_entry { + u_int32_t addr; /* destination address */ + u_int16_t port; + unsigned conn_flags; /* connection flags */ + int weight; /* destination weight */ + + u_int32_t u_threshold; /* upper threshold */ + u_int32_t l_threshold; /* lower threshold */ + + u_int32_t activeconns; /* active connections */ + u_int32_t inactconns; /* inactive connections */ + u_int32_t persistconns; /* persistent connections */ + + /* statistics */ + struct ip_vs_stats_user stats; +}; + + +/* The argument to IP_VS_SO_GET_DESTS */ +struct ip_vs_get_dests { + /* which service: user fills in these */ + u_int16_t protocol; + u_int32_t addr; /* virtual address */ + u_int16_t port; + u_int32_t fwmark; /* firwall mark of service */ + + /* number of real servers */ + unsigned int num_dests; + + /* the real servers */ + struct ip_vs_dest_entry entrytable[0]; +}; + + +/* The argument to IP_VS_SO_GET_SERVICES */ +struct ip_vs_get_services { + /* number of virtual services */ + unsigned int num_services; + + /* service table */ + struct ip_vs_service_entry entrytable[0]; +}; + + +/* The argument to IP_VS_SO_GET_TIMEOUT */ +struct ip_vs_timeout_user { + int tcp_timeout; + int tcp_fin_timeout; + int udp_timeout; +}; + + +/* The argument to IP_VS_SO_GET_DAEMON */ +struct ip_vs_daemon_user { + /* sync daemon state (master/backup) */ + int state; + + /* multicast interface name */ + char mcast_ifn[IP_VS_IFNAME_MAXLEN]; + + /* SyncID we belong to */ + int syncid; +}; + + +#ifdef __KERNEL__ + +#include +#include /* for struct list_head */ +#include /* for struct rwlock_t */ +#include /* for struct sk_buff */ +#include /* for struct iphdr */ +#include /* for struct atomic_t */ +#include /* for struct neighbour */ +#include /* for struct dst_entry */ +#include +#include +#include + + +#ifdef CONFIG_IP_VS_DEBUG +extern int ip_vs_get_debug_level(void); +#define IP_VS_DBG(level, msg...) \ + do { \ + if (level <= ip_vs_get_debug_level()) \ + printk(KERN_DEBUG "IPVS: " msg); \ + } while (0) +#define IP_VS_DBG_RL(msg...) \ + do { \ + if (net_ratelimit()) \ + printk(KERN_DEBUG "IPVS: " msg); \ + } while (0) +#define IP_VS_DBG_PKT(level, pp, skb, ofs, msg) \ + do { \ + if (level <= ip_vs_get_debug_level()) \ + pp->debug_packet(pp, skb, ofs, msg); \ + } while (0) +#define IP_VS_DBG_RL_PKT(level, pp, skb, ofs, msg) \ + do { \ + if (level <= ip_vs_get_debug_level() && \ + net_ratelimit()) \ + pp->debug_packet(pp, skb, ofs, msg); \ + } while (0) +#else /* NO DEBUGGING at ALL */ +#define IP_VS_DBG(level, msg...) do {} while (0) +#define IP_VS_DBG_RL(msg...) do {} while (0) +#define IP_VS_DBG_PKT(level, pp, skb, ofs, msg) do {} while (0) +#define IP_VS_DBG_RL_PKT(level, pp, skb, ofs, msg) do {} while (0) +#endif + +#define IP_VS_BUG() BUG() +#define IP_VS_ERR(msg...) printk(KERN_ERR "IPVS: " msg) +#define IP_VS_INFO(msg...) printk(KERN_INFO "IPVS: " msg) +#define IP_VS_WARNING(msg...) \ + printk(KERN_WARNING "IPVS: " msg) +#define IP_VS_ERR_RL(msg...) \ + do { \ + if (net_ratelimit()) \ + printk(KERN_ERR "IPVS: " msg); \ + } while (0) + +#ifdef CONFIG_IP_VS_DEBUG +#define EnterFunction(level) \ + do { \ + if (level <= ip_vs_get_debug_level()) \ + printk(KERN_DEBUG "Enter: %s, %s line %i\n", \ + __FUNCTION__, __FILE__, __LINE__); \ + } while (0) +#define LeaveFunction(level) \ + do { \ + if (level <= ip_vs_get_debug_level()) \ + printk(KERN_DEBUG "Leave: %s, %s line %i\n", \ + __FUNCTION__, __FILE__, __LINE__); \ + } while (0) +#else +#define EnterFunction(level) do {} while (0) +#define LeaveFunction(level) do {} while (0) +#endif + +#define IP_VS_WAIT_WHILE(expr) while (expr) { cpu_relax(); } + + +/* + * The port number of FTP service (in network order). + */ +#define FTPPORT __constant_htons(21) +#define FTPDATA __constant_htons(20) + +/* + * IPVS sysctl variables under the /proc/sys/net/ipv4/vs/ + */ +#define NET_IPV4_VS 21 + +enum { + NET_IPV4_VS_DEBUG_LEVEL=1, + NET_IPV4_VS_AMEMTHRESH=2, + NET_IPV4_VS_AMDROPRATE=3, + NET_IPV4_VS_DROP_ENTRY=4, + NET_IPV4_VS_DROP_PACKET=5, + NET_IPV4_VS_SECURE_TCP=6, + NET_IPV4_VS_TO_ES=7, + NET_IPV4_VS_TO_SS=8, + NET_IPV4_VS_TO_SR=9, + NET_IPV4_VS_TO_FW=10, + NET_IPV4_VS_TO_TW=11, + NET_IPV4_VS_TO_CL=12, + NET_IPV4_VS_TO_CW=13, + NET_IPV4_VS_TO_LA=14, + NET_IPV4_VS_TO_LI=15, + NET_IPV4_VS_TO_SA=16, + NET_IPV4_VS_TO_UDP=17, + NET_IPV4_VS_TO_ICMP=18, + NET_IPV4_VS_LBLC_EXPIRE=19, + NET_IPV4_VS_LBLCR_EXPIRE=20, + NET_IPV4_VS_CACHE_BYPASS=22, + NET_IPV4_VS_EXPIRE_NODEST_CONN=23, + NET_IPV4_VS_SYNC_THRESHOLD=24, + NET_IPV4_VS_NAT_ICMP_SEND=25, + NET_IPV4_VS_LAST +}; + +/* + * TCP State Values + */ +enum { + IP_VS_TCP_S_NONE = 0, + IP_VS_TCP_S_ESTABLISHED, + IP_VS_TCP_S_SYN_SENT, + IP_VS_TCP_S_SYN_RECV, + IP_VS_TCP_S_FIN_WAIT, + IP_VS_TCP_S_TIME_WAIT, + IP_VS_TCP_S_CLOSE, + IP_VS_TCP_S_CLOSE_WAIT, + IP_VS_TCP_S_LAST_ACK, + IP_VS_TCP_S_LISTEN, + IP_VS_TCP_S_SYNACK, + IP_VS_TCP_S_LAST +}; + +/* + * UDP State Values + */ +enum { + IP_VS_UDP_S_NORMAL, + IP_VS_UDP_S_LAST, +}; + +/* + * ICMP State Values + */ +enum { + IP_VS_ICMP_S_NORMAL, + IP_VS_ICMP_S_LAST, +}; + +/* + * Delta sequence info structure + * Each ip_vs_conn has 2 (output AND input seq. changes). + * Only used in the VS/NAT. + */ +struct ip_vs_seq { + __u32 init_seq; /* Add delta from this seq */ + __u32 delta; /* Delta in sequence numbers */ + __u32 previous_delta; /* Delta in sequence numbers + before last resized pkt */ +}; + + +/* + * IPVS statistics object + */ +struct ip_vs_stats +{ + __u32 conns; /* connections scheduled */ + __u32 inpkts; /* incoming packets */ + __u32 outpkts; /* outgoing packets */ + __u64 inbytes; /* incoming bytes */ + __u64 outbytes; /* outgoing bytes */ + + __u32 cps; /* current connection rate */ + __u32 inpps; /* current in packet rate */ + __u32 outpps; /* current out packet rate */ + __u32 inbps; /* current in byte rate */ + __u32 outbps; /* current out byte rate */ + + spinlock_t lock; /* spin lock */ +}; + +struct ip_vs_conn; +struct ip_vs_app; + +struct ip_vs_protocol { + struct ip_vs_protocol *next; + char *name; + __u16 protocol; + int dont_defrag; + atomic_t appcnt; /* counter of proto app incs */ + int *timeout_table; /* protocol timeout table */ + + void (*init)(struct ip_vs_protocol *pp); + + void (*exit)(struct ip_vs_protocol *pp); + + int (*conn_schedule)(struct sk_buff *skb, + struct ip_vs_protocol *pp, + int *verdict, struct ip_vs_conn **cpp); + + struct ip_vs_conn * + (*conn_in_get)(const struct sk_buff *skb, + struct ip_vs_protocol *pp, + const struct iphdr *iph, + unsigned int proto_off, + int inverse); + + struct ip_vs_conn * + (*conn_out_get)(const struct sk_buff *skb, + struct ip_vs_protocol *pp, + const struct iphdr *iph, + unsigned int proto_off, + int inverse); + + int (*snat_handler)(struct sk_buff **pskb, + struct ip_vs_protocol *pp, struct ip_vs_conn *cp); + + int (*dnat_handler)(struct sk_buff **pskb, + struct ip_vs_protocol *pp, struct ip_vs_conn *cp); + + int (*csum_check)(struct sk_buff *skb, struct ip_vs_protocol *pp); + + const char *(*state_name)(int state); + + int (*state_transition)(struct ip_vs_conn *cp, int direction, + const struct sk_buff *skb, + struct ip_vs_protocol *pp); + + int (*register_app)(struct ip_vs_app *inc); + + void (*unregister_app)(struct ip_vs_app *inc); + + int (*app_conn_bind)(struct ip_vs_conn *cp); + + void (*debug_packet)(struct ip_vs_protocol *pp, + const struct sk_buff *skb, + int offset, + const char *msg); + + void (*timeout_change)(struct ip_vs_protocol *pp, int flags); + + int (*set_state_timeout)(struct ip_vs_protocol *pp, char *sname, int to); +}; + +extern struct ip_vs_protocol * ip_vs_proto_get(unsigned short proto); + +/* + * IP_VS structure allocated for each dynamically scheduled connection + */ +struct ip_vs_conn { + struct list_head c_list; /* hashed list heads */ + + /* Protocol, addresses and port numbers */ + __u32 caddr; /* client address */ + __u32 vaddr; /* virtual address */ + __u32 daddr; /* destination address */ + __u16 cport; + __u16 vport; + __u16 dport; + __u16 protocol; /* Which protocol (TCP/UDP) */ + + /* counter and timer */ + atomic_t refcnt; /* reference count */ + struct timer_list timer; /* Expiration timer */ + volatile unsigned long timeout; /* timeout */ + + /* Flags and state transition */ + spinlock_t lock; /* lock for state transition */ + volatile __u16 flags; /* status flags */ + volatile __u16 state; /* state info */ + + /* Control members */ + struct ip_vs_conn *control; /* Master control connection */ + atomic_t n_control; /* Number of controlled ones */ + struct ip_vs_dest *dest; /* real server */ + atomic_t in_pkts; /* incoming packet counter */ + + /* packet transmitter for different forwarding methods. If it + mangles the packet, it must return NF_DROP or better NF_STOLEN, + otherwise this must be changed to a sk_buff **. + */ + int (*packet_xmit)(struct sk_buff *skb, struct ip_vs_conn *cp, + struct ip_vs_protocol *pp); + + /* Note: we can group the following members into a structure, + in order to save more space, and the following members are + only used in VS/NAT anyway */ + struct ip_vs_app *app; /* bound ip_vs_app object */ + void *app_data; /* Application private data */ + struct ip_vs_seq in_seq; /* incoming seq. struct */ + struct ip_vs_seq out_seq; /* outgoing seq. struct */ +}; + + +/* + * The information about the virtual service offered to the net + * and the forwarding entries + */ +struct ip_vs_service { + struct list_head s_list; /* for normal service table */ + struct list_head f_list; /* for fwmark-based service table */ + atomic_t refcnt; /* reference counter */ + atomic_t usecnt; /* use counter */ + + __u16 protocol; /* which protocol (TCP/UDP) */ + __u32 addr; /* IP address for virtual service */ + __u16 port; /* port number for the service */ + __u32 fwmark; /* firewall mark of the service */ + unsigned flags; /* service status flags */ + unsigned timeout; /* persistent timeout in ticks */ + __u32 netmask; /* grouping granularity */ + + struct list_head destinations; /* real server d-linked list */ + __u32 num_dests; /* number of servers */ + struct ip_vs_stats stats; /* statistics for the service */ + struct ip_vs_app *inc; /* bind conns to this app inc */ + + /* for scheduling */ + struct ip_vs_scheduler *scheduler; /* bound scheduler object */ + rwlock_t sched_lock; /* lock sched_data */ + void *sched_data; /* scheduler application data */ +}; + + +/* + * The real server destination forwarding entry + * with ip address, port number, and so on. + */ +struct ip_vs_dest { + struct list_head n_list; /* for the dests in the service */ + struct list_head d_list; /* for table with all the dests */ + + __u32 addr; /* IP address of the server */ + __u16 port; /* port number of the server */ + volatile unsigned flags; /* dest status flags */ + atomic_t conn_flags; /* flags to copy to conn */ + atomic_t weight; /* server weight */ + + atomic_t refcnt; /* reference counter */ + struct ip_vs_stats stats; /* statistics */ + + /* connection counters and thresholds */ + atomic_t activeconns; /* active connections */ + atomic_t inactconns; /* inactive connections */ + atomic_t persistconns; /* persistent connections */ + __u32 u_threshold; /* upper threshold */ + __u32 l_threshold; /* lower threshold */ + + /* for destination cache */ + spinlock_t dst_lock; /* lock of dst_cache */ + struct dst_entry *dst_cache; /* destination cache entry */ + u32 dst_rtos; /* RT_TOS(tos) for dst */ + + /* for virtual service */ + struct ip_vs_service *svc; /* service it belongs to */ + __u16 protocol; /* which protocol (TCP/UDP) */ + __u32 vaddr; /* virtual IP address */ + __u16 vport; /* virtual port number */ + __u32 vfwmark; /* firewall mark of service */ +}; + + +/* + * The scheduler object + */ +struct ip_vs_scheduler { + struct list_head n_list; /* d-linked list head */ + char *name; /* scheduler name */ + atomic_t refcnt; /* reference counter */ + struct module *module; /* THIS_MODULE/NULL */ + + /* scheduler initializing service */ + int (*init_service)(struct ip_vs_service *svc); + /* scheduling service finish */ + int (*done_service)(struct ip_vs_service *svc); + /* scheduler updating service */ + int (*update_service)(struct ip_vs_service *svc); + + /* selecting a server from the given service */ + struct ip_vs_dest* (*schedule)(struct ip_vs_service *svc, + const struct sk_buff *skb); +}; + + +/* + * The application module object (a.k.a. app incarnation) + */ +struct ip_vs_app +{ + struct list_head a_list; /* member in app list */ + int type; /* IP_VS_APP_TYPE_xxx */ + char *name; /* application module name */ + __u16 protocol; + struct module *module; /* THIS_MODULE/NULL */ + struct list_head incs_list; /* list of incarnations */ + + /* members for application incarnations */ + struct list_head p_list; /* member in proto app list */ + struct ip_vs_app *app; /* its real application */ + __u16 port; /* port number in net order */ + atomic_t usecnt; /* usage counter */ + + /* output hook: return false if can't linearize. diff set for TCP. */ + int (*pkt_out)(struct ip_vs_app *, struct ip_vs_conn *, + struct sk_buff **, int *diff); + + /* input hook: return false if can't linearize. diff set for TCP. */ + int (*pkt_in)(struct ip_vs_app *, struct ip_vs_conn *, + struct sk_buff **, int *diff); + + /* ip_vs_app initializer */ + int (*init_conn)(struct ip_vs_app *, struct ip_vs_conn *); + + /* ip_vs_app finish */ + int (*done_conn)(struct ip_vs_app *, struct ip_vs_conn *); + + + /* not used now */ + int (*bind_conn)(struct ip_vs_app *, struct ip_vs_conn *, + struct ip_vs_protocol *); + + void (*unbind_conn)(struct ip_vs_app *, struct ip_vs_conn *); + + int * timeout_table; + int * timeouts; + int timeouts_size; + + int (*conn_schedule)(struct sk_buff *skb, struct ip_vs_app *app, + int *verdict, struct ip_vs_conn **cpp); + + struct ip_vs_conn * + (*conn_in_get)(const struct sk_buff *skb, struct ip_vs_app *app, + const struct iphdr *iph, unsigned int proto_off, + int inverse); + + struct ip_vs_conn * + (*conn_out_get)(const struct sk_buff *skb, struct ip_vs_app *app, + const struct iphdr *iph, unsigned int proto_off, + int inverse); + + int (*state_transition)(struct ip_vs_conn *cp, int direction, + const struct sk_buff *skb, + struct ip_vs_app *app); + + void (*timeout_change)(struct ip_vs_app *app, int flags); +}; + + +/* + * IPVS core functions + * (from ip_vs_core.c) + */ +extern const char *ip_vs_proto_name(unsigned proto); +extern unsigned int check_for_ip_vs_out(struct sk_buff **skb_p, + int (*okfn)(struct sk_buff *)); +extern void ip_vs_init_hash_table(struct list_head *table, int rows); +#define IP_VS_INIT_HASH_TABLE(t) ip_vs_init_hash_table(t, sizeof(t)/sizeof(t[0])) + +#define IP_VS_APP_TYPE_UNSPEC 0 +#define IP_VS_APP_TYPE_FTP 1 + +/* + * ip_vs_conn handling functions + * (from ip_vs_conn.c) + */ + +/* + * IPVS connection entry hash table + */ +#ifndef CONFIG_IP_VS_TAB_BITS +#define CONFIG_IP_VS_TAB_BITS 12 +#endif +/* make sure that IP_VS_CONN_TAB_BITS is located in [8, 20] */ +#if CONFIG_IP_VS_TAB_BITS < 8 +#define IP_VS_CONN_TAB_BITS 8 +#endif +#if CONFIG_IP_VS_TAB_BITS > 20 +#define IP_VS_CONN_TAB_BITS 20 +#endif +#if 8 <= CONFIG_IP_VS_TAB_BITS && CONFIG_IP_VS_TAB_BITS <= 20 +#define IP_VS_CONN_TAB_BITS CONFIG_IP_VS_TAB_BITS +#endif +#define IP_VS_CONN_TAB_SIZE (1 << IP_VS_CONN_TAB_BITS) +#define IP_VS_CONN_TAB_MASK (IP_VS_CONN_TAB_SIZE - 1) + +enum { + IP_VS_DIR_INPUT = 0, + IP_VS_DIR_OUTPUT, + IP_VS_DIR_INPUT_ONLY, + IP_VS_DIR_LAST, +}; + +extern struct ip_vs_conn *ip_vs_conn_in_get +(int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port); +extern struct ip_vs_conn *ip_vs_conn_out_get +(int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port); + +/* put back the conn without restarting its timer */ +static inline void __ip_vs_conn_put(struct ip_vs_conn *cp) +{ + atomic_dec(&cp->refcnt); +} +extern void ip_vs_conn_put(struct ip_vs_conn *cp); +extern void ip_vs_conn_fill_cport(struct ip_vs_conn *cp, __u16 cport); + +extern struct ip_vs_conn * +ip_vs_conn_new(int proto, __u32 caddr, __u16 cport, __u32 vaddr, __u16 vport, + __u32 daddr, __u16 dport, unsigned flags, + struct ip_vs_dest *dest); +extern void ip_vs_conn_expire_now(struct ip_vs_conn *cp); + +extern const char * ip_vs_state_name(__u16 proto, int state); + +extern void ip_vs_tcp_conn_listen(struct ip_vs_conn *cp); +extern int ip_vs_check_template(struct ip_vs_conn *ct); +extern void ip_vs_secure_tcp_set(int on); +extern void ip_vs_random_dropentry(void); +extern int ip_vs_conn_init(void); +extern void ip_vs_conn_cleanup(void); + +static inline void ip_vs_control_del(struct ip_vs_conn *cp) +{ + struct ip_vs_conn *ctl_cp = cp->control; + if (!ctl_cp) { + IP_VS_ERR("request control DEL for uncontrolled: " + "%d.%d.%d.%d:%d to %d.%d.%d.%d:%d\n", + NIPQUAD(cp->caddr),ntohs(cp->cport), + NIPQUAD(cp->vaddr),ntohs(cp->vport)); + return; + } + + IP_VS_DBG(7, "DELeting control for: " + "cp.dst=%d.%d.%d.%d:%d ctl_cp.dst=%d.%d.%d.%d:%d\n", + NIPQUAD(cp->caddr),ntohs(cp->cport), + NIPQUAD(ctl_cp->caddr),ntohs(ctl_cp->cport)); + + cp->control = NULL; + if (atomic_read(&ctl_cp->n_control) == 0) { + IP_VS_ERR("BUG control DEL with n=0 : " + "%d.%d.%d.%d:%d to %d.%d.%d.%d:%d\n", + NIPQUAD(cp->caddr),ntohs(cp->cport), + NIPQUAD(cp->vaddr),ntohs(cp->vport)); + return; + } + atomic_dec(&ctl_cp->n_control); +} + +static inline void +ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp) +{ + if (cp->control) { + IP_VS_ERR("request control ADD for already controlled: " + "%d.%d.%d.%d:%d to %d.%d.%d.%d:%d\n", + NIPQUAD(cp->caddr),ntohs(cp->cport), + NIPQUAD(cp->vaddr),ntohs(cp->vport)); + ip_vs_control_del(cp); + } + + IP_VS_DBG(7, "ADDing control for: " + "cp.dst=%d.%d.%d.%d:%d ctl_cp.dst=%d.%d.%d.%d:%d\n", + NIPQUAD(cp->caddr),ntohs(cp->cport), + NIPQUAD(ctl_cp->caddr),ntohs(ctl_cp->cport)); + + cp->control = ctl_cp; + atomic_inc(&ctl_cp->n_control); +} + + +/* + * IPVS application functions + * (from ip_vs_app.c) + */ +#define IP_VS_APP_MAX_PORTS 8 +extern int register_ip_vs_app(struct ip_vs_app *app); +extern void unregister_ip_vs_app(struct ip_vs_app *app); +extern int ip_vs_bind_app(struct ip_vs_conn *cp, struct ip_vs_protocol *pp); +extern void ip_vs_unbind_app(struct ip_vs_conn *cp); +extern int +register_ip_vs_app_inc(struct ip_vs_app *app, __u16 proto, __u16 port); +extern int ip_vs_app_inc_get(struct ip_vs_app *inc); +extern void ip_vs_app_inc_put(struct ip_vs_app *inc); + +extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff **pskb); +extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff **pskb); +extern int ip_vs_skb_replace(struct sk_buff *skb, int pri, + char *o_buf, int o_len, char *n_buf, int n_len); +extern int ip_vs_app_init(void); +extern void ip_vs_app_cleanup(void); + + +/* + * IPVS protocol functions (from ip_vs_proto.c) + */ +extern int ip_vs_protocol_init(void); +extern void ip_vs_protocol_cleanup(void); +extern void ip_vs_protocol_timeout_change(int flags); +extern int *ip_vs_create_timeout_table(int *table, int size); +extern int +ip_vs_set_state_timeout(int *table, int num, char **names, char *name, int to); +extern void +ip_vs_tcpudp_debug_packet(struct ip_vs_protocol *pp, const struct sk_buff *skb, + int offset, const char *msg); + +extern struct ip_vs_protocol ip_vs_protocol_tcp; +extern struct ip_vs_protocol ip_vs_protocol_udp; +extern struct ip_vs_protocol ip_vs_protocol_icmp; +extern struct ip_vs_protocol ip_vs_protocol_esp; +extern struct ip_vs_protocol ip_vs_protocol_ah; + + +/* + * Registering/unregistering scheduler functions + * (from ip_vs_sched.c) + */ +extern int register_ip_vs_scheduler(struct ip_vs_scheduler *scheduler); +extern int unregister_ip_vs_scheduler(struct ip_vs_scheduler *scheduler); +extern int ip_vs_bind_scheduler(struct ip_vs_service *svc, + struct ip_vs_scheduler *scheduler); +extern int ip_vs_unbind_scheduler(struct ip_vs_service *svc); +extern struct ip_vs_scheduler *ip_vs_scheduler_get(const char *sched_name); +extern void ip_vs_scheduler_put(struct ip_vs_scheduler *scheduler); +extern struct ip_vs_conn * +ip_vs_schedule(struct ip_vs_service *svc, const struct sk_buff *skb); +extern int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb, + struct ip_vs_protocol *pp); + + +/* + * IPVS control data and functions (from ip_vs_ctl.c) + */ +extern int sysctl_ip_vs_cache_bypass; +extern int sysctl_ip_vs_expire_nodest_conn; +extern int sysctl_ip_vs_sync_threshold[2]; +extern int sysctl_ip_vs_nat_icmp_send; +extern struct ip_vs_stats ip_vs_stats; + +extern struct ip_vs_service * +ip_vs_service_get(__u32 fwmark, __u16 protocol, __u32 vaddr, __u16 vport); + +static inline void ip_vs_service_put(struct ip_vs_service *svc) +{ + atomic_dec(&svc->usecnt); +} + +extern struct ip_vs_dest * +ip_vs_lookup_real_service(__u16 protocol, __u32 daddr, __u16 dport); +extern int ip_vs_use_count_inc(void); +extern void ip_vs_use_count_dec(void); +extern int ip_vs_control_init(void); +extern void ip_vs_control_cleanup(void); + + +/* + * IPVS sync daemon data and function prototypes + * (from ip_vs_sync.c) + */ +extern volatile int ip_vs_sync_state; +extern volatile int ip_vs_master_syncid; +extern volatile int ip_vs_backup_syncid; +extern char ip_vs_master_mcast_ifn[IP_VS_IFNAME_MAXLEN]; +extern char ip_vs_backup_mcast_ifn[IP_VS_IFNAME_MAXLEN]; +extern int start_sync_thread(int state, char *mcast_ifn, __u8 syncid); +extern int stop_sync_thread(int state); +extern void ip_vs_sync_conn(struct ip_vs_conn *cp); + + +/* + * IPVS rate estimator prototypes (from ip_vs_est.c) + */ +extern int ip_vs_new_estimator(struct ip_vs_stats *stats); +extern void ip_vs_kill_estimator(struct ip_vs_stats *stats); +extern void ip_vs_zero_estimator(struct ip_vs_stats *stats); + +/* + * Various IPVS packet transmitters (from ip_vs_xmit.c) + */ +extern int ip_vs_null_xmit +(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp); +extern int ip_vs_bypass_xmit +(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp); +extern int ip_vs_nat_xmit +(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp); +extern int ip_vs_tunnel_xmit +(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp); +extern int ip_vs_dr_xmit +(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp); +extern int ip_vs_icmp_xmit +(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, int offset); +extern void ip_vs_dst_reset(struct ip_vs_dest *dest); + + +/* + * This is a simple mechanism to ignore packets when + * we are loaded. Just set ip_vs_drop_rate to 'n' and + * we start to drop 1/rate of the packets + */ +extern int ip_vs_drop_rate; +extern int ip_vs_drop_counter; + +static __inline__ int ip_vs_todrop(void) +{ + if (!ip_vs_drop_rate) return 0; + if (--ip_vs_drop_counter > 0) return 0; + ip_vs_drop_counter = ip_vs_drop_rate; + return 1; +} + +/* + * ip_vs_fwd_tag returns the forwarding tag of the connection + */ +#define IP_VS_FWD_METHOD(cp) (cp->flags & IP_VS_CONN_F_FWD_MASK) + +extern __inline__ char ip_vs_fwd_tag(struct ip_vs_conn *cp) +{ + char fwd; + + switch (IP_VS_FWD_METHOD(cp)) { + case IP_VS_CONN_F_MASQ: + fwd = 'M'; break; + case IP_VS_CONN_F_LOCALNODE: + fwd = 'L'; break; + case IP_VS_CONN_F_TUNNEL: + fwd = 'T'; break; + case IP_VS_CONN_F_DROUTE: + fwd = 'R'; break; + case IP_VS_CONN_F_BYPASS: + fwd = 'B'; break; + default: + fwd = '?'; break; + } + return fwd; +} + +extern int ip_vs_make_skb_writable(struct sk_buff **pskb, int len); +extern void ip_vs_nat_icmp(struct sk_buff *skb, struct ip_vs_protocol *pp, + struct ip_vs_conn *cp, int dir); + +extern u16 ip_vs_checksum_complete(struct sk_buff *skb, int offset); + +static inline u16 ip_vs_check_diff(u32 old, u32 new, u16 oldsum) +{ + u32 diff[2] = { old, new }; + + return csum_fold(csum_partial((char *) diff, sizeof(diff), + oldsum ^ 0xFFFF)); +} + +#endif /* __KERNEL__ */ + +#endif /* _IP_VS_H */