From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Robert Schwebel Date: Sun, 25 Jan 2015 01:37:25 +0100 Message-Id: <1422146246-11197-9-git-send-email-r.schwebel@pengutronix.de> In-Reply-To: <1422146246-11197-1-git-send-email-r.schwebel@pengutronix.de> References: <1422146246-11197-1-git-send-email-r.schwebel@pengutronix.de> Subject: [ptxdist] [PATCH 09/10] collectd: add support for cpu plugin Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Robert Schwebel Signed-off-by: Robert Schwebel --- generic/etc/collectd.d/cpu.conf | 1 + rules/collectd.in | 9 +++++++++ rules/collectd.make | 7 ++++++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 generic/etc/collectd.d/cpu.conf diff --git a/generic/etc/collectd.d/cpu.conf b/generic/etc/collectd.d/cpu.conf new file mode 100644 index 0000000..30fcc38 --- /dev/null +++ b/generic/etc/collectd.d/cpu.conf @@ -0,0 +1 @@ +LoadPlugin cpu diff --git a/rules/collectd.in b/rules/collectd.in index a93fc56..1039c21 100644 --- a/rules/collectd.in +++ b/rules/collectd.in @@ -28,4 +28,13 @@ config COLLECTD_RRDTOOL With the RRDtool plugin, collectd writes values into a round-robin database, using librrd. +comment "Read Plugins" + +config COLLECTD_CPU + bool + prompt "cpu" + help + The CPU plugin collects data about what your CPU is actually doing, + and if it is being idle or in the various states. + endif diff --git a/rules/collectd.make b/rules/collectd.make index 6b90bb7..cc2715c 100644 --- a/rules/collectd.make +++ b/rules/collectd.make @@ -57,7 +57,7 @@ COLLECTD_CONF_OPT := $(CROSS_AUTOCONF_USR) \ --disable-conntrack \ --disable-contextswitch \ --disable-cpufreq \ - --disable-cpu \ + --$(call ptx/endis, PTXCONF_COLLECTD_CPU)-cpu \ --disable-csv \ --disable-curl \ --disable-curl_json \ @@ -198,6 +198,11 @@ endif # Plugins +ifdef PTXCONF_COLLECTD_CPU + @$(call install_copy, collectd, 0, 0, 0644, -, /usr/lib/collectd/cpu.so) + @$(call install_alternative, collectd, 0, 0, 0644, /etc/collectd.d/cpu.conf) +endif + ifdef PTXCONF_COLLECTD_RRDTOOL @$(call install_copy, collectd, 0, 0, 0644, -, /usr/lib/collectd/rrdtool.so) @$(call install_alternative, collectd, 0, 0, 0644, /etc/collectd.d/rrdtool.conf) -- 2.1.4 -- ptxdist mailing list ptxdist@pengutronix.de