From bf122a11c4f3585d206f10f8167911abac17552c Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 1 Sep 2020 10:45:19 +0200 Subject: [PATCH] Remove the "XMMS" plugin. --- Makefile.am | 8 ----- README | 3 -- configure.ac | 69 -------------------------------------------- src/collectd.conf.in | 1 - src/xmms.c | 68 ------------------------------------------- 5 files changed, 149 deletions(-) delete mode 100644 src/xmms.c diff --git a/Makefile.am b/Makefile.am index e49b1059b..b03026415 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2316,14 +2316,6 @@ xencpu_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBXENCTL_LDFLAGS) xencpu_la_LIBADD = -lxenctrl endif -if BUILD_PLUGIN_XMMS -pkglib_LTLIBRARIES += xmms.la -xmms_la_SOURCES = src/xmms.c -xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS) -xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS) -xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS) -endif - if BUILD_PLUGIN_ZFS_ARC pkglib_LTLIBRARIES += zfs_arc.la zfs_arc_la_SOURCES = src/zfs_arc.c diff --git a/README b/README index a130cbbef..5715619c5 100644 --- a/README +++ b/README @@ -487,9 +487,6 @@ Features - xencpu XEN Hypervisor CPU stats. - - xmms - Bitrate and frequency of music played with XMMS. - - zfs_arc Statistics for ZFS' “Adaptive Replacement Cache” (ARC). diff --git a/configure.ac b/configure.ac index cbe1970e1..bdbbc7901 100644 --- a/configure.ac +++ b/configure.ac @@ -5855,72 +5855,6 @@ AC_SUBST([LIBXENCTL_CPPFLAGS]) AC_SUBST([LIBXENCTL_LDFLAGS]) # }}} -# --with-libxmms {{{ -with_xmms_config="xmms-config" -AC_ARG_WITH([libxmms], - [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])], - [ - if test "x$withval" = "xno" || test "x$withval" = "xyes"; then - with_libxmms="$withval" - else - if test -f "$withval" && test -x "$withval"; then - with_xmms_config="$withval" - else if test -x "$withval/bin/xmms-config"; then - with_xmms_config="$withval/bin/xmms-config" - fi; fi - with_libxmms="yes" - fi - ], - [with_libxmms="yes"] -) - -if test "x$with_libxmms" = "xyes"; then - with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null` - if test $? -ne 0; then - with_libxmms="no" - fi -fi - -if test "x$with_libxmms" = "xyes"; then - with_xmms_libs=`$with_xmms_config --libs 2>/dev/null` - if test $? -ne 0; then - with_libxmms="no" - fi -fi - -if test "x$with_libxmms" = "xyes"; then - SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$with_xmms_cflags" - - AC_CHECK_HEADER([xmmsctrl.h], - [with_libxmms="yes"], - [with_libxmms="no"], - ) - - CPPFLAGS="$SAVE_CPPFLAGS" -fi - -if test "x$with_libxmms" = "xyes"; then - SAVE_LIBS="$LIBS" - LIBS="$with_xmms_libs" - - AC_CHECK_LIB([xmms], [xmms_remote_get_info], - [with_libxmss="yes"], - [with_libxmms="no"], - [$with_xmms_libs] - - ) - - LIBS="$SAVE_LIBS" -fi - -BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags" -BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs" - -AC_SUBST([BUILD_WITH_LIBXMMS_CFLAGS]) -AC_SUBST([BUILD_WITH_LIBXMMS_LIBS]) -# }}} - # --with-libyajl {{{ AC_ARG_WITH([libyajl], [AS_HELP_STRING([--with-libyajl@<:@=PREFIX@:>@], [Path to libyajl.])], @@ -7172,7 +7106,6 @@ AC_PLUGIN([write_stackdriver], [$plugin_write_stackdriver], [Google Stackdrive AC_PLUGIN([write_syslog], [yes], [Syslog output plugin]) AC_PLUGIN([write_tsdb], [yes], [TSDB output plugin]) AC_PLUGIN([xencpu], [$plugin_xencpu], [Xen Host CPU usage]) -AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics]) AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics]) AC_PLUGIN([zone], [$plugin_zone], [Solaris container statistics]) AC_PLUGIN([zookeeper], [yes], [Zookeeper statistics]) @@ -7433,7 +7366,6 @@ AC_MSG_RESULT([ libvarnish . . . . . $with_libvarnish]) AC_MSG_RESULT([ libvirt . . . . . . . $with_libvirt]) AC_MSG_RESULT([ libxenctrl . . . . . $with_libxenctrl]) AC_MSG_RESULT([ libxml2 . . . . . . . $with_libxml2]) -AC_MSG_RESULT([ libxmms . . . . . . . $with_libxmms]) AC_MSG_RESULT([ libyajl . . . . . . . $with_libyajl]) AC_MSG_RESULT([ oracle . . . . . . . $with_oracle]) AC_MSG_RESULT([ protobuf-c . . . . . $have_protoc_c]) @@ -7615,7 +7547,6 @@ AC_MSG_RESULT([ write_stackdriver . . $enable_write_stackdriver]) AC_MSG_RESULT([ write_syslog . . . . $enable_write_syslog]) AC_MSG_RESULT([ write_tsdb . . . . . $enable_write_tsdb]) AC_MSG_RESULT([ xencpu . . . . . . . $enable_xencpu]) -AC_MSG_RESULT([ xmms . . . . . . . . $enable_xmms]) AC_MSG_RESULT([ zfs_arc . . . . . . . $enable_zfs_arc]) AC_MSG_RESULT([ zone . . . . . . . . $enable_zone]) AC_MSG_RESULT([ zookeeper . . . . . . $enable_zookeeper]) diff --git a/src/collectd.conf.in b/src/collectd.conf.in index 6406291f8..9d0629db5 100644 --- a/src/collectd.conf.in +++ b/src/collectd.conf.in @@ -238,7 +238,6 @@ #@BUILD_PLUGIN_WRITE_SYSLOG_TRUE@LoadPlugin write_syslog #@BUILD_PLUGIN_WRITE_TSDB_TRUE@LoadPlugin write_tsdb #@BUILD_PLUGIN_XENCPU_TRUE@LoadPlugin xencpu -#@BUILD_PLUGIN_XMMS_TRUE@LoadPlugin xmms #@BUILD_PLUGIN_ZFS_ARC_TRUE@LoadPlugin zfs_arc #@BUILD_PLUGIN_ZONE_TRUE@LoadPlugin zone #@BUILD_PLUGIN_ZOOKEEPER_TRUE@LoadPlugin zookeeper diff --git a/src/xmms.c b/src/xmms.c deleted file mode 100644 index 2d550b421..000000000 --- a/src/xmms.c +++ /dev/null @@ -1,68 +0,0 @@ -/** - * collectd - src/xmms.c - * Copyright (C) 2007 Florian octo Forster - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Florian octo Forster - **/ - -#include "collectd.h" - -#include "plugin.h" -#include "utils/common/common.h" - -#include - -static gint xmms_session; - -static void cxmms_submit(const char *type, gauge_t value) { - value_list_t vl = VALUE_LIST_INIT; - - vl.values = &(value_t){.gauge = value}; - vl.values_len = 1; - sstrncpy(vl.plugin, "xmms", sizeof(vl.plugin)); - sstrncpy(vl.type, type, sizeof(vl.type)); - - plugin_dispatch_values(&vl); -} /* void cxmms_submit */ - -static int cxmms_read(void) { - gint rate; - gint freq; - gint nch; - - if (!xmms_remote_is_running(xmms_session)) - return 0; - - xmms_remote_get_info(xmms_session, &rate, &freq, &nch); - - if ((freq == 0) || (nch == 0)) - return -1; - - cxmms_submit("bitrate", rate); - cxmms_submit("frequency", freq); - - return 0; -} /* int read */ - -void module_register(void) { - plugin_register_read("xmms", cxmms_read); -} /* void module_register */ -- 2.47.2