From: Florian Forster Date: Mon, 6 Dec 2010 10:21:45 +0000 (+0100) Subject: swap plugin: Complain if physical and virtual reporting have both been deactivated. X-Git-Tag: collectd-5.0.0-beta0~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c0b7d5370b1461dafdafe495c0a3fe16e62ec35c;p=collectd.git swap plugin: Complain if physical and virtual reporting have both been deactivated. --- diff --git a/src/swap.c b/src/swap.c index 03e4eec1..a1c78b6c 100644 --- a/src/swap.c +++ b/src/swap.c @@ -564,6 +564,13 @@ static int swap_read (void) /* {{{ */ { int status; + if (!report_physical && !report_virtual) + { + WARNING ("swap plugin: Neither the \"ReportPhysical\" nor the \"ReportVirtual\" option " + "has been activated. This plugin will not collect any data."); + return (-1); + } + if (report_physical) { status = swap_read_swapctl2 ();