From: Florian Forster Date: Thu, 19 Mar 2009 12:51:50 +0000 (+0100) Subject: build system: Add the new `uptime' plugin. X-Git-Tag: collectd-4.7.0~104 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d0da1c4e0cb3afe14eda9d24499f7c8bd1692286;p=collectd.git build system: Add the new `uptime' plugin. --- diff --git a/configure.in b/configure.in index 9471cfaf..95b2755e 100644 --- a/configure.in +++ b/configure.in @@ -3030,6 +3030,7 @@ plugin_tape="no" plugin_tcpconns="no" plugin_thermal="no" plugin_users="no" +plugin_uptime="no" plugin_vmem="no" plugin_vserver="no" plugin_wireless="no" @@ -3053,6 +3054,7 @@ then plugin_swap="yes" plugin_tcpconns="yes" plugin_thermal="yes" + plugin_uptime="yes" plugin_vmem="yes" plugin_vserver="yes" plugin_wireless="yes" @@ -3076,6 +3078,11 @@ then fi # Solaris +if test "x$with_kstat" = "xyes" +then + plugin_uptime="yes" +fi + if test "x$with_devinfo$with_kstat" = "xyesyes" then plugin_cpu="yes" @@ -3121,6 +3128,7 @@ if test "x$have_sysctl" = "xyes" then plugin_cpu="yes" plugin_swap="yes" + plugin_uptime="yes" fi if test "x$have_sysctlbyname" = "xyes" then @@ -3277,6 +3285,7 @@ AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics]) AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics]) AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics]) AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin]) +AC_PLUGIN([uptime], [$plugin_uptime], [Uptime statistics]) AC_PLUGIN([users], [$plugin_users], [User statistics]) AC_PLUGIN([uuid], [yes], [UUID as hostname plugin]) AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics]) @@ -3561,6 +3570,7 @@ Configuration: teamspeak2 . . . . . $enable_teamspeak2 thermal . . . . . . . $enable_thermal unixsock . . . . . . $enable_unixsock + uptime . . . . . . . $enable_uptime users . . . . . . . . $enable_users uuid . . . . . . . . $enable_uuid vmem . . . . . . . . $enable_vmem diff --git a/src/Makefile.am b/src/Makefile.am index 40c2c388..02aaeb1d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -885,6 +885,19 @@ collectd_LDADD += "-dlopen" unixsock.la collectd_DEPENDENCIES += unixsock.la endif +if BUILD_PLUGIN_UPTIME +pkglib_LTLIBRARIES += uptime.la +uptime_la_SOURCES = uptime.c +uptime_la_CFLAGS = $(AM_CFLAGS) +uptime_la_LDFLAGS = -module -avoid-version +uptime_la_LIBADD = +if BUILD_WITH_LIBKSTAT +uptime_la_LIBADD += -lkstat +endif +collectd_LDADD += "-dlopen" uptime.la +collectd_DEPENDENCIES += uptime.la +endif + if BUILD_PLUGIN_USERS pkglib_LTLIBRARIES += users.la users_la_SOURCES = users.c diff --git a/src/collectd.conf.in b/src/collectd.conf.in index 5af9e066..3abc24d1 100644 --- a/src/collectd.conf.in +++ b/src/collectd.conf.in @@ -112,6 +112,7 @@ FQDNLookup true #@BUILD_PLUGIN_TEAMSPEAK2_TRUE@LoadPlugin teamspeak2 #@BUILD_PLUGIN_THERMAL_TRUE@LoadPlugin thermal #@BUILD_PLUGIN_UNIXSOCK_TRUE@LoadPlugin unixsock +#@BUILD_PLUGIN_UPTIME_TRUE@LoadPlugin uptime #@BUILD_PLUGIN_USERS_TRUE@LoadPlugin users #@BUILD_PLUGIN_UUID_TRUE@LoadPlugin uuid #@BUILD_PLUGIN_VMEM_TRUE@LoadPlugin vmem