From 04e84a52ff824c72080232e79d2e4bfd9707ded1 Mon Sep 17 00:00:00 2001 From: "Christopher J. Morrone" Date: Tue, 28 Mar 2023 16:43:29 -0700 Subject: [PATCH] Retire the genders configuration method. --- configure.ac | 40 - packaging/make-all-rabbit.sh | 4 +- util/Makefile.am | 2 +- util/sample_init_scripts/Makefile.am | 5 - util/sample_init_scripts/README | 7 - util/sample_init_scripts/genders/Makefile.am | 12 - util/sample_init_scripts/genders/README | 45 - .../genders/examples/Makefile.am | 6 - .../genders/examples/README | 1 - .../genders/examples/genders.shaun | 71 - .../genders/man/Makefile.am | 10 - .../genders/man/ldms-attributes.man | 429 ------ .../genders/man/ldms-genders-examples.man | 140 -- .../genders/man/ldmsctl_args3.man | 58 - .../genders/man/ldmsd-genders.man | 311 ---- .../genders/src/Makefile.am | 14 - .../genders/src/ldmsctl_args3.cxx | 825 ----------- .../genders/systemd/.gitignore | 2 - .../genders/systemd/Makefile.am | 10 - .../genders/systemd/etc/Makefile.am | 7 - .../genders/systemd/etc/sysconfig/Makefile.am | 7 - .../systemd/etc/sysconfig/ldms.d/.gitignore | 2 - .../ldms.d/ClusterGenders/Makefile.am | 8 - .../sysconfig/ldms.d/ClusterGenders/README | 16 - .../ldms.d/ClusterGenders/genders.agg | 9 - .../ldms.d/ClusterGenders/genders.local | 40 - .../ldms.d/ClusterSecrets/Makefile.am | 12 - .../sysconfig/ldms.d/ClusterSecrets/README | 9 - .../ldms.d/ClusterSecrets/ldmsauth.conf | 2 - .../systemd/etc/sysconfig/ldms.d/Makefile.am | 17 - .../systemd/etc/sysconfig/ldms.d/README | 16 - .../etc/sysconfig/ldms.d/debug/Makefile.am | 10 - .../ldms.d/debug/ldmsd.extra.local.conf | 8 - .../etc/sysconfig/ldms.d/ldms-functions.in | 1258 ----------------- .../etc/sysconfig/ldms.d/ldmsd.agg.conf | 51 - .../ldms.d/ldmsd.all_instances.conf.example | 115 -- .../etc/sysconfig/ldms.d/ldmsd.hermes.conf | 4 - .../sysconfig/ldms.d/ldmsd.hermes.local.conf | 78 - .../systemd/etc/sysconfig/ldms.d/ldmsd.in | 539 ------- .../etc/sysconfig/ldms.d/ldmsd.local.conf | 54 - .../ldms.d/ldmsd.poseidon.local.conf | 80 -- .../etc/sysconfig/ldms.d/ldmsd.twain.conf | 44 - .../sysconfig/ldms.d/plugins-conf/Makefile.am | 48 - .../etc/sysconfig/ldms.d/plugins-conf/README | 28 - .../ldms.d/plugins-conf/cray_gemini_r_sampler | 1 - .../ldms.d/plugins-conf/cray_power_sampler | 1 - .../etc/sysconfig/ldms.d/plugins-conf/dstat | 1 - .../ldms.d/plugins-conf/gen.aries_nic_mmr | 5 - .../ldms.d/plugins-conf/gen.aries_rtr_mmr | 5 - .../ldms.d/plugins-conf/gen.msr_interlagos | 28 - .../sysconfig/ldms.d/plugins-conf/gen.vmstat | 7 - .../ldms.d/plugins-conf/gw_sysclassib.cts1 | 2 - .../ldms.d/plugins-conf/gw_sysclassib.tlcc2 | 2 - .../etc/sysconfig/ldms.d/plugins-conf/hfclock | 1 - .../ldms.d/plugins-conf/init_jobinfo.sh | 26 - .../etc/sysconfig/ldms.d/plugins-conf/jobid | 2 - .../ldms.d/plugins-conf/llnl_lustre_client | 2 - .../sysconfig/ldms.d/plugins-conf/lnet_stats | 2 - .../ldms.d/plugins-conf/lustre2_client | 1 - .../ldms.d/plugins-conf/lustre2_client.cts1x | 1 - .../ldms.d/plugins-conf/lustre2_client.srn | 2 - .../etc/sysconfig/ldms.d/plugins-conf/meminfo | 2 - .../ldms.d/plugins-conf/node_delta.sh | 6 - .../ldms.d/plugins-conf/node_rate.sh | 8 - .../ldms.d/plugins-conf/node_sum_vector.sh | 4 - .../etc/sysconfig/ldms.d/plugins-conf/opa2 | 3 - .../ldms.d/plugins-conf/power_sampler | 1 - .../sysconfig/ldms.d/plugins-conf/procnetdev | 1 - .../etc/sysconfig/ldms.d/plugins-conf/procnfs | 2 - .../sysconfig/ldms.d/plugins-conf/procstat | 1 - .../sysconfig/ldms.d/plugins-conf/procstat.36 | 2 - .../sysconfig/ldms.d/plugins-conf/procstat.48 | 2 - .../sysconfig/ldms.d/plugins-conf/procstat.72 | 2 - .../sysconfig/ldms.d/plugins-conf/procstat.96 | 2 - .../ldms.d/plugins-conf/procstat.nocores | 2 - .../sysconfig/ldms.d/plugins-conf/store_csv | 2 - .../ldms.d/plugins-conf/store_csv.opts | 21 - .../sysconfig/ldms.d/plugins-conf/sysclassib | 2 - .../plugins-conf/syspapi-events.json.E5-2695 | 9 - .../ldms.d/plugins-conf/syspapi_sampler | 2 - .../ldms.d/plugins-conf/trnsf_producer_add.sh | 31 - .../etc/sysconfig/ldms.d/plugins-conf/vmstat | 2 - .../genders/systemd/ldms-manpatch.sh | 31 - .../genders/systemd/ldmsd-pre-systemd.in | 73 - .../genders/systemd/ldmsd-wrapper.sh.in | 14 - .../genders/systemd/services/.gitignore | 2 - .../genders/systemd/services/Makefile.am | 19 - .../genders/systemd/services/README.ldmsd | 14 - .../genders/systemd/services/ldmsd.service.in | 74 - .../systemd/services/ldmsd@.service.in | 74 - .../genders/sysv/.gitignore | 1 - .../genders/sysv/Makefile.am | 7 - .../genders/sysv/etc/Makefile.am | 19 - .../genders/sysv/etc/init.d/.gitignore | 2 - .../genders/sysv/etc/init.d/Makefile.am | 12 - .../genders/sysv/etc/init.d/README | 11 - .../genders/sysv/etc/init.d/ldmsd.in | 125 -- .../genders/sysv/etc/init.d/ldmsd.template.in | 125 -- .../genders/sysv/etc/sysconfig | 1 - .../genders/sysv/ldmsd-pre-sysvinit.in | 75 - .../genders/test/genders.aries | 30 - .../genders/test/genders.ldms | 56 - .../genders/test/genders.ldms.chama | 78 - 103 files changed, 3 insertions(+), 5490 deletions(-) delete mode 100644 util/sample_init_scripts/Makefile.am delete mode 100644 util/sample_init_scripts/README delete mode 100644 util/sample_init_scripts/genders/Makefile.am delete mode 100644 util/sample_init_scripts/genders/README delete mode 100644 util/sample_init_scripts/genders/examples/Makefile.am delete mode 100644 util/sample_init_scripts/genders/examples/README delete mode 100644 util/sample_init_scripts/genders/examples/genders.shaun delete mode 100644 util/sample_init_scripts/genders/man/Makefile.am delete mode 100644 util/sample_init_scripts/genders/man/ldms-attributes.man delete mode 100644 util/sample_init_scripts/genders/man/ldms-genders-examples.man delete mode 100644 util/sample_init_scripts/genders/man/ldmsctl_args3.man delete mode 100644 util/sample_init_scripts/genders/man/ldmsd-genders.man delete mode 100644 util/sample_init_scripts/genders/src/Makefile.am delete mode 100644 util/sample_init_scripts/genders/src/ldmsctl_args3.cxx delete mode 100644 util/sample_init_scripts/genders/systemd/.gitignore delete mode 100644 util/sample_init_scripts/genders/systemd/Makefile.am delete mode 100644 util/sample_init_scripts/genders/systemd/etc/Makefile.am delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/Makefile.am delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/.gitignore delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/Makefile.am delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/README delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/genders.agg delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/genders.local delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterSecrets/Makefile.am delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterSecrets/README delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterSecrets/ldmsauth.conf delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/Makefile.am delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/README delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/debug/Makefile.am delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/debug/ldmsd.extra.local.conf delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldms-functions.in delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.agg.conf delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.all_instances.conf.example delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.hermes.conf delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.hermes.local.conf delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.in delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.local.conf delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.poseidon.local.conf delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.twain.conf delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/Makefile.am delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/README delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/cray_gemini_r_sampler delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/cray_power_sampler delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/dstat delete mode 100755 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.aries_nic_mmr delete mode 100755 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.aries_rtr_mmr delete mode 100755 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.msr_interlagos delete mode 100755 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.vmstat delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gw_sysclassib.cts1 delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gw_sysclassib.tlcc2 delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/hfclock delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/init_jobinfo.sh delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/jobid delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/llnl_lustre_client delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lnet_stats delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lustre2_client delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lustre2_client.cts1x delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lustre2_client.srn delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/meminfo delete mode 100755 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/node_delta.sh delete mode 100755 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/node_rate.sh delete mode 100755 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/node_sum_vector.sh delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/opa2 delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/power_sampler delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procnetdev delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procnfs delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.36 delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.48 delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.72 delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.96 delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.nocores delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/store_csv delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/store_csv.opts delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/sysclassib delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/syspapi-events.json.E5-2695 delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/syspapi_sampler delete mode 100755 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/trnsf_producer_add.sh delete mode 100644 util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/vmstat delete mode 100755 util/sample_init_scripts/genders/systemd/ldms-manpatch.sh delete mode 100755 util/sample_init_scripts/genders/systemd/ldmsd-pre-systemd.in delete mode 100755 util/sample_init_scripts/genders/systemd/ldmsd-wrapper.sh.in delete mode 100644 util/sample_init_scripts/genders/systemd/services/.gitignore delete mode 100644 util/sample_init_scripts/genders/systemd/services/Makefile.am delete mode 100644 util/sample_init_scripts/genders/systemd/services/README.ldmsd delete mode 100644 util/sample_init_scripts/genders/systemd/services/ldmsd.service.in delete mode 100644 util/sample_init_scripts/genders/systemd/services/ldmsd@.service.in delete mode 100644 util/sample_init_scripts/genders/sysv/.gitignore delete mode 100644 util/sample_init_scripts/genders/sysv/Makefile.am delete mode 100644 util/sample_init_scripts/genders/sysv/etc/Makefile.am delete mode 100644 util/sample_init_scripts/genders/sysv/etc/init.d/.gitignore delete mode 100644 util/sample_init_scripts/genders/sysv/etc/init.d/Makefile.am delete mode 100644 util/sample_init_scripts/genders/sysv/etc/init.d/README delete mode 100755 util/sample_init_scripts/genders/sysv/etc/init.d/ldmsd.in delete mode 100755 util/sample_init_scripts/genders/sysv/etc/init.d/ldmsd.template.in delete mode 120000 util/sample_init_scripts/genders/sysv/etc/sysconfig delete mode 100755 util/sample_init_scripts/genders/sysv/ldmsd-pre-sysvinit.in delete mode 100755 util/sample_init_scripts/genders/test/genders.aries delete mode 100755 util/sample_init_scripts/genders/test/genders.ldms delete mode 100644 util/sample_init_scripts/genders/test/genders.ldms.chama diff --git a/configure.ac b/configure.ac index 18d424b1f..466314629 100644 --- a/configure.ac +++ b/configure.ac @@ -841,25 +841,9 @@ LIBS="" ## stuff from top -OPTION_DEFAULT_DISABLE([libgenders], [ENABLE_LIBGENDERS],[ requires C++,boost]) -OPTION_DEFAULT_DISABLE([genderssystemd], [ENABLE_TOSS_SYSTEMD],[ toss systemd init scripts]) OPTION_DEFAULT_DISABLE([csv_check], [ENABLE_CSV_CHECK],[ requires C++,boost]) OPTION_EXTRA_BUILD_DIRS([third-plugins], [ENABLE_THIRD_PLUGINS], [THIRD_PLUGINS_DIRS]) -if test -z "$ENABLE_LIBGENDERS_TRUE" -then - OPTION_WITH([libgenders], [LIBGENDERS],[/usr]) - AC_LANG_PUSH([C++]) - BOOST_REQUIRE( , AC_MSG_ERROR([Genders enabled but boost not found.])) - BOOST_STRING_ALGO - save_LDFLAGS=$LDFLAGS - LDFLAGS=$LIBGENDERS_LIBDIR_FLAG - AX_CXX_CHECK_LIB(gendersplusplus,[Gendersplusplus::GendersException], [], - AC_MSG_ERROR([libgendersplusplus not found. ])) - LDFLAGS=$save_LDFLAGS - AC_LANG_POP([C++]) - LIBS="" -fi if test -z "$ENABLE_CSV_CHECK_TRUE" then AC_LANG_PUSH([C++]) @@ -947,23 +931,6 @@ AC_SUBST(configure_input) AC_CONFIG_FILES([Makefile util/Makefile util/relocation/Makefile -util/sample_init_scripts/Makefile -util/sample_init_scripts/genders/Makefile -util/sample_init_scripts/genders/man/Makefile -util/sample_init_scripts/genders/src/Makefile -util/sample_init_scripts/genders/systemd/Makefile -util/sample_init_scripts/genders/systemd/etc/Makefile -util/sample_init_scripts/genders/systemd/etc/sysconfig/Makefile -util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/Makefile -util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/Makefile -util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterSecrets/Makefile -util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/Makefile -util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/debug/Makefile -util/sample_init_scripts/genders/systemd/services/Makefile -util/sample_init_scripts/genders/sysv/Makefile -util/sample_init_scripts/genders/sysv/etc/Makefile -util/sample_init_scripts/genders/sysv/etc/init.d/Makefile -util/sample_init_scripts/genders/examples/Makefile lib/Doxyfile lib/Makefile lib/src/Makefile @@ -1106,13 +1073,6 @@ ldms/man/Makefile AC_CONFIG_FILES([ util/relocation/bld_manifest.sh util/relocation/relocate-paths.sh - util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd - util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldms-functions - util/sample_init_scripts/genders/systemd/ldmsd-pre-systemd - util/sample_init_scripts/genders/systemd/ldmsd-wrapper.sh - util/sample_init_scripts/genders/sysv/etc/init.d/ldmsd - util/sample_init_scripts/genders/sysv/etc/init.d/ldmsd.template - util/sample_init_scripts/genders/sysv/ldmsd-pre-sysvinit ldms/scripts/ldms-wrapper ldms/scripts/ldms-static-test.sh ldms/scripts/pll-ldms-static-test.sh diff --git a/packaging/make-all-rabbit.sh b/packaging/make-all-rabbit.sh index d5c162ea1..8493449eb 100755 --- a/packaging/make-all-rabbit.sh +++ b/packaging/make-all-rabbit.sh @@ -41,9 +41,9 @@ if test -f ldms/src/sampler/meminfo.c; then expected_ovislib_prefix=$prefix expected_sos_prefix=/badsos # auth + -a none -# allconfig="--prefix=$prefix --enable-rdma --enable-ssl --with-libevent=$expected_event2_prefix --disable-sos --disable-perfevent --enable-zap --enable-ovis_auth --enable-libgenders --with-libgenders=$HOME/ovis/init-2015 --enable-a-none --with-pkglibdir=ovis-ldms LDFLAGS=-fsanitize=address" +# allconfig="--prefix=$prefix --enable-rdma --enable-ssl --with-libevent=$expected_event2_prefix --disable-sos --disable-perfevent --enable-zap --enable-ovis_auth --enable-a-none --with-pkglibdir=ovis-ldms LDFLAGS=-fsanitize=address" # no auth -# allconfig="--prefix=$prefix --enable-rdma --enable-ssl --with-libevent=$expected_event2_prefix --disable-sos --disable-perfevent --enable-zap --disable-ovis_auth --enable-libgenders --with-libgenders=$HOME/ovis/init-2015 --with-pkglibdir=ovis-ldms" +# allconfig="--prefix=$prefix --enable-rdma --enable-ssl --with-libevent=$expected_event2_prefix --disable-sos --disable-perfevent --enable-zap --disable-ovis_auth --with-pkglibdir=ovis-ldms" # auth allconfig="--prefix=$prefix --enable-rdma --enable-ssl --with-libevent=$expected_event2_prefix --disable-sos --disable-perfevent --enable-zap --enable-ovis_auth --with-pkglibdir=ovis-ldms --enable-rabbitv3 --disable-rpath" ../configure $allconfig && \ diff --git a/util/Makefile.am b/util/Makefile.am index d1f3bdff7..7e96863a3 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -1,2 +1,2 @@ EXTRA_DIST= nola.sh -SUBDIRS= sample_init_scripts relocation +SUBDIRS= relocation diff --git a/util/sample_init_scripts/Makefile.am b/util/sample_init_scripts/Makefile.am deleted file mode 100644 index 4a6b803b8..000000000 --- a/util/sample_init_scripts/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ - -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts -SUBDIRS= genders -dist_doc_DATA = \ -README diff --git a/util/sample_init_scripts/README b/util/sample_init_scripts/README deleted file mode 100644 index 886605d14..000000000 --- a/util/sample_init_scripts/README +++ /dev/null @@ -1,7 +0,0 @@ -For TOSS deployment, see genders/. - This uses a cluster-wide genders file to manage - daemon config consistency under systemd or sysvinit. - -For other clusters see opt/ - This uses assorted local scripts to manage local daemons under systemd. - diff --git a/util/sample_init_scripts/genders/Makefile.am b/util/sample_init_scripts/genders/Makefile.am deleted file mode 100644 index ea32b3116..000000000 --- a/util/sample_init_scripts/genders/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ - -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts/genders - -if ENABLE_TOSS_SYSTEMD -SUBDIRS = src systemd sysv man examples -if ENABLE_LIBGENDERS -SUBDIRS += src -endif -endif - -dist_doc_DATA = \ -README diff --git a/util/sample_init_scripts/genders/README b/util/sample_init_scripts/genders/README deleted file mode 100644 index 01a1c636c..000000000 --- a/util/sample_init_scripts/genders/README +++ /dev/null @@ -1,45 +0,0 @@ -To use ldmsd with libgenders-based configuration, -copy the systemd/ or sysv/ files here into your /etc or imageroot/etc/ -and modify them, or use the relocatable TOSS rpms to install directly -with the localstatedir location used on your system. - -WITH RPM: -Assuming your system uses something writable other than /var as localstatedir: - rpm -Uvh --relocate /var=something ovis-3.*.rpm -Or if /var is writable by daemons, then just: - rpm -Uvh ovis-3.*.rpm - -WITH MANUAL copying: - -(assuming /var is localstatedir): - -For systemd on rhel (assuming ovis installed in /usr): -cp -r /usr/share/doc/ovis-3.3.1/sample_init_scripts/genders/systemd/etc / -cp /usr/share/doc/ovis-3.3.1/sample_init_scripts/genders/systemd/ldms*.service /usr/lib/systemd/system - -For sysvinit on rhel (assuming ovis installed in /usr): -Note that sysconfig content under sysv is a symbolic link to systemd sysconfig and under some -OS versions, /etc/init.d is itself a symbolic link to /etc/rc.d/init.d. So copy in chunks: - -cp -r /usr/share/doc/ovis-3.3.1/sample_init_scripts/genders/sysv/etc/init.d/ldms* /etc/init.d -cp -r /usr/share/doc/ovis-3.3.1/sample_init_scripts/genders/sysv/etc/sysconfig/ldms.d /etc/sysconfig/ - -Then for either systemd or sysvinit, modify -/etc/sysconfig/ldms.d/ClusterGenders/genders.local as needed. - -If desired, ldms attributes can be kept together with regular attributes in -/etc/genders. This will facilitate starting/stopping data collection with - pdsh -g ldmsd service ldmsd start -or - pdsh -g systemctl daemon-reload - pdsh -g systemctl start ldmsd - -Edit /etc/sysconfig/ldms.d/ldmsd.local.conf to specify the correct name of the -genders file for your system. Set LDMS_GENDERS=/pathname if you do not use an -/etc/genders or /etc/sysconfig/ldms.d/ClusterGenders/genders.local. - -Edit /etc/sysconfig/ldms.d/ldmsd.local.conf to specify the correct value of -LDMS_LOG_PATH if you want to log to a file rather than the syslog or journal. - -See man page ldms-attributes for attribute details in the genders file. -See man page ldmsd-genders for environment variables and daemon startup overview. diff --git a/util/sample_init_scripts/genders/examples/Makefile.am b/util/sample_init_scripts/genders/examples/Makefile.am deleted file mode 100644 index 6d5f4dc25..000000000 --- a/util/sample_init_scripts/genders/examples/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ - -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts/genders/examples - -dist_doc_DATA = \ -genders.shaun \ -README diff --git a/util/sample_init_scripts/genders/examples/README b/util/sample_init_scripts/genders/examples/README deleted file mode 100644 index 7d7e22c54..000000000 --- a/util/sample_init_scripts/genders/examples/README +++ /dev/null @@ -1 +0,0 @@ -This is where the examples will be once we have shaun up and running correctly. diff --git a/util/sample_init_scripts/genders/examples/genders.shaun b/util/sample_init_scripts/genders/examples/genders.shaun deleted file mode 100644 index cd23f1d94..000000000 --- a/util/sample_init_scripts/genders/examples/genders.shaun +++ /dev/null @@ -1,71 +0,0 @@ -# cluster topology -shaun[1-16] bootnode=shaun-admin,nfsmounts=/home -shaun-admin nfsmounts=/home -shaun user-login,nfs-server - -# Run data collectors -# 1 second sampling -shaun[1-16] ldmsd,ldmsd_dbg=ERROR -shaun-admin ldmsd,ldmsaggd=BOOTNODELIST,ldmsd_dbg=ERROR -shaun ldmsd,ldmsaggd=shaun-admin,ldmsd_dbg=ERROR - -shaun ldmsd_interval_default=1000000,ldmsd_offset_default=0 -shaun-admin ldmsd_interval_default=1000000,ldmsd_offset_default=0 -shaun[1-16] ldmsd_interval_default=1000000,ldmsd_offset_default=0 -shaun ldmsaggd_interval_default=1000000,ldmsaggd_offset_default=210000 -shaun-admin ldmsaggd_interval_default=1000000,ldmsaggd_offset_default=110000 - - -shaun ldmsd_port=411,ldmsd_xprt=sock -shaun[1-16] ldmsd_port=411,ldmsd_xprt=sock -shaun-admin ldmsd_port=411,ldmsd_xprt=sock -# or we could use the fast network -#shaun ldmsd_port=411,ldmsd_xprt=rdma -#shaun[1-16] ldmsd_port=411,ldmsd_xprt=rdma -#shaun-admin ldmsd_port=411,ldmsd_xprt=rdma -#shaun ldmsd_host=%n-ib0 -#shaun[1-16] ldmsd_host=%n-ib0 -#shaun-admin ldmsd_host=%n-ib0 - -# -## data collection -# - -shaun ldmsd_metric_plugins=meminfo:vmstat:procstat:procnetdev:sysclassib -shaun-admin ldmsd_metric_plugins=meminfo:vmstat:procstat:procnetdev:sysclassib:procnfs -shaun[1-16] ldmsd_metric_plugins=meminfo:vmstat:procstat:procnetdev:sysclassib:procnfs - -shaun[1-16] ldmsd_idbase=10000000 -shaun ldmsd_idbase=10020000 -shaun-admin ldmsd_idbase=10030000 - -shaun ldmsd_producer=%n -shaun-admin ldmsd_producer=%n -shaun[1-16] ldmsd_producer=%n - -# procstat plugin settings -shaun ldmsd_procstat=maxcpu/16:with_jobid/1 -shaun-admin ldmsd_procstat=maxcpu/16:with_jobid/1 -shaun[1-16] ldmsd_procstat=maxcpu/16:with_jobid/1 - -# procnetdev plugin settings: list interfaces to monitor by -# separated by & in the ifaces list -shaun ldmsd_procnetdev=with_jobid/1:ifaces/enp4s0f0&enp4s0f1&ib0 -shaun-admin ldmsd_procnetdev=with_jobid/1:ifaces/ens2f0&ens2f1&ib0 -shaun[1-16] ldmsd_procnetdev=with_jobid/1:ifaces/ens2f0&ib0 - -# meminfo plugin settings from text snippet -shaun ldmsd_config_text_meminfo=yes - -# vmstat plugin settings from config generator by full path name -# generator program named is passed arguments as documented in the -# man page ldms-attributes -shaun[1-16] ldmsd_config_gen_vmstat=/etc/sysconfig/ldms.d/plugins-conf/gen.vmstat -shaun-admin ldmsd_config_gen_vmstat=/etc/sysconfig/ldms.d/plugins-conf/gen.vmstat -shaun ldmsd_config_gen_vmstat=/etc/sysconfig/ldms.d/plugins-conf/gen.vmstat - -# -# data storage -# -shaun ldmsd_store_plugins=store_csv -shaun ldmsd_store_csv=altheader/1:rolltype/2:rollover/0:path//home/ovis/ClusterData/shaun/ldms diff --git a/util/sample_init_scripts/genders/man/Makefile.am b/util/sample_init_scripts/genders/man/Makefile.am deleted file mode 100644 index 10057bd66..000000000 --- a/util/sample_init_scripts/genders/man/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ - -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts/genders - -dist_man5_MANS= \ -ldms-attributes.man - -dist_man8_MANS= \ -ldmsd-genders.man \ -ldms-genders-examples.man \ -ldmsctl_args3.man diff --git a/util/sample_init_scripts/genders/man/ldms-attributes.man b/util/sample_init_scripts/genders/man/ldms-attributes.man deleted file mode 100644 index f28fae8d7..000000000 --- a/util/sample_init_scripts/genders/man/ldms-attributes.man +++ /dev/null @@ -1,429 +0,0 @@ -.\" Manpage for LDMS genders entries -.\" Contact ovis-help@ca.sandia.gov to correct errors or typos. -.TH man 5 "3 Feb 2019" "v4.3.3" "LDMSD libgenders-based attribute definitions" - -.SH NAME -ldms-attributes - attributes for the LDMS libgenders-based boot scripts - -.SH DESCRIPTION - -This page catalogs the attributes and their interpretations affecting LDMS v3 libgenders-based boot scripts. See ldmsd-genders(8) for an overview of the boot process and the environment variables which may override values in the genders file. - -New in LDMS version 3, attributes are provided enabling inclusion or generation of custom ldmsd configuration lines for plugins which are too complicated to configure with libgender attribute syntax. See the CUSTOMIZATION sections below. Also new, LDMS attribute processing extends the substitutions available in attribute values. See "Attribute value substitution" below for how to make ldmsd attribute definitions more concise. - -See "Deprecated attributes" (below) to see attributes no longer needed because ldms version 3 is more flexible. The boot scripts attempt to catch any unsupported version 2 attribute usage and make alternative hints. - -.SH GENERAL AND AGGREGATION HIERARCHY CONTROL ATTRIBUTES - -The following attributes define hierarchical and general local ldmsd behaviors. Details are given in later sections for those attributes controlling data collection and storage behaviors. In a few cases, the attribute prefix ldmsaggd is retained for compatibility with ldms version 2, even though the attribute may apply equally well to daemons that are not aggregating. In these cases, the defaults are usually sufficient for collector-only configurations. - -.PP -.nf - -Attribute What it does if defined for a node --------------- ---------------------------------------- -ldmsd Enables ldmsd sampling daemon -ldmsd_host=H Defines host name for the daemon used in data - connections. Typically, this is the name of the - node as it appears on a fast local network. -ldmsd_producer=PROD Defines the producer name reported in ldms data - files and user interfaces; typically a short form - of host name. -ldmsd_port=P Defines the port number for the data server. -ldmsd_xprt=X Defines protocol for data server connections. - Typically, one of sock, rdma, ugni. -ldmsd_auth=X Defines authentication for data server connections. - Typically, munge or ovis. 'none' is insecure. - Defaults to munge. -ldmsd_use_unix_socket=V If the value of V is "yes", a unix socket for - daemon control will be opened. -ldmsd_sockpath Defines the full filename of the unix socket. - If not present and unix socket is used, defaults - to $localstatedir/ldmsd/usock.$LDMSCLUSTER. -ldmsd_use_inet_socket=V If the value V is "yes", an INET socket for - daemon control will be opened. -ldmsd_config_port=R Defines the port number R of the INET socket. If - not present and INET socket is used, defaults to - 410. -ldmsd_id=EX Define per-node component_id. EX is an expression per - "Attribute value substitution with node name - fragments" below. The result must be decimal. - Overrides ldmsd_idbase and ldmsd_idsuffix. -ldmsd_idbase=IDMIN Defines the least component_id for a node type. - For a class of node names differing only in an - integer ISUFFIX, component_id is IDMIN+ISUFFIX. - component_id of 0 is reserved; ensure IDMIN+ISUFFIX>0. - Overrideable with the LDMSD_IDBASE environment - variable, which is not recommended except for - debugging. Overrideable with ldmsd_id. -ldmsd_idsuffix=EX Define per-node component_id ISUFFIX. EX is an - expression per "Attribute value substitution with - node name fragments" below. The result is added to - IDMIN. If not defined, the equivalent of %0D is used. -ldmsd_dbg=LEVEL Defines the daemon binary's logging level, with - values as defined in ldmsd(8) and NONE, - which routes all logging to /dev/null. -ldmsd_log=DEST Defines where to send log output. This may be - one of syslog, journal, NONE, or a directory - name. If a name, the directory will be created - and ldmsd.log.$LDMSCLUSTER is the file name. - DEST may contain ${} environment variables for - expansion. -ldmsd_vg=VGBIN Defines the full path to an executable wrapper - such as valgrind to be used for daemon launch. - Note this may be any audit tool, not just valgrind. - Interactions with the numactl environment may be - nontrivial to manage. -ldmsd_vgargfile=VGOPT Defines a file containing the command line - options to pass to VGBIN (as a single line). -ldmsd_proc=P Core to pin ldmsd to in many-core hosts. Active - only if NUMA-related environment variable is set - or a Phi processor is detected. - See ldmsd-genders(8). -ldmsaggd=LIST Enables aggregation, gathering from LIST. - LIST is : separated, containing hostnames, or - literals BOOTNODELIST, or CLIENTOFLIST or - AGGCLIENTOFLIST. See "Node Lists" below. -ldmsd_exclude_host Defines this host as excluded - from aggregation and collection activities, - even when the host appears in a list. -ldmsaggd_clientof=H Defines n-th level aggregation host. -ldmsaggd_event_thds=N Defines thread count used to manage events. -ldmsaggd_mem_res=M Defines DMA reservation size. -ldmsd_exclude_schemas=S Defines the list of schemas to exclude - from aggregation and storage. - -.br -.PP -.fi - -.SH SCHEDULING OF SAMPLING AND TRANSPORT - -These control when data is collected and moved. Defaults are applied to any sampler that is not more specifically defined with one of the SUFFIX forms. Times are in microseconds. If default and offset are not coordinated across the cluster, data loss and network contention may result. - -.PP -.nf - -Attribute What it does if defined for a node --------------- --------------------------------------- -ldmsd_interval_default=ISAMP Defines sampling interval time. -ldmsd_offset_default=OSAMP Defines offset from the time nearest - a whole number multiple of interval. -ldmsd_interval_SUFFIX=IPLUG As ISAMP, but for sets named by SUFFIX -ldmsd_offset_SUFFIX=OPLUG As OSAMP, but for sets named by SUFFIX - -ldmsaggd_conn_retry=CRI Defines the retry interval for data - connections. -ldmsaggd_interval_default=IAGG As ISAMP, but for aggregator schedule. -ldmsaggd_offset_default=OAGG As OSAMP, but for aggregator schedule. - -.br -.PP -.fi - -.SH DATA SAMPLER CUSTOMIZATION - -These attributes control what exactly is collected by defining key parts of the config command sent to the individual samplers. See "Plugin Config" below for the definition of PARAMLIST, FILE, and PROG. - -.PP -.nf -Attribute What it does if defined for a node --------------- ---------------------------------------- -ldmsd_metric_plugins=L Defines collector plugins to load as a : - separated list. May vary for node types - or individual nodes. -ldmsd_SUFFIX=PARAMLIST Defines SUFFIX plugin config arguments. -ldmsd_config_text_SUFFIX=FILE Defines SUFFIX plugin config file. -ldmsd_config_gen_SUFFIX=PROG Defines SUFFIX plugin config file - generator. - -# For example: -ldmsd_procnetdev=PARAMLIST Defines config flags of procnetdev. -ldmsd_sysclassib=PARAMLIST Defines config flags of sysclassib. -ldmsd_meminfo=schema/gw_meminfo Defines meminfo while overriding the schema name. - Schema renaming can prevent conflicts at csv stores. -ldmsd_config_text_meminfo=yes Appends /etc/sysconfig/ldms.d/plugins-conf/meminfo - to the standard plugin startup line. -ldmsd_config_gen_vmstat=yes Runs /etc/sysconfig/ldms.d/plugins-conf/gen.vmstat - and appends the output to the plugin - configuration file. - -.fi -.br -.PP - - -.SH STORAGE PLUGIN CUSTOMIZATION -.PP -.nf - -These control how storage is done with config commands. -See "Plugin Config" below for the definition of PARAMLIST. - -Attribute What it does if defined for a node --------------- ----------------------------------- -ldmsd_store_plugins=L Defines storage plugins to load as a : - separated list. See 'Plugin config' - below. -ldmsd_SUFFIX=PARAMLIST Defines SUFFIX plugin config arguments. -ldmsd_config_text_SUFFIX=FILE Defines SUFFIX plugin config file. -ldmsd_config_gen_SUFFIX=PROG Defines SUFFIX plugin config file - generator. -ldmsd_schemas_SUFFIX=S Defines schemas S to route to store - SUFFIX. Colon separated list S. -ldmsd_exclude_schemas_SUFFIX=S Defines schemas S to exclude from - store SUFFIX. Colon separated list S. -ldmsd_strgp_custom_STP=PARAMLIST - Defines STP storage policy config arguments - for a policy not defined in the standard pattern - ${SCHEMA}_${PLUGIN} with container=${PLUGIN}. - PARAMLIST MUST include - container/$CNAME:schema/$SC:plugin/$PINAME. - This provides for control of container names or - arbitrary storage policy names as may be needed - to store the same metric sets in multiple storage - configurations. -ldmsd_strgp_plugconf_STP=PARAMLIST - Defines plugin configuration arguments of the - plugin used by STP. This allows for overriding - ldmsd_SUFFIX default store plugin options. -.\ The strgp_producers commands operate on local producer object names, not -.\ the name of hosts as expected, so these next attributes don't work yet. -.\ldmsd_strgp_producers=S Defines default producers for storage policies. -.\ If not defined, the default set is '.*' (all). -.\ldmsd_strgp_producers_STP=S Defines producers for storage policy STP. -.\ If not defined, the default set is as for -.\ ldmsd_strgp_producers. -.\ldmsd_strgp_exclude_producers_STP=S -.\ Defines producers excluded from storage -.\ policy STP. -ldmsd_strgp_metrics_STP=M Defines metrics to include in storage for STP. - If not defined, ALL metrics are stored. M - is a : separated list of metric names. -ldmsd_strgp_exclude_metrics_STP=M - Defines metrics to exclude in storage for STP. - M is a : separated list of metric names. - If both metrics and exclude_metrics are defined, - the named included metrics are included, less - any in the excluded list. -ldmsd_strgp_names=STPLIST Defines the names of storage policies to start. - STPLIST is : separated. - The default value of STPLIST if undefined is the - combination of the plugins PI listed in - ldmsd_store_plugins iterated over their - respective schemas SC, yielding names in the - format ${SC}_${PI}. ldmsd_schemas_${PI} defines - the values of SC for that plugin. - If STPLIST is defined, it may contain the name - 'default' to generate the standard combinations, - and any additional custom storage policy names. - If default is not included, only the policies - named with be generated. - -For example: -.nf -ldmsd_strgp_names=default:memsmall - -ldmsd_store_csv=path//scratch/ldms/csv -ldmsd_strgp_names=default:mem_small -ldmsd_strgp_custom_meminfo_store_csv=container/memfull:schema/meminfo:plugin/store_csv -ldmsd_strgp_plugconf_meminfo_store_csv=rolltype/2:rollover/40 - -ldmsd_strgp_custom_memsmall=container/memsmall:schema/meminfo:plugin/store_csv -ldmsd_strgp_plugconf_memsmall=altheader/1 -ldmsd_strgp_metrics_memsmall=Active:MemAvailable:Dirty -ldmsd_strgp_exclude_metrics_memsmall=MemAvailable - -.\ NOT supported yet. need different strgp producers semantics -.\ldmsd_strgp_producers_sysclassib_store_csv=gateway.*:admin.* -.\ Stores data from hostname prefix 'gateway' -.\ and from hostname prefix 'admin' nodes. -.\ldmsd_strgp_exclude_producers_meminfo_store_csv=backup.* -.\ Excludes hosts with prefix 'backup' from -.\ policy meminfo_store_csv. -ldmsd_strgp_metrics_meminfo_store_csv=Active:MemFree:Dirty:MemTotal:NFS_Unstable -ldmsd_strgp_exclude_metrics_meminfo_store_csv=VmallocTotal -.fi -.br -.PP -.fi - -.SH Plugin Config -.PP -A plugin's options may be configured by attribute values, a static text file -snippet, or a generated text for complicated cases. The static, generated, and attribute-defined configuration cases are explained here. Herein the suffix 'SUFFIX' on attribute names is replaced with a specific plugin name to control that plugin. FILE is normally a full path name. -.PP -A static plugin configuration file for a specific plugin can be used by defining -.B ldmsd_config_text_SUFFIX=FILE. -Only the plugin specific options should appear in the text; standard options are generated. If FILE is 'yes', then /etc/sysconfig/ldms.d/SUFFIX is read as a text file. -If FILE is a partial path name, it will be appended to /etc/sysconfig/ldms.d/ and used. The daemon init script will start the plugin after applying the configuration text. -.PP -A generated configuration file for a specific plugin can be used by defining attribute -.B ldmsd_config_gen_SUFFIX=PROG. -The program PROG will be invoked with arguments and should write the entire configuration and start command set needed to its standard output. If PROG is 'yes', then /etc/sysconfig/ldms.d/gen.SUFFIX is expected to be a program. -If PROG is a partial path name, it will be appended to /etc/sysconfig/ldms.d/ and used as a program. This is the recommended route if multiple instances of the same sampler plugin will be in use. For samplers, the generator program will receive arguments: $plugin-name $producer-name $host $sample_interval $sample_offset. For stores, the generator program will receive arguments: $plugin-name $host [$schemas]*, where there will be 0 or more schema names separated by white space each as a separate argument. - -.PP -The normal libgenders attribute-value syntax is: -.BR -key1=value,key2=value2 -where values may not contain whitespace, = or comma characters. -.PP -The ldms configuration list syntax is "key=value key=value ..." -where value may contain commas. This syntax is used in static text -file snippets. -.PP -The ldmsd plugin configuration syntax mapped to gender attribute -syntax is: -.BR -ldmsd_$S=$C/value[:$C/value]* -.PP -where: -.nf -$S is the plugin name. -$C is the name of a plugin parameter. -: separates additional parameter assignments. -The first / after the = or a : separates a parameter name -from its value. -The & is used to separate list values rather than commas. -.fi - -.PP -This syntax reconciles the libgenders comma/=/whitespace rules with the -LDMS key=comma-separated-value configuration parameter syntax. -Parameters become :-separated keys with &-separated-values lists. -Any / preceding a : except the first is taken as a literal character. - -This translation mode is used for sampler, storage, and transport -plugin configuration attributes where needed. - -.SH Storage specific plugin configuration -.PP -To support the most common usage, the names of all active collector plugins found in the genders file are assumed to be valid schema names. LDMSD_SCHEMA_LIST or ldmsd_schemas_SUFFIX overrides this assumption. When the genders file omits data about the collector nodes (as may happen on a higher level LDMS aggregator) or the schema names do not match the collector plugin names, use of ldmsd_schemas_SUFFIX or LDMSD_SCHEMA_LIST is required. -When multiple schema are generated from the same collector plugin, the ldmsd_schemas_SUFFIX attribute or the LDMSD_SCHEMA_LIST environment variable is required. ldmsd_schemas_SUFFIX is recommended. -.PP -By default (when no ldmsd_schemas_SUFFIX is defined), all schemas are routed to all loaded storage plugins. - -.SH Node Lists -.PP -There are several special values for managing groups of LDMS data sources: -BOOTNODELIST, LDMSDALL, CLIENTOFLIST, and AGGCLIENTOFLIST. Explicitly -naming individual nodes in a node list is rarely desirable. - -.PP -The keyword BOOTNODELIST is replaced with the list of nodes with the attribute "bootnode" having a value matching the name of the aggregator host. - -.PP -The keyword LDMSDALL is replaced with the list of all nodes with the attribute "ldmsd". Useable in small clusters with a single aggregator. - -.PP -If something other than boot nodes is the basis of aggregation, the layout can be specified. E.g., a set of monitoring nodes prefixed mon aggregating subsets of compute nodes: -.nf - mon[1-4]: ldmsaggd=CLIENTOFLIST - compute[1-300] ldmsd_clientof=mon1 - compute[301-600] ldmsd_clientof=mon2 - compute[601-900] ldmsd_clientof=mon3 - compute[901-1200] ldmsd_clientof=mon4 -.fi -.PP -CLIENTOFLIST is computed as: -.BR - nodeattr -c ldmsd_clientof=H -.PP -on each mon host H. -.PP - -.PP -To run 2nd and higher level aggregators, aggregator hierarchy relationships must be specified. If we need in-platform data for applications seeking -a global performance views, a top level aggregator pulling from other aggregators can be defined with AGGCLIENTOFLIST thus: -.nf - montop ldmsaggd=AGGCLIENTOFLIST - mon[1-4] ldmsaggd_clientof=montop -.fi -.PP -AGGCLIENTOFLIST is computed as: -.nf - nodeattr -c ldmsaggd_clientof=montop -.fi -.PP -on the montop host. - -If nodes mon[1-4] are themselves to be monitored by montop, then they must have both ldmsaggd and ldmsd gender values. In this case, both special list variables are used: -.nf - montop ldmsaggd=AGGCLIENTOFLIST:CLIENTOFLIST -.fi - - -.SH Attribute value substitution with node name fragments - -Libgenders supports replacing "%n" (unqualified node name) in attribute values. -LDMS attribute processing extends this to include extraction and reuse of various node name fragments by position. This enables the collapse of certain voluminous attribute definitions into a single line. The additional substitutions supported are %N[d,D,m,u] which take the Nth fragment of the type indicated by d, D, m, or u from the node name. The fragment types d, D, m, u are, respectively, an integer segment embedded in the node name, an integer segment trimmed of leading zeroes, a segment separated by the '-' character from other segments of the node name, and a segment separated by the '_' character from other segments. Note that the m and u segment types do not exclude digits within. Segments are numbered from 0. - -For example the attribute definitions: -.nf - sc-login[1-8] ldmsd_host=sc-lsm%0d-ib0 - sc-login[1-8] ldmsd_clientof=sc-rps%0d - sc-gw[1-48] ldmsd_host=i-%1m -.fi -replace the many similar definitions under libgenders substitution rules: -.nf - sc-login1 ldmsd_host=sc-lsm1-ib0 - sc-login1 ldmsd_clientof=sc-rps1 - sc-gw1 ldmsd_host=i-gw1 - ... -.fi - -.SH NOTES - -.SH Deprecated attributes - -Some attributes supported in ldmsd version 2 are no longer needed in version 3. -If detected, errors will be issued. -.nf -Attribute deprecated See instead ---------------- ----------------------------- -ldmsaggd_port=N ldmsd_port -ldmsaggd_host=H ldmsd_host -ldmsaggd_xprt=X ldmsd_xprt -ldmsaggd_dbg=LEVEL ldmsd_dbg -ldmsaggd_stores=L ldmsd_store_plugins -ldmsd_metric_sets=L ldmsd_metric_plugins -ldmsaggd_store_csv ldmsd_store_csv -ldmsaggd_conn_thds ldmsd_event_thds -ldmsaggd_num_procs ldmsd_event_thds -.fi - -.SH Features not yet supported -.PP -These attributes are not yet supported by init scripts: - -.nf - -ldmsaggd_fail=H Defines aggregation host to take over if - this node fails. -ldmsaggd_interval_SUFFIX=IAGGS As ISAMP, but for aggregating schema - SUFFIX. -ldmsaggd_offset_SUFFIX=OAGGS As OSAMP, but for aggregating schema - SUFFIX. - -.fi - -.SH BUGS -.PP -Some features listed not yet supported, as marked. -.PP -Typos in the ldms attribute names may lead to silent application of defaults. -.PP -Attribute value substitution based on hostname fragments is not yet supported for plugin options. - - -.SH EXAMPLES -.PP -See /usr/share/doc/ovis-$version/sample_init_scripts/genders/examples/. - -It presents a small cluster, shaun, in ldmsd attributes, with a single aggregator running on shaun-admin and a second level aggregator running on shaun-login as the storage daemon. Subtleties handled in the example include use of Infiniband hostnames and ports. - - -.SH SEE ALSO -libgenders(3), ldmsd(8), ldmsd-genders(8), ldms-genders-examples(8) - diff --git a/util/sample_init_scripts/genders/man/ldms-genders-examples.man b/util/sample_init_scripts/genders/man/ldms-genders-examples.man deleted file mode 100644 index 31ca65412..000000000 --- a/util/sample_init_scripts/genders/man/ldms-genders-examples.man +++ /dev/null @@ -1,140 +0,0 @@ -.\" Manpage for ldmsd gender configuration examples. -.\" Contact ovis-help@ca.sandia.gov to correct errors or typos. -.TH man 8 "15 Aug 2019" "v4.2" "ldmsd man page" - -.SH NAME -ldmsd - -.SH DESCRIPTION -The ldmsd genders-based configuration provides declarative, cluster-oriented -specification of common ldmsd tasks with little or no repetition of information. -Conventions for configuration file locations are followed, but can be overridden following the documentation in ldmsd-genders(8). - -Configuration of storage policies and samplers is covered in ldms-attributes(5). -Data aggregation hierarchies are described by example here. The design of ldmsd does not allow the daemon which samples data to be the daemon which stores the sampled data; to store data, there must be at least one other daemon instance. - -Systemd allows multiple distinct instances of ldmsd to be run simultaneously. -Conventionally, the default local instance (used for operating samplers on its node) is enabled with - - systemctl start ldmsd - -after configuring /etc/sysconfig/ldms.d/ldmsd.local.conf and /etc/sysconfig/ldms.d/ClusterGenders/genders.local. - -Normally, only the LDMS_AUTH_FILE and LDMS_AUTH_TYPE need to be defined in ldmsd.local.conf; see ldms_auth_ovis(7) for details. The sampler configuration details are defined in genders.local, following the examples in ldms-attributes(5) or Plugin_$SAMPLER man pages. - -Conventionally, a first level aggregator is configured as the 'agg' instance of ldmsd. The configuration files are /etc/sysconfig/ldms.d/ldmsd.agg.conf and /etc/sysconfig/ldms.d/ClusterGenders/genders.agg. Normally, only LDMS_AUTH_FILE, LDMS_AUTH_TYPE, and LDMS_GENDERS_1 need to be defined. The file named by LDMS_GENDERS_1 is the genders configuration file of the directly upstream daemons. If it is not referenced, much of the information it contains must be duplicated in genders.agg. The aggregator is started with - - systemctl start ldmsd@agg - - -.PP -The simplest case of ldmsd is a sampler daemon and an aggregator daemon on the same node in a larger cluster. The configuration files could look like: -.SH EXAMPLE 1 -.PP -.nf -::: /etc/sysconfig/ldms.d/ldmsd.local.conf ::: -LDMS_AUTH_FILE="/etc/sysconfig/ldms.d/ClusterSecrets/ldmsauth.conf" -LDMS_AUTH_TYPE=ovis -:::::::: - -::: /etc/sysconfig/ldms.d/ldmsd.agg.conf ::: -LDMS_AUTH_FILE="/etc/sysconfig/ldms.d/ClusterSecrets/ldmsauth.conf" -LDMS_AUTH_TYPE=ovis -#LDMS_GENDERS="/etc/sysconfig/ldms.d/ClusterGenders/genders.agg" -# use of the default means we don't need to define LDMS_GENDERS -# but for aggregators we must list the upstream genders file explicitly. -LDMS_GENDERS_1="/etc/sysconfig/ldms.d/ClusterGenders/genders.local" -:::::::: - -::: /etc/sysconfig/ldms.d/ClusterGenders/genders.local ::: -# This file assumes the answer to `hostname` is in the range 'node[1-10]' -# Globally replace 'node' with your compute node name prefix and tailor -# the node numbering. -# enable ldmsd -node[1-10] ldmsd -# 1 second sampling -node[1-10] ldmsd_interval_default=1000000,ldmsd_offset_default=0 -# export data via rdma on port 411 and the ib hostname of node -node[1-10] ldmsd_port=411,ldmsd_xprt=rdma -node[1-10] ldmsd_host=%n-ib0 -# metric plugins to use -node[1-10] ldmsd_metric_plugins=jobinfo:meminfo:vmstat:procstat:procnetdev -# The component_id for nodes is computed by adding ldmsd_idbase to the -# integer suffix extracted from the host name. This is not mandatory, but typical. -node[1-10] ldmsd_idbase=5200000 -# procstat plugin settings; tailor to your core count and hyperthreading -node[1-10] ldmsd_procstat=job_set/%n/jobinfo:maxcpu/72:schema/procstat72 -# procnetdev plugin settings: list interfaces to monitor by -# separated by & in the ifaces list; tailor to your NIC list. -node[1-10] ldmsd_procnetdev=job_set/%n/jobinfo:ifaces/eno2&ib0 -:::::::: - - -::: /etc/sysconfig/ldms.d/ClusterGenders/genders.agg ::: -# agg daemon samplers for Level 2 daemon consumption -node1 ldmsd_metric_plugins=dstat -# dstat plugin settings -node1 ldmsd_dstat=stat/1:statm/1:mmalloc/1:io/1 -# agg daemon listener for TCP -node1 ldmsd_port=412,ldmsd_xprt=sock -# upstream daemon topology to aggregate from -node[1-10] ldmsd_clientof=node1 -node1 ldmsaggd=CLIENTOFLIST -# store options -node1 ldmsd_store_plugins=store_csv -# data schemas we want stored via csv -node1 ldmsd_schemas_store_csv=vmstat:procstat72:procnetdev:meminfo:jobinfo -# csv plugin options -node1 ldmsd_store_csv=path//mnt/netapp/ldms/clusterA:altheader/0:rolltype/1:rollover/86400:buffer/0 -:::::::: - -.br -.fi - -.SH EXAMPLE 2 -A second level of aggregation, typically outside the cluster, is often needed. -Conventionally, this will be configured on another monitoring host and started with - - systemctl start ldmsd@clusterA - -for a cluster named 'clusterA'. To avoid repetition, the first level aggregator and sampler genders files are shared with the monitoring host, either by a shared file system or a process which synchronizes the local copies on the monitoring host. For this example, we assume the latter. Any manual overrides in the ldmsd.*.conf files are lost, of course. -.PP -.nf -::: /etc/sysconfig/ldms.d/ldmsd.clusterA.conf ::: -LDMS_AUTH_FILE="/etc/sysconfig/ldms.d/ClusterSecrets/ldmsauth.conf" -LDMS_AUTH_TYPE=ovis -LDMS_GENDERS="/etc/sysconfig/ldms.d/ClusterGenders/genders.clusterA" -# the next two are identical to the genders file in example 1 with corresponding names. -LDMS_GENDERS_1="/shared/ClusterGenders/clusterA/genders.agg" -LDMS_GENDERS_2="/shared/ClusterGenders/clusterA/genders.local" -# define a variable for port, as there may be clusterB,C,etc. -CLUSTERA_PORT=413 -:::::::: - -::: /etc/sysconfig/ldms.d/ClusterGenders/genders.clusterA ::: -# Level 2 daemon configuration on host 'monbox' -monbox ldmsd_metric_plugins=dstat -# dstat plugin settings -monbox ldmsd_dstat=stat/1:statm/1:mmalloc/1:io/1 -# agg daemon listener for TCP -monbox ldmsd_port=${CLUSTERA_PORT},ldmsd_xprt=sock -# upstream daemon topology to aggregate from -monbox ldmsaggd=node1 -# store options -monbox ldmsd_store_plugins=store_csv -# data schemas we want stored via csv -monbox ldmsd_schemas_store_csv=vmstat:procstat72:procnetdev:meminfo:jobinfo -# csv plugin options -monbox ldmsd_store_csv=path//mnt/netapp/ldms/monbox:altheader/0:rolltype/1:rollover/86400:buffer/0 -:::::::: -.fi -.PP -Note that the ordering of LDMS_GENDERS_1 and LDMS_GENDERS_2 matters. The sampler-only nodes come last. - -.SH BUGS -There is not presently support for LDMS_GENDERS_3. - - -.SH SEE ALSO -ldms-attributes(5), ldmsd-genders(8), ldms_auth_ovis(7) - diff --git a/util/sample_init_scripts/genders/man/ldmsctl_args3.man b/util/sample_init_scripts/genders/man/ldmsctl_args3.man deleted file mode 100644 index 7b59b5608..000000000 --- a/util/sample_init_scripts/genders/man/ldmsctl_args3.man +++ /dev/null @@ -1,58 +0,0 @@ -.\" Manpage for ldmsctl_args3 -.\" Contact ovis-help@ca.sandia.gov to correct errors or typos. -.TH man 8 "29 Aug 2017" "v3.4" "ldmsd man page" - -.SH NAME -ldmsctl_args3 \- Compute ldmsd configuration commands from genders data for a host. - -.SH SYNOPSIS -ldmsctl_args3 [OPTION...] - -.SH DESCRIPTION -The ldmsctl_args3 generates configuration commands needed for an -an ldms daemon based on a genders input file. - -.SH OPTIONS -.SS -General/Configuration Options: -.TP -.BI -g/--genders " file" -Process the genders file named. Default is /etc/genders -.TP -.BI -n/--node " hostname" -Emit results for the given host. -.TP -.BI -t/--task " TASK" -Emit results for the given TASK, which is currently host-list (aggregator configuration) -and store-list (a list of schema detected and visible at the given node. -.TP -.BI -i/--interval " INTERVAL" -.br -INTERVAL value overriding interval_default gender. -.TP -.BI -o " OFFSET" -OFFSET value overriding offset_default gender. -.TP -.BI -v/--verbose " N" -Emit debugging messages for N > 0. Higher N gives more info. -.TP -.BR -O/--output " file" -Dump result to file instead of screen. - -.SH NOTES -Task options are in development. - -.SH BUGS -Output option does not work yet. - -.SH EXAMPLES -.PP -.nf -$ ldmsctl_args3 -g genders.in.test -n cluster_admin1 -.br -.fi - - -.SH SEE ALSO -ldms-attributes(5), ldmsd-genders(8) - diff --git a/util/sample_init_scripts/genders/man/ldmsd-genders.man b/util/sample_init_scripts/genders/man/ldmsd-genders.man deleted file mode 100644 index 8868b5917..000000000 --- a/util/sample_init_scripts/genders/man/ldmsd-genders.man +++ /dev/null @@ -1,311 +0,0 @@ -.\" Manpage for LDMSD managed with genders -.\" Contact ovis-help@ca.sandia.gov to correct errors or typos. -.TH man 8 "7 Feb 2017" "v3.5.0" "LDMS genders-based daemon boot information" - -.SH NAME -ldmsd-genders - Running ldmsd with genders under systemd or sysvinit boot scripts - -.SH SYNOPSIS -For systemd: - -.B systemctl -start ldmsd - -.B systemctl -stop ldmsd - -For sysvinit: - -.B service -ldmsd start - -.B service -ldmsd stop - -.SH DESCRIPTION - -This page provides an overview of the ldmsd launch process using libgenders. Use of libgenders allows a succinct, declarative style of configuring ldmsd in complex multi-cluster environments as well as on single machines. See ldms-attributes(5) for information on specific attribute names and their interpretation. For init-script independent environment variables affecting the daemon binary, see ldmsd(8). - -The genders options are applied at daemon startup. Ldmsd must be restarted before changes to a genders file will be applied, and dynamic daemon configuration with python is not required. - -New in LDMS version 3, genders are provided enabling inclusion or generation of custom ldmsd configuration lines for plugins which are too complicated to configure with gender options. For details on tailoring plugin configuration, see ldms-attributes(5). - -When ldmsd is started, the init scripts (systemd or sysvinit) generate a shell environment file and an ldmsd plugins configuration file. The content of these files and behavior of ldmsd is affected by the files under /etc/sysconfig/ldms.d/. - -It is common for LDMS data storage to be configured outside a cluster on a machine serving several clusters. To support this, options exist for simultaneously running several service instances on the storage service machine using separate gender and configuration files. - - -.SH Installing and running gender-based init scripts under systemd - -For hosts operating under systemd, the service files ldmsd.service and ldmsd@.service are normally installed in /usr/lib/systemd/system (/lib/systemd/system under Debian Linux variants). Installation (unless RPMs are used) is by copying from the subdirectories of /usr/share/doc/ovis-VERSION/sample_init_scripts/genders/systemd into corresponding etc/sysconfig, and lib/systemd/system locations. For testing and local modification, the same files can be copied /etc/systemd/system, which will override those in /usr/lib/systemd. Once copied, 'systemctl daemon-reload' will add the services to the system. - -Within a cluster, when the ldmsd service is started with 'systemctl start ldmsd' the service script loads environment variable customizations first from /etc/sysconfig/ldms.d/ldmsd.local.conf. It applies the genders file information, then generates the environment and plugin configuration files needed by the ldmsd binary and launches that binary. - -On a data storage host handling multiple clusters, a separate ldmsd instance is configured and run for each cluster. The service ldmsd@$LDMSCLUSTER reads its configuration information from /etc/sysconfig/ldms.d/ldmsd.$LDMSCLUSTER.conf. - -.SH Installing and running gender-based init scripts under sysvinit - -For hosts operating under sysvinit, a boot script file ldmsd is normally installed in /etc/init.d. Installation (unless RPMs are used) is by copying from the appropriate subdirectories of /usr/share/doc/ovis-VERSION/sample_init_scripts/genders/sysv into /etc and /usr/bin. - -Within a cluster, when the ldmsd service is started with 'systemctl start ldmsd' the service script loads environment variable customizations first from /etc/sysconfig/ldms.d/ldmsd.local.conf. It applies the genders file information, then generates the environment and plugin configuration files needed by the ldmsd binary and launches that binary. - -On a data storage host handling multiple clusters, a separate ldmsd instance is configured and run for each cluster. Creating each instance requires generating a tailored init script. See 'Generating sysvinit ldmsd instances' below. The each instance reads its configuration information from /etc/sysconfig/ldms.d/ldmsd.$LDMSCLUSTER.conf, just as with the systemd version. - - -.SH TUNING THE LDMSD RUNTIME BEHAVIOR WITH ENVIRONMENT VARIABLES - -Regardless of the sysvinit or systemd choice, the following variables affect the launch of ldmsd when specified in ldmsd.local.conf (or ldmsd.$LDMSCLUSTER.conf). -They are grouped by role: generally applicable, collection, aggregation, or storage, or experimental. - -.SH Tuning variables for ldmsd in any role (collection, aggregation, storage) - -.PP -.B LDMSD_PLUGIN_CONFIG_FILE=/path/to/file - -If defined, this overrides the plugin configuration from gender information completely. The file is staged to /var/run/ldmsd/ at daemon launch. - -.B LDMSD_DEBUG_CONFIG_FILE=/path/to/debug/file - -If defined pointing to an ldmsd configuration file and LDMSD_PLUGIN_CONFIG_FILE -is not defined, then the content of this file is appended to the generated -configuration file. It is used to send custom ldmsd debugging commands at startup after the generated commands are all sent. - -.B LDMSD_DBG=level - -If not defined, defaults to 'error' level of logging from the daemon binary. -Valid level names are as given in ldmsd(8). - -.B VERBOSE=-v - -If VERBOSE is defined as "-v", additional messages will be logged from the init scripts. - -.B LDMS_AUTH_TYPE=type - -If set, overrides the gender ldmsd_auth, defining the authentication plugin default set on the command line. -This variable defines the type of authentication to use. The supported types are 'ovis' (the v3 secretword file) and 'munge'. See ldms_authentication(7) for details. - -.B LDMS_AUTH_FILE=filename - -If using authentication type 'munge', this variable defines the path passed to munge with the -S argument. It must be a socket name. - -If using authentication type 'ovis', this variable defines the file of the secret network key needed if any aggregation is to take place, assuming authentication is compiled in the ldmsd installation. For production use, authentication should always be used. see ldms_authentication(7). Alternatively, a correct LDMS_SECRETS_DIR defined (as below), will be used to construct the file name automatically. - -.B LDMS_SECRETS_DIR=dirname - -If set, overrides the default /etc/sysconfig/ldms.d/ClusterSecrets location of -authentication key files. On multi-instance storage hosts, a secret is expected to be in file $LDMS_SECRETS_DIR/$LDMSCLUSTER.ldmsauth.conf for each cluster instance LDMSCLUSTER being served. Setting LDMS_AUTH_FILE explicitly overrides LDMS_SECRETS_DIR. - -.B LDMSD_XPRT=x - -This overrides gender ldmsd_xprt, defining the data transport plugin. -If not defined, x is 'sock'. The allowed values of x are 'rdma', 'sock', or 'ugni' (Cray). - -.B LDMSD_PORT=N - -This overrides gender ldmsd_port, defining the data transport port number. -If neither is defined defined, N defaults to 411. - -.B LDMS_LOG_PATH=x - -This overrides gender ldmsd_log. If neither the gender nor LDMS_LOG_PATH is defined, journal is used. The allowed values of x are 'NONE', 'syslog', 'journal', and a directory name. If systemd and journal cannot be detected, syslog should be used. If NONE, all log messages will go to /dev/null. In the directory case, the log file will be $LDMS_LOG_PATH/ldmsd.log.$LDMSCLUSTER. - -.B LDMS_USE_GENDERS=0 - -If LDMS_USE_GENDERS is defined as 0, genders information will not be queried at all. Most likely this will result in failure to start unless LDMSD_PLUGIN_CONFIG_FILE is also defined. This feature is still in development. - -.B LDMS_GENDERS="file list" - -The files listed in LDMS_GENDERS are concatenated and used for genders queries. -In simple installations, LDMS_GENDERS=/etc/sysconfig/ldms.d/ClusterGenders/genders.local or LDMS_GENDERS=/etc/genders is typical. -If unset, /etc/sysconfig/ldms.d/ClusterGenders/genders.$LDMSCLUSTER and /etc/genders are checked and the first found is used as the default. If none of these are present, startup will fail. -.PP -The normal reasons for setting an LDMS_GENDERS list is to support splitting administrative duties. For example, on a storage machine, join a copy if the genders file from a cluster monitored to the genders needed for configuring stores on the specific storage machine. Since more than one storage machine might be serving a cluster or the storage machine may be in a different administrative domain, this splitting of the gender file maintenance duties is often desirable. - -.B LDMS_GENDERS_1="file list" -.B LDMS_GENDERS_2="file list" - -The files listed in LDMS_GENDERS_1 or LDMS_GENDERS_2 are concatenated and used for genders queries about upstream ldmsd daemons not configured in LDMS_GENDERS. -This allows an aggregator or storage daemon instances to query at startup the possible metric plugins and schemas of collector daemon instances configured in LDMS_GENDERS_1 or LDMS_GENDERS_2. There is no default assumed if these variables are undefined. The files in LDMS_GENDERS_1 are handled as a group separately from LDMS_GENDERS_2 when making queries. - -.B LDMS_GENDERS_HOST=name - -If defined, this overrides the name of the local host when making gender queries. If undefined, the leading word from the output of `hostname` is used by default. The use of this variable is to allow independent redundant servers to run using the same genders file. - -.B LDMSD_USE_UNIX_SOCK=yes - -If defined, this overrides gender ldmsd_use_unix_socket. If LDMSD_USE_UNIX_SOCK=yes, a Unix socket will be created for local control of the daemon - -.B LDMSD_SOCKPATH=/path/to/sockdir/file - -If defined, this overrides gender ldmsd_sockpath. If neither the gender nor the environment variable is defined, the default /var/run/lmdsd/usock.$LDMSCLUSTER is opened when the unix socket is enabled. - -.B LDMSD_USE_INET_SOCK=yes - -If defined, this overrides gender ldmsd_use_inet_socket. If either the gender or the environment variable is defined as "yes", a network socket will be created for network control of the daemon. - -.B LDMSD_CONFIG_PORT=R - -If defined, this overrides gender ldmsd_config_port. If neither gender nor environment variable is defined, the default port number 410 is used when inet socket is enabled. - -.B LDMSD_EVENT_THDS=N - -Overrides with N the ldmsd_event_thds gender value. If neither is specified, the default is 4. - -.B LDMSD_START_HOOKS="file list" - -Defines the list of bash fragments run in the ldmsd startup script environment just before the daemon binary. Any listed file not found is ignored with a log message. Files listed must be bash-compatible. The recommended location for fragment files is /etc/sysconfig/ldms.d/plugins-conf. - -.SH Tuning variables for ldmsd in a collection role - -.B COMPONENT_ID=K - -If defined, this overrides the component_id derived from the host name. In cluster deployments, this should never be defined as a constant. This value is expected to be a positive (nonzero) integer unique to each host in the ldmsd aggregation hierarchy, if not across the entire site. Specific logic computes a default value of COMPONENT_ID for cray hosts. - -.B LDMSD_IDBASE=P - -If defined when COMPONENT_ID is not, P is added to the number extracted from the host name and used as the COMPONENT_ID in non-Cray environments. Overrides gender ldmsd_idbase. Alias NODE_ID_BASE is deprecated; when both present LDMSD_IDBASE takes precedence. - -.B AGG_ID_BASE=Q - -If defined when COMPONENT_ID (or ldmsd_id) is not, Q is added to the number extracted from the host name and used as the COMPONENT_ID in non-Cray environments. This overrides NODE_ID_BASE. - -.SH Tuning variables for ldmsd in an aggregation role - -.B LDMSAGGD_MEM_RES=size - -If defined, this sets the memory size visibly on the daemon command line. Otherwise the default will apply or the LDMSD_MEM_SZ environment variable (if set in the conf file) will be used. - -.B LDMSAGGD_CONNECTION_RETRY_INTERVAL=microseconds - -Overrides ldmsaggd_conn_retry gender. If not set, defaults to 2000000 (2 seconds). - -.B LDMSAGGD_INTERVAL_DEFAULT=microseconds -Overrides ldmsaggd_interval_default gender. If not set, defaults to 10000000 (10 seconds). This value is used if a host-specific ldmsaggd_interval gender is not defined. - -.B LDMSAGGD_OFFSET_DEFAULT=microseconds - -Overrides ldmsaggd_offset_default gender. If not set, defaults to 200000 (0.2 seconds). This value is used if a host-specific ldmsaggd_offset gender is not defined. - -.SH Tuning variables for ldmsd in a storage role - -.B LDMSD_SCHEMA_LIST=schema-name-list - -Override the list of plugin names computed from ldmsd_metric_plugins and ldmsd_schemas_extra on all aggregated nodes. The LDMSD_SCHEMA_LIST is then used in configuring stores. - -.B LDMSD_EXCLUDE_SCHEMA_LIST=schema-name-list - -Override the schemas in attribute ldmsd_exclude_schemas, excluding schema-name-list from all store plugins. - -.SH Experimental tuning of the ldmsd runtime environment - -.B LDMSD_NUMA=yes - -If LDMSD_NUMA is defined to any nonempty value, or Xeon Phi hardware is detected in a Cray environment, ldmsd will be pinned using numactl --physcpubind=$CORE to the core defined in the LDMSD_PROC environment variable or by the ldmsd_proc gender. -If neither specifies a core number, 67 is the default. - -.PP -Defining the following variables in the configuration file may lead to surprises in the behavior of a hierarchical ldmsd setup. In particular, the environment on one node may be made inconsistent with the environment on other nodes. - -.B LDMSD_METRIC_PLUGINS=plugin-name-list - -If defined, this overrides the ldmsd_metric_plugins gender. In hierarchical aggregation settings, this may lead to incorrect storage configuration and loss of data unless a corresponding value is set on all other nodes in the hierarchy. - -.B LDMSD_STORE_PLUGINS=store-plugin-name-list - -If defined, this overrides the ldmsd_store_plugins gender. - -.B LDMSD_INTERVAL_DEFAULT=DT - -If set, overrides gender ldmsd_interval_default used to control sampling rate. - -.B LDMSD_OFFSET_DEFAULT=DT - -If set, overrides gender ldmsd_interval_default used to control sampling rate. - -.B VGBIN=/usr/bin/valgrind - -If set, overrides gender ldmsd_vg defining the wrapper tool location. Must be a full path. -May be any wrapper tool, not just valgrind. - -.B VGOPT="argument list" - -If set, overrides argument data pointed to in gender ldmsd_vgargfile. -Ignored if VGBIN and gender ldmsd_vg are both undefined. - -.PP - -.SH FILES -The location of the files mentioned below varies with installation prefix (normally usr) and the value of sysconfdir (normally etc). -.TP -.I /var/run/ldmsd/ -Home of the ldmsd runtime scratch files, PID file, et c. -.TP -.I /etc/sysconfig/ldms.d/ -Home of the ldmsd configuration processing scripts: ldmsd, ldms-functions. -.TP -.I /etc/sysconfig/ldms.d/ldmsd.local.conf -Environment variables and override settings for monitoring the local host. -.TP -.I /etc/sysconfig/ldms.d/ldmsd.all_instances.conf -Optional environment variables and override settings for multiple hosts. -.TP -.I /etc/sysconfig/ldms.d/plugins-conf -Plugin configuration text fragments, configuration text generation programs, or -entire configuration files are kept. The fragments, files, and generators are used only as directed by genders or -LDMSD_START_HOOKS. See ldms-attributes(5) for details of their use. -.TP -.I /etc/sysconfig/ldms.d/ldmsd.$LDMSCLUSTER.conf -Environment variables and override settings for storage ldmsd serving remote system $LDMSCLUSTER. -.TP -.I /usr/lib/systemd/system/ldmsd.service -Systemd service file for the local ldmsd. -.TP -.I /usr/lib/systemd/system/ldmsd@.service -Systemd service file for all the storage ldmsds serving remote systems. -.TP -.I /etc/init.d/ldmsd -The sysvinit boot script for the local host, on systems where systemd is not supported. -.TP -.I /etc/init.d/ldmsd.* -The sysvinit boot script for storage ldmsd serving remote system $LDMSCLUSTER. -.TP -.I /usr/bin/ldmsd-pre-systemd -.I /usr/bin/ldmsd-pre-sysvinit -The environment and plugin config file generator driver invoked by the systemd or sysvinit boot script. -The only difference is that for sysvinit the generated script must export the variables. -.TP -.I /usr/bin/ldmsd-wrapper.sh -The wrapper that finally launches the ldmsd binary. Called from the systemd service or sysvinit boot script. -.TP -.I /etc/sysconfig/ldms.d/ClusterGenders -Directory where genders file parts needed to compose a final genders file for a remote system are kept. -.TP -.I /etc/sysconfig/ldms.d/ClusterSecrets -Directory where LDMS authentication secrets for remote systems are kept. -.br - - -.SH NOTES -.PP -Typos in the ldms genders keywords may lead to silent application of defaults. -In a new deployment, always review /var/run/ldmsd/ldmsd.env.local and /var/run/ldmsd/all-config.local to verify your expected options have been applied. -.PP -For storage deployments supporting a remote machine $LDMSCLUSTER, any place .local appears in these man pages, you can usually replace it with .$LDMSCLUSTER and arrive at a correct conclusion. -.PP -For initial deployment debugging under systemd, "journalctl -f -o cat" is very handy. - -.SH BUGS -.PP -Some features listed not yet supported, as marked. - -.SH EXAMPLES -.PP -See /usr/share/doc/ovis-$version/sample_init_scripts/genders/README - -.fi - -.SH SEE ALSO -libgenders(3), ldmsd(8), ldms-attributes(5), ldms_authentication(7), ldms-genders-examples(8) - - - diff --git a/util/sample_init_scripts/genders/src/Makefile.am b/util/sample_init_scripts/genders/src/Makefile.am deleted file mode 100644 index 9defeb158..000000000 --- a/util/sample_init_scripts/genders/src/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ - -AM_CFLAGS = \ -"-DLDMS_SRCDIR=\"$(abs_top_srcdir)\"" \ -"-DLDMS_BUILDDIR=\"$(abs_top_builddir)\"" \ -$(BOOST_CPPFLAGS) - -if ENABLE_LIBGENDERS -bin_PROGRAMS = ldmsctl_args3 -ldmsctl_args3_SOURCES = ldmsctl_args3.cxx -ldmsctl_args3_LDADD = -lgendersplusplus -lboost_program_options -lboost_regex -ldmsctl_args3_LDFLAGS = $(AM_LDFLAGS) @LIBGENDERS_LIBDIR_FLAG@ @LIBGENDERS_LIB64DIR_FLAG@ -L$(BOOST_ROOT)/lib -ldmsctl_args3_CPPFLAGS = $(AM_CFLAGS) @LIBGENDERS_INCDIR_FLAG@ -endif - diff --git a/util/sample_init_scripts/genders/src/ldmsctl_args3.cxx b/util/sample_init_scripts/genders/src/ldmsctl_args3.cxx deleted file mode 100644 index 3aadc5df0..000000000 --- a/util/sample_init_scripts/genders/src/ldmsctl_args3.cxx +++ /dev/null @@ -1,825 +0,0 @@ -#include -#include -#include -#include -//#include -#include -#include -#include -#include -#include - - -/* - -queries we need: -LDMSAGGD_DBG= nodeattr $NODEATTRFILE -v $host ldmsaggd_dbg -LDMSAGGD_STORES= nodeattr $NODEATTRFILE -v $host ldmsd_stores -LDMSAGGD_INTERVAL_DEFAULT= nodeattr $NODEATTRFILE -v $host ldmsaggd_interval_default -LDMSAGGD_OFFSET_DEFAULT= nodeattr $NODEATTRFILE -v $host ldmsaggd_offset_default - -for i in $(echo $STORES | tr ":;'\`" "\n"); do - configtmp=`nodeattr $NODEATTRFILE -v $host ldmsaggd_${i}` - intervaltmp=`nodeattr $NODEATTRFILE -v $host ldmsaggd_interval_${i}` - offsettmp=`nodeattr $NODEATTRFILE -v $host ldmsaggd_offset_${i}` -done - -*/ - -using namespace std; -using namespace boost; -using namespace Gendersplusplus; -namespace po = boost::program_options; - - -static int dbg = 0; - -void printvec( const vector< pair< string, string > >& all) -{ - for (vector< pair< string, string > >::size_type i = 0; i < all.size(); i++) { - cerr << i<< ": " << all[i].first << " = " << all[i].second <& all) -{ - for (vector< string >::size_type i = 0; i < all.size(); i++) { - cerr << i<< ": " << all[i] <& m) { - for(set::const_iterator it = m.begin(); it != m.end(); ++it) - { - cerr << *it << "\n"; - } -} - -void printmap(const map& m) { - for(map::const_iterator it = m.begin(); - it != m.end(); ++it) - { - cerr << it->first << " " << it->second << "\n"; - } -} - -#if 0 -// c list_attr_val equivalent -void -list_attr_val(Genders& g, const string &attr, bool Uopt, vector & sets_list) -{ - vector nodes = g.getnodes(attr); - vector all; - for (int i = 0; i < nodes.size(); i++) { - string val; - bool ret = g.testattr(attr,val,nodes[i]); - if (ret && val.size() >0) { - all.push_back(val); - } - } - if (Uopt) { - set set(all.begin(),all.end()); - sets_list.assign(set.begin(),set.end()); - } else { - sets_list.assign(all.begin(),all.end()); - } -} -#endif - -class trans { -public: - string producer;// ldmsd_producer - string retry; // ldmsaggd_conn_retry - string host; // ldms[agg]d_host - string xprt; // ldms[agg]d_xprt - string auth; // ldms[agg]d_auth - string port; // ldms[agg]d_port - string interval;// ldms[aggd]_interval_default - string offset; // ldms[aggd]_offset_default -}; -// may soon want to wrap this around some other database. -class ldms_config_info { -public: - virtual ~ldms_config_info(){} - // tell all known about host - virtual void dump_host_info(const string& host) = 0; - // is ldmsd collector - virtual bool is_colld(const string& host) = 0; - // is ldmsaggd daemon. if true, val should be non-empty - virtual bool is_aggd(const string& host, string& val) = 0; - // get bootnode=host matches. may be empty result. - virtual void bootnodes(const string& host, vector& bnl) = 0; - // get list of local data collector. may be empty result. - virtual void collectornodes(vector& bnl) = 0; - // collect *_port,_xprt,_hostname values for t and host. host may be empty results. - // if multiple files are searched, last on command line wins. - virtual void get_trans(const string& host, trans& t, string prefix) = 0; - // get fail over host if host goes down. may be empty result. - virtual bool has_backup(const string& host, string& val) = 0; - // get local ldmsd_metric_plugins on host. may be empty result. - virtual void get_metric_sets(const string& host, string& sets) = 0; - // get local ldmsd_schemas_extra on host. may be empty result. - virtual void get_schemas_extra(const string& host, string& schemas) = 0; - // get local ldmsaggd_exclude_sets on. may be empty result. - virtual void get_exclude_sets(const string& host, string& sets) = 0; - // get exclude flag for host for $prefix_exclude_host - virtual bool get_exclude_host(const string& host, string prefix, string& ehval) = 0; - // get the collectors host aggregates. may be empty result. - virtual void get_clientof(const string& host, vector& clientof) = 0; - // get the aggregators host aggregates. may be empty result. - virtual void get_aggclientof(const string& host, vector& aggclientof) = 0; - // get the producer alias of host - virtual void get_producer(const string& host, string& producer) = 0; - // get the producer alias of host - virtual void get_retry(const string& host, string& retry) = 0; - -}; - -#define LDMS_PORT_DEFAULT "411" - -// genders implementation -class genders_api : public virtual ldms_config_info { -private: - Genders& g; - vector< genders_api *> upstream; - // return true and set val to genders file value if prop present. - bool has_property(const string& host, const string& prop, string& val, bool deep=false) { - try { - if (deep) { - // look at deepest (last on command line) 1st. - size_t k = upstream.size(); - while (k > 0) { - k--; - if (upstream[k]->g.testattr(prop, val, host)) { - return true; - } - } - } - if (g.testattr(prop, val, host)) { - return true; - } - return false; - } catch ( GendersException ge) { - return false; - } - } - - /** Replace %#d %#m and %#u with corresponding portions of hostname - * in a gender value. - * \param host unqualified hostname as used by genders - * \param val gender value possibly containing %%#d %#m and %#u, - * where # is an integer index of the split name pieces. - * - * output: substituted genderval based on the following: - * replace %#d with the #'th integer substring in hostname - * replace %#D with the #'th integer substring in hostname 0 left stripped - * replace %#m with the #'th - separated substring in hostname - * replace %#u with the #'th _ separated substring in hostname - * Any case where # is greater than the number of such - * elements in the input is left unsubstituted without warning. - * Gender usage examples: - * Extract the number suffix and use in related names: - * : map host to fast net name - * chama-login[1-8] ldmsd_host=chama-lsm%0d-ib0 - * : map host to associated rps node - * chama-login[1-8] ldmsd_clientof=chama-rps%0d - * : map host to short producer name for splunk/csv. - * chama-login[1-8] ldmsd_producer=ln%0d - * Extract the suffix and use as producer name - * : map host chama-rps# to 'rps#' - * chama-rps[1-8] ldmsd_producer=%1m - */ - void gender_substitute(const string& host, string& val) { - // try nothing if % is not in value someplace. - std::size_t found = val.find_first_of("%"); - if (found == std::string::npos) - return; - - string ghost(host); - regex ire("[0-9]*"); - sregex_iterator i(ghost.begin(), ghost.end(), ire); - sregex_iterator j(ghost.begin(), ghost.end(), ire); - sregex_iterator end; - - int n = 0; - // make number-based replacements %#D - while ( j != end) { - if ((*j).length()) { - ostringstream oss; - oss << "%" << n << "D"; - string sub = oss.str(); - string jval = j->str(); - string kval = jval.substr( jval.find_first_not_of( "0" ) ); - replace_all(val, sub, kval); - n++; - } - ++j; - } - - n = 0; - // make number-based replacements %#d - while ( i != end) { - if ((*i).length()) { - ostringstream oss; - oss << "%" << n << "d"; - string sub = oss.str(); - string ival = i->str(); - replace_all(val, sub, ival); - n++; - } - ++i; - } - - // make - delimited part replacements %#m - vector mparts; - split(mparts, host, is_any_of("-"), boost::token_compress_on); - n = 0; - for (vector::size_type k = 0; k < mparts.size(); k++) { - ostringstream oss; - oss << "%" << k << "m"; - string sub = oss.str(); - string kval = mparts[k]; - replace_all(val, sub, kval); - n++; - } - - // make _ delimited part replacements %#u - vector uparts; - split(uparts, host, is_any_of("_"), boost::token_compress_on); - n = 0; - for (vector::size_type k = 0; k < uparts.size(); k++) { - ostringstream oss; - oss << "%" << k << "u"; - string sub = oss.str(); - string kval = uparts[k]; - replace_all(val, sub, kval); - n++; - } - } - - vector< string > getnodes_subst(const string attr, const string val) { - vector< string > full = g.getnodes(attr); - vector< string > result; - if (val.size() == 0) { - return full; - } - for (vector::size_type j = 0; j < full.size(); j++) { - string host = full[j]; - string unsub; - g.testattr(attr, unsub, host); - string hsub = unsub; - gender_substitute(host, hsub); - if (hsub == val) { - if (dbg > 0) { - cerr << "subst '" << hsub <<"' matches " - << val << " from " << unsub << " on " << - host << endl; - } - result.push_back(host); - } else { - if (dbg > 0) { - cerr << "subst '" << hsub <<"' unmatches " - << val << " from " << unsub << " on " << - host << endl; - } - } - - } - return result; - } - -public: - ~genders_api() { - size_t k = upstream.size(); - while ( k > 0) { - k--; - delete upstream[k]; - } - } - // given g must outlive this object. - genders_api(Genders& g) : g(g) {} - void add_upstream(genders_api *up) { - upstream.push_back(up); - } - virtual void dump_host_info(const string& hostname) { - vector< pair< string, string > > all = g.getattr(hostname); - map m(all.begin(),all.end()); - } - - virtual bool is_colld(const string& host) { - string dummy; - return has_property(host, "ldmsd", dummy); - } - virtual bool is_aggd(const string& host, string& val) { - return has_property(host, "ldmsaggd", val); - } - virtual void bootnodes(const string& host, vector& bnl) { - bnl = g.getnodes("bootnode",host); - } - virtual void collectornodes(vector& bnl) { - bnl = g.getnodes("ldmsd"); - } - virtual void get_trans(const string& host, trans& t, string prefix) { - // 1st 3 no longer separated by prefix - string ports = "ldmsd_port"; - string hosts = "ldmsd_host"; - string xprts = "ldmsd_xprt"; - string auths = "ldmsd_auth"; - string producer = prefix + "_producer"; - string retry = prefix + "_conn_retry"; - string intervals = prefix + "_interval_default"; - string offsets = prefix + "_offset_default"; - string tmp; - if (has_property(host, ports, tmp, true)) { - t.port = tmp; - istringstream ss(tmp); - int chk; - ss >> chk; - if (chk < 1) { - cerr << "INFO: " << ports << " of " << tmp << " not integer for " << host < 0) { - cerr << "For port of " << prefix << " parsed " << tmp << endl; - } - } - } else { - t.port = LDMS_PORT_DEFAULT; - if (dbg > 0) { - cerr << "Using port default " << t.port << endl; - } - } - if (! has_property(host, hosts, t.host, true) ) { - t.host = host; - } else { - gender_substitute(host, t.host); - } - if (! has_property(host, producer, t.producer, true) ) { - t.producer = host; - } else { - gender_substitute(host, t.producer); - } - if (! has_property(host, auths, t.auth, true) ) { - t.auth = "munge"; - } - if (! has_property(host, xprts, t.xprt, true) ) { - t.xprt = "sock"; - } - if (! has_property(host, retry, t.retry, true) ) { - t.retry = "2000000"; // 2 sec - } - if (! has_property(host, intervals, t.interval, false) ) { - t.interval = "10000000"; // 10 sec - } - if (! has_property(host, offsets, t.offset, false) ) { - t.offset = "100000"; // 0.1 sec - } - } - virtual bool has_backup(const string& host, string& val) { - return has_property(host, "ldmsaggd_fail", val); - } - virtual void get_metric_sets(const string& host, string &sets) { - has_property(host,"ldmsd_metric_plugins", sets); - } - virtual void get_schemas_extra(const string& host, string &sets) { - has_property(host,"ldmsd_schemas_extra", sets); - } - virtual bool get_exclude_host(const string& host, string prefix, string &ehval) { - string ehname = prefix + "_exclude_host"; - return has_property(host, ehname, ehval); - } - virtual void get_exclude_sets(const string& host, string &sets) { - has_property(host,"ldmsaggd_exclude_sets", sets); - } - virtual void get_clientof(const string& host, vector& clientof) { - clientof = getnodes_subst("ldmsd_clientof",host); - } - virtual void get_aggclientof(const string& host, vector& aggclientof) { - aggclientof = getnodes_subst("ldmsaggd_clientof",host); - } - virtual void get_producer(const string& host, string& producer) { - has_property(host, "ldmsd_producer", producer); - gender_substitute(host, producer); - } - virtual void get_retry(const string& host, string& retry) { - has_property(host, "ldmsaggd_conn_retry", retry); - } -}; - - -/* - Summary data class for a nodes roles. -*/ -class hdata { -private: - ldms_config_info* in; -public: - - hdata(const string& host, ldms_config_info* in) : in(in),hostname(host) { - isd = in->is_colld(hostname); - isaggd = in->is_aggd(hostname,ldmsaggd); - hasbackup = in->has_backup(host,aggbackup); - in->get_trans(host, dt,"ldmsd"); - in->get_trans(host, aggdt,"ldmsaggd"); - in->get_metric_sets(host,metricsets); - in->get_schemas_extra(host,schemasextra); - in->get_exclude_sets(host,excludesets); - } - - void set_offset(const string& offset) { - aggdt.offset = offset; - } - - void set_interval(const string& interval) { - aggdt.interval = interval; - } - - string hostname; // genders/default hostname - bool isd; // ldmsd present - bool isaggd; // ldmsaggd present - string ldmsaggd; // ldmsaggd - bool hasbackup; // ldmsaggd_fail defined - string aggbackup; // ldmsaggd_fail - trans dt; // ldmsd_host/xprt/port/interval/offset - trans aggdt; // ldmsaggd_host/xprt/port/interval/offset - string metricsets; // ldmsd_metric_sets - string schemasextra; // ldmsd_metric_sets - string excludesets; // ldmsaggd_exclude_sets - -private: - vector adds; // add host lines computed for topmost hdata only. - - // append local sets of client to out as elements "clienthame/setname". - void format_local_sets(const string& client, vector& out, const set& ban, set& sets_seen) { - string lsets; - string extrasets; - in->get_metric_sets(client,lsets); - in->get_schemas_extra(client,extrasets); - vector names, extranames; - size_t nn = 0; - split(names,lsets,is_any_of(":"), boost::token_compress_on); - nn += names.size(); - vector::size_type i; - for (i = 0; i < names.size(); i++) { - if (ban.find(names[i]) == ban.end()) { - out.push_back(client+"/"+names[i]); - if (sets_seen.find(names[i]) == sets_seen.end()) { - sets_seen.insert(names[i]); - } - } - - } - split(extranames,extrasets,is_any_of(":"), - boost::token_compress_on); - nn += extranames.size(); - for (i = 0; i < extranames.size(); i++) { - if (ban.find(extranames[i]) == ban.end()) { - out.push_back(client+"/"+extranames[i]); - if (sets_seen.find(extranames[i]) == - sets_seen.end()) { - sets_seen.insert(extranames[i]); - } - } - - } - if (nn == 0) { - cerr << "Node " << client << " has no schemas defined." << endl; - } - } - - void add_collectors(int level, vector& node_list, vector& out, const set& ban, set& sets_seen) { - ostringstream oss; - oss << "# ac top\n"; - string ehdummy; - for (vector::size_type j = 0; j < node_list.size(); j++) { - if (in->get_exclude_host(node_list[j], "ldmsd", ehdummy)) { - // do not aggregate from or collect on excluded hosts. - continue; - } - if (level) { - format_local_sets(node_list[j], out, ban, sets_seen); - } else { - vector collsets; - format_local_sets(node_list[j], collsets, ban, sets_seen); - trans t; - in->get_trans(node_list[j], t, "ldmsd"); - string sets = join(collsets,","); - // oss << "# line 417" << endl; - oss << "prdcr_add name=" << t.producer; - oss << " host=" << t.host; - oss << " type=active"; - oss << " xprt=" << t.xprt; - oss << " auth=" << t.auth; - oss << " port=" << t.port; - oss << " interval=" << t.retry; - oss << endl; - oss << "prdcr_start name=" << t.producer; - oss << endl; - // ; sets=" << sets; - } - } - adds.push_back(oss.str()); - } - -public: - /** Expand the subaggregators under this one. - Does not need to expand collector-only nodes as hdata. - sets_seen: globally unique metric set names, sans host context. - ban: copy in, else lower level bans may propagate too far. - aggs_seen: global repeat prevention. - out: set names with node scoping. - */ - void get_sets(int level, vector& out, set ban, set& aggs_seen , set& sets_seen) { - /// cerr << "get_sets on " << hostname < banlist; - split(banlist,excludesets,is_any_of(":"), boost::token_compress_on); - ban.insert(banlist.begin(),banlist.end()); - - - if (!isaggd) { - // unexpected in ldms v2. - // may need adjustment when aggs see their own metric sets. - format_local_sets(hostname, out, ban, sets_seen); - return; - } - vector parts; - split(parts,ldmsaggd,is_any_of(":"), boost::token_compress_on); - bool didbootnode, didclientof, didaggclientof, didldmsdall, didsingle; - didsingle = didbootnode = didclientof = didaggclientof = didldmsdall = false; - if (parts.size() > 0) { - ostringstream oss; - oss << "updtr_add name=all_" << hostname; - oss << " interval=" << aggdt.interval; - oss << " offset=" << aggdt.offset; - oss << endl; - adds.push_back(oss.str()); - } - for (vector::size_type i = 0; i < parts.size(); i++) { - if (parts[i] == "BOOTNODELIST" && ! didbootnode) { - didbootnode = true; - vector bootnode_list; - in->bootnodes(hostname,bootnode_list); - add_collectors(level, bootnode_list, out, ban, sets_seen); - continue; - } - if (parts[i] == "LDMSDALL" && ! didldmsdall) { - didldmsdall = true; - vector node_list; - in->collectornodes(node_list); - add_collectors(level, node_list, out, ban, sets_seen); - continue; - } - if (parts[i] == "CLIENTOFLIST" && !didclientof) { - didclientof = true; - vector clientof_list; - in->get_clientof(hostname,clientof_list); - add_collectors(level, clientof_list, out, ban, sets_seen); - continue; - } - if (parts[i] == "AGGCLIENTOFLIST" && !didaggclientof) { - didaggclientof = true; - vector aggclientof_list; - in->get_aggclientof(hostname,aggclientof_list); - - ostringstream oss; - oss << "# aggclient list\n"; - for (vector::size_type j = 0; j < aggclientof_list.size(); j++) { - hdata sub(aggclientof_list[j],in); - if (! sub.isaggd) { - cerr << "Ignoring ldmsaggd_clientof=" << - hostname << " on node not aggregating: " - << aggclientof_list[j] << endl; - continue; - } - if (level) { - // recurse down nested agg subtree - sub.get_sets(level+1, out, ban, aggs_seen, sets_seen); - } else { - // begin recursion - vector aggsets; - sub.get_sets(level+1, aggsets, ban, aggs_seen, sets_seen); - trans t; - if (dbg) { - cerr << "Pulling from aggregator " << aggclientof_list[j] << endl; - } - in->get_trans(aggclientof_list[j], t, "ldmsaggd"); - string sets = join(aggsets,","); - - // oss << "# line 522" << endl; - oss << "prdcr_add name=" << t.producer; - oss << " host=" << t.host; - oss << " type=active"; - oss << " xprt=" << t.xprt; - oss << " auth=" << t.auth; - oss << " port=" << t.port; - oss << " interval=" << t.retry; - oss << endl; - oss << "prdcr_start name=" << t.producer; - oss << endl; - } - } - adds.push_back(oss.str()); - continue; - } - // else it's a hostname or a typo in LDMSDALL. - didsingle = true; - vector singleton; - singleton.push_back(parts[i]); - add_collectors(level, singleton, out, ban, sets_seen); - } - bool didadd = - didbootnode || didclientof || didaggclientof || didldmsdall || didsingle; - if (didadd) { - ostringstream oss; - oss << "updtr_prdcr_add name=all_" << hostname; - oss << " regex=" << ".*"; - oss << endl; - oss << "updtr_start auto_interval=true name=all_" << hostname; - adds.push_back(oss.str()); - } - } - - // dump the constructed command list, removing duplicates other - // than comments - void print_add_hosts(string NODELIST) { - (void) NODELIST; - vectorkeepers; - setuniques; - for(vector::size_type i = 0; i < adds.size(); i++) { - stringstream sstrm(adds[i]); - string elt; - while (std::getline(sstrm, elt)) { - if (elt.size() > 0 && (elt[0] == '#' || - uniques.find(elt) == uniques.end())) { - uniques.insert(elt); - keepers.push_back(elt); - } - } - } - for(vector::size_type i = 0; i < keepers.size(); i++) { - cout << keepers[i] << endl; - } - } -}; - -class ctloptions { - -public: - bool ok; // if !true, options parsing failed. - int log_level; // higher is louder - vector< string > genders_vec; - string task; - string hostname; - string outname; - bool useoutname; - string interval; - bool useinterval; - string offset; - bool useoffset; - - void dump() { - #define DUMP(x) cerr << #x << " is " << x << endl - DUMP(log_level); - for (size_t k = genders_vec.size(); k > 0; k--) - cerr << "genders[" << k-1 << "] is " - << genders_vec[k-1] << endl; - DUMP(task); - DUMP(hostname); - DUMP(outname); - DUMP(useoutname); - DUMP(interval); - DUMP(useinterval); - DUMP(offset); - DUMP(useoffset); - } - - ctloptions(int argc, char **argv) : - ok(true), - log_level(0), - task("host-list"), - useoutname(false), - useinterval(false), - useoffset(false) - { - char hostbuf[HOST_NAME_MAX+1]; - if (!gethostname(hostbuf,sizeof(hostbuf))) - hostname = hostbuf; - else { - cout << argv[0] << ": gethostname failed"<< endl; - ok = false; - return; - } - // The preset paths are overwritten entirely - // by -g options, if present. - char *envgenders = getenv("LDMS_GENDERS"); - if (envgenders != NULL) { - genders_vec.push_back(envgenders); - } else { - genders_vec.push_back("/etc/genders"); - } - - po::options_description desc("Allowed options"); - desc.add_options() - ("genders,g", po::value < vector< string > >(&genders_vec), - "(repeatable) genders input file name (default env(LDMS_GENDERS) else /etc/genders). Order matter.") - ("node,n", po::value < string >(&hostname), - "network node the query will describe (default from gethostname())") - ("task,t", po::value < string >(&task), - "the type of output wanted (default add host lines)") - ("interval,i", po::value < string >(&interval), - "value overriding interval_default gender") - ("offset,o", po::value < string >(&offset), - "value overriding offset_default gender") - ("output,O", po::value < string >(&outname), - "where to send output (default stdout)") - ("verbose,v", po::value < int >(&log_level), - "enable verbosity (higher is louder; default 0)") - ("help,h", "produce help message") - ; - po::variables_map vm; - po::store(parse_command_line(argc,argv,desc),vm); - po::notify(vm); - if (vm.count("help")) { - cout << desc << "\n"; - ok = false; - } - if (vm.count("output")) { - useoutname = true; - } - if (vm.count("offset")) { - useoffset = true; - } - if (vm.count("interval")) { - useinterval = true; - } - } - -}; - -int main(int argc, char **argv) -{ - ctloptions opt(argc,argv); - if (!opt.ok) { - return 1; - } - if (opt.log_level > 0) { - opt.dump(); - dbg = opt.log_level; - } - vector freelist; - - try { - Genders g0(opt.genders_vec[0]); - genders_api gapi(g0); - ldms_config_info *info = &gapi; - size_t upstream = 1; - for ( ; upstream < opt.genders_vec.size(); upstream++) { - Genders *ng = new Genders(opt.genders_vec[upstream]); - freelist.push_back(ng); - genders_api *up = new genders_api(*ng); - gapi.add_upstream(up); - // we know this leaks ng and maybe up eventually - } - - set ban, hosts_seen, sets_seen; - vector out; - hdata top(opt.hostname, info); - - if (opt.useinterval) - top.set_interval(opt.interval); - - if (opt.useoffset) - top.set_offset(opt.offset); - - top.get_sets(0, out, ban, hosts_seen, sets_seen); - - string storesets = join(sets_seen,","); - if (opt.task == "store-list") { - cout << storesets << endl; - goto cleanup; - } - if (opt.task == "host-list") { - top.print_add_hosts(""); - goto cleanup; - } - cerr << argv[0] << ": unexpected task " << opt.task << endl; - return 1; - } catch ( GendersException ge) { - cerr << argv[0] << ": Error parsing " << opt.genders_vec[0] << - " or friends: " << ge.errormsg() << endl; - } - -cleanup: - size_t f = freelist.size(); - while (f > 0) { - f--; - delete freelist[f]; - } - return 0; -} diff --git a/util/sample_init_scripts/genders/systemd/.gitignore b/util/sample_init_scripts/genders/systemd/.gitignore deleted file mode 100644 index 19dfa4a64..000000000 --- a/util/sample_init_scripts/genders/systemd/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/ldmsd-pre-systemd -/ldmsd-wrapper.sh diff --git a/util/sample_init_scripts/genders/systemd/Makefile.am b/util/sample_init_scripts/genders/systemd/Makefile.am deleted file mode 100644 index 19f362480..000000000 --- a/util/sample_init_scripts/genders/systemd/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ - -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts/genders/systemd -EXTRA_DIST = ldmsd-pre-systemd.in ldmsd-wrapper.sh.in ldms-manpatch.sh -DISTCLEANFILES = ldmsd-pre-systemd ldmsd-wrapper.sh -bin_SCRIPTS= -if ENABLE_TOSS_SYSTEMD -SUBDIRS = etc services -bin_SCRIPTS+= ldmsd-pre-systemd ldmsd-wrapper.sh -endif -bin_SCRIPTS += ldms-manpatch.sh diff --git a/util/sample_init_scripts/genders/systemd/etc/Makefile.am b/util/sample_init_scripts/genders/systemd/etc/Makefile.am deleted file mode 100644 index 6a7992804..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ - -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts/genders/systemd/etc - -if ENABLE_TOSS_SYSTEMD -SUBDIRS = sysconfig -endif - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/Makefile.am b/util/sample_init_scripts/genders/systemd/etc/sysconfig/Makefile.am deleted file mode 100644 index 48f0f3ae4..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ - -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts/genders/systemd/etc/sysconfig - -if ENABLE_TOSS_SYSTEMD -SUBDIRS = ldms.d -endif - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/.gitignore b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/.gitignore deleted file mode 100644 index f9f81eed3..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/ldmsd -/ldms-functions diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/Makefile.am b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/Makefile.am deleted file mode 100644 index c16cc92dd..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ - -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders - -if ENABLE_TOSS_SYSTEMD -dist_doc_DATA = \ -README genders.local genders.agg -endif - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/README b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/README deleted file mode 100644 index 7caf2c706..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/README +++ /dev/null @@ -1,16 +0,0 @@ -This directory collects the genders configurations (or symbolic links to them) -needed to assemble final aggregation and storage configurations for LDMS. - -Files named genders.$HOST are the /etc/genders files as seen from a node in the cluster $HOST. - -Files named $STOREHOST.genders.$HOST are the additional gender values needed -on $STOREHOST to configure a last-level ldmsd to aggregate and store for $HOST. - -The final genders file needed to monitor/store cluster $HOST on $STOREHOST is the concatenation of genders.$HOST and $STOREHOST.genders.$HOST. These final scratch files are typically written to /var/run/ldmsd/genderscratch/$STOREHOST.$HOST. - - -Example 1: -A three level setup among hosts -poseidon (level 0: collect) ubuntu 16 systemd -hermes (level 1 agg and collect) rhel7 systemd -twain (level 2 agg and store) rhel7 systemd diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/genders.agg b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/genders.agg deleted file mode 100644 index 292e4ec8e..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/genders.agg +++ /dev/null @@ -1,9 +0,0 @@ -twain ldmsaggd=localhost -twain ldmsd_port=412 -twain ldmsd_store_plugins=store_csv -twain ldmsd_schemas_store_csv=meminfo:procstat:procnetdev -twain ldmsd_store_csv=path//tmp/twain-store:altheader/1:rolltype/2:rollover/0 -twain ldmsd_dbg=INFO -twain ldmsd_use_inet_socket=yes,ldmsd_config_port=404 -twain ldmsd_dstat=mmalloc/1 -twain ldmsd_metric_plugins=dstat diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/genders.local b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/genders.local deleted file mode 100644 index a6f6332cb..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/genders.local +++ /dev/null @@ -1,40 +0,0 @@ -# This file assumes the answer to `hostname` is twain. -# Globally replace twain with your unqualified hostname to use this -# as a prototypical ldms gender attributes set. -# Optionally, append its contents to /etc/genders - -# Run data collectors -# 1 second sampling -twain ldmsd -twain ldmsd_interval_default=1000000,ldmsd_offset_default=0 - -twain ldmsd_port=411,ldmsd_xprt=sock - -twain ldmsd_host=twain - -# -## data collection -# - -twain ldmsd_metric_plugins=meminfo:vmstat:procstat:procnetdev -twain ldmsd_idbase=2 - -# procstatutil2 plugin settings -twain ldmsd_procstat=maxcpu/8:with_jobid/0 - -# procnetdev plugin settings: list interfaces to monitor by -# separated by & in the ifaces list -twain ldmsd_procnetdev=with_jobid/0:ifaces/em1&wlp3s0 - -# meminfo plugin settings from text snippet -twain ldmsd_config_text_meminfo=yes - -# vmstat plugin settings from config generator by full path name -# generator program named is passed arguments as documented in the -# man page ldms-attributes -#twain ldmsd_config_gen_vmstat=/etc/sysconfig/ldms.d/plugins-conf/gen.vmstat - -# -# data storage -# -#twain ldmsd_store_plugins=store_csv diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterSecrets/Makefile.am b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterSecrets/Makefile.am deleted file mode 100644 index f5ed00238..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterSecrets/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ - -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterSecrets - -if ENABLE_TOSS_SYSTEMD -dist_doc_DATA = \ -README ldmsauth.conf -endif - -install-data-hook: - if test -f $(DESTDIR)$(docdir)/ldmsauth.conf; then \ - chmod 600 $(DESTDIR)$(docdir)/ldmsauth.conf; \ - fi diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterSecrets/README b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterSecrets/README deleted file mode 100644 index f0887514f..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterSecrets/README +++ /dev/null @@ -1,9 +0,0 @@ -This directory is the default home for LDMS authentication secret files (or links to them). An example is provided; the key value in it should always be -changed before production deployment. - -The LDMS_AUTH_FILE configuration variable can point to a file anywhere, however. -The authentication file must not be group or world readable or writable. - -When running multiple ldmsd instances to monitor remote hosts, -the convention for this directory is to name the secret files -$LDMSCLUSTER.ldmsauth.conf. diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterSecrets/ldmsauth.conf b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterSecrets/ldmsauth.conf deleted file mode 100644 index 1d9b6ef78..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterSecrets/ldmsauth.conf +++ /dev/null @@ -1,2 +0,0 @@ -secretword=fix -# replace 'fix' with a secret string when installing, per man ldms_authentication diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/Makefile.am b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/Makefile.am deleted file mode 100644 index f4dc01128..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d - -EXTRA_DIST = ldmsd.in ldms-functions.in -DISTCLEANFILES = ldmsd ldms-functions - -if ENABLE_TOSS_SYSTEMD -SUBDIRS = plugins-conf ClusterGenders ClusterSecrets debug -doc_DATA = \ -ldmsd \ -ldms-functions -dist_doc_DATA = \ -ldmsd.local.conf \ -ldmsd.agg.conf \ -ldmsd.all_instances.conf.example \ -README -endif - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/README b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/README deleted file mode 100644 index bc392774d..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/README +++ /dev/null @@ -1,16 +0,0 @@ -This directory contains the systemd/sysvinit version of init script support -for cluster and genders support. - -Gender-based TOSS clusters define network topology in /etc/genders -The scripts here (ldms.d/ldmsd) work without making the -admin repeat the information in an LDMS format that can get out of -sync with the master genders file (unless the admin wants to). - -The process for loading %I (local or a remote name) is: -ldmsd-pre-systemd - includes ldms-functions - includes ldms.d/ldmsd - includes ldms.d/ldmsd.%I.conf - checks ldmsd options and defaults - dumps environment file for use by /usr/bin/ldmsd-wrapper.sh - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/debug/Makefile.am b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/debug/Makefile.am deleted file mode 100644 index 2b5b6dae2..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/debug/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ - -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/debug - -if ENABLE_TOSS_SYSTEMD - -dist_doc_DATA = \ -ldmsd.extra.local.conf - -endif - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/debug/ldmsd.extra.local.conf b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/debug/ldmsd.extra.local.conf deleted file mode 100644 index 85356e249..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/debug/ldmsd.extra.local.conf +++ /dev/null @@ -1,8 +0,0 @@ -# Lines in this file will be appended to the generated -# plugin configuration, if this file is listed in the ldmsd.%I.conf file -# as: LDMSD_DEBUG_CONFIG_FILE=/path/to/this/file -# The example commands given here will dump data to the log file typically. -## dump agg/store related info -info -## All other configuration commands can appear here as desired, -# but the debug file is not the right place for them. diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldms-functions.in b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldms-functions.in deleted file mode 100644 index eb611ba7a..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldms-functions.in +++ /dev/null @@ -1,1258 +0,0 @@ -# strgp_prdcr commands works on object names and not producernames, -# so logic needing the second semantics is bypassed for now. -STRGPMATCHHOSTS=/bin/false - -sysconfdir=@sysconfdir@ -localstatedir=@localstatedir@ -if test "x$LDMSCLUSTER" = "local"; then - LTAG="ldmsd" -else - LTAG="ldmsd@$LDMSCLUSTER" -fi - -# -# Functions for ldmsd and ldms-aggd config file generation. -# These may depend on variables defined in the respective .conf files -# or the calling script. -# Some things here assume systemd (where noted). - -# dump where we called from and exit with argument given -dietrace () { - if systemd-cat --help 2>1 > /dev/null; then - OUTLINE="systemd-cat -p err -t backtrace" - else - OUTLINE="logger -t $LTAG -p syslog.err" - fi - if [[ $VERBOSE = "-v" ]]; then - local frame=0 - (echo start - while caller $frame; do - ((frame++)); - done - echo end) | $OUTLINE - fi - exit $1 -} - -# Make sure log options are sane and consistent. -# This assumes systemd, which makes syslog and journal equivalent -# and allows the daemons to simply write to stderr/stdout (though at -# loss of syslog level information). -check_log_option () { - - case $LDMS_LOG_PATH in - journal) - sdok=0 - if ps -p 1 -o command --no-headers |grep systemd >/dev/null; then - sdok=1 - LDMS_LOG_OPT="" - LDMS_LOG_PATH="" - LDMS_LOG_FILE="" - fi - if /bin/ls -l /sbin/init |grep systemd >/dev/null; then - sdok=1 - LDMS_LOG_OPT="" - LDMS_LOG_PATH="" - LDMS_LOG_FILE="" - fi - if test $sdok = "0"; then - logger -t $LTAG -p syslog.err -s "journal log not available without systemd." - dietrace 1 - fi - ;; - syslog) - if ps -p 1 -o command --no-headers |grep systemd >/dev/null; then - LDMS_LOG_OPT="" - LDMS_LOG_PATH="" - LDMS_LOG_FILE="" - else - LDMS_LOG_OPT="-l" - LDMS_LOG_FILE="syslog" - fi - ;; - NONE) - LDMS_LOG_OPT="" - LDMS_LOG_PATH="" - LDMS_LOG_FILE=">/dev/null" - ;; - /*) - LDMS_LOG_OPT="-l" - mkdir -p $LDMS_LOG_PATH - if ! test -d $LDMS_LOG_PATH; then - logger -t $LTAG -p syslog.err -s "$0: cannot make log directory $LDMS_LOG_PATH" - dietrace 1 - fi - LDMS_LOG_FILE=$LDMS_LOG_PATH/ldmsd.log.$LDMSCLUSTER - ;; - esac - export LDMS_LOG_OPT - export LDMS_LOG_PATH - export LDMS_LOG_FILE -} - -# check consistency of auth variables. -check_auth_option () { - if test -z "$LDMS_AUTH_TYPE"; then - LDMS_AUTH_TYPE=$($NODEATTR $NODEATTRFILE -v $host ldmsd_auth 2>/dev/null) - if test -z $LDMS_AUTH_TYPE; then - LDMS_AUTH_TYPE=munge - fi - fi - LDMS_AUTH_ARGS="" - case x$LDMS_AUTH_TYPE in - xovis) - # auth file check and warning. - if test -z $LDMS_AUTH_FILE; then - echoq "LDMS_AUTH_FILE not set." - echoq "Will try running without it (but this is a bad idea)" - LDMS_AUTH_OPT="" - else - LDMS_AUTH_OPT="-a" - if ! test -f $LDMS_AUTH_FILE; then - echoq "LDMS_AUTH_FILE $LDMS_AUTH_FILE not found" - fi - LDMS_AUTH_ARGS="-A conf=$LDMS_AUTH_FILE" - fi - ;; - xmunge) - # auth munge socket check - if test -z $LDMS_AUTH_FILE; then - echoq "LDMS_AUTH_FILE not set." - echoq "assuming default munge socket" - LDMS_AUTH_OPT="" - else - LDMS_AUTH_OPT="-a" - if ! test -S $LDMS_AUTH_FILE; then - echoq "LDMS_AUTH_FILE $LDMS_AUTH_FILE is not a socket as needed by munge" - fi - LDMS_AUTH_ARGS="-A socket=$LDMS_AUTH_FILE" - - fi - ;; - xnaive) - logger -t $LTAG -p syslog.error -s "$0: LDMS_AUTH_TYPE naive is not supported for systemd service." - dietrace 1 - ;; - x) - logger -t $LTAG -p syslog.error -s "$0: LDMS_AUTH_TYPE is undefined." - dietrace 1 - ;; - x*) - logger -t $LTAG -p syslog.error -s "$0: LDMS_AUTH_TYPE $LDMS_AUTH_TYPE is unknown" - dietrace 1 - ;; - esac - export LDMS_AUTH_TYPE - export LDMS_AUTH_OPT - export LDMS_AUTH_FILE - export LDMS_AUTH_ARGS -} - -# check for migration errors v2 -> v3, common typos, etc -# currently support levels are 0, 1, 2 -check_genders_file() { - local af="" - local naf="" - local lgi="" - case "x$1" in - x) - echoq check_genders_file miscalled: needs level - dietrace 1 - ;; - x0) - naf="$NODEATTRFILE" - af="$ATTRFILE" - lgi="$LDMS_GENDERS_INPUT" - ;; - x1) - naf="$NODEATTRFILE1" - af="$ATTRFILE1" - lgi="$LDMS_GENDERS_INPUT_1" - ;; - x2) - naf="$NODEATTRFILE2" - af="$ATTRFILE2" - lgi="$LDMS_GENDERS_INPUT_2" - ;; - *) - echoq "check_genders_file unsupported level $1" - dietrace 1 - ;; - esac - if test -z "$naf"; then - return - fi - consolidated="ldmsaggd_dbg:ldmsd_dbg ldmsaggd_port:ldmsd_port ldmsaggd_xprt:ldmsd_xprt ldmsaggd_host:ldmsd_host ldmsaggd_num_procs:ldmsd_event_thds" - # do not rename these. - # renamed="ldmsaggd_interval_default:ldmsd_agg_interval_default ldmsaggd_offset_default:ldmsd_agg_offset_default" - renamed="ldmsaggd_stores:ldmsd_store_plugins ldmsd_metric_sets:ldmsd_metric_plugins ldmsaggd_store_csv:ldmsd_store_csv ldmsaggd_conn_thds:ldmsd_event_thds" - # common typos in prefixes here - prefixtypo="ldmsd_schema_:ldmsd_schemas_ ldmsd_exclude_schema_:ldmsd_exclude_schemas_ ldms_:ldmsd_ ldmsd_metric_plugin$:ldmsd_metric_plugins" - commatypo="chkmeminfo clock cray_power_sampler dstat fptrans lnet_stats job_info jobid meminfo perfevent procdiskstats procinterrupts procnetdev procnfs procsensors procstat sampler_atasmart sysclassib vmstat store_csvdbg lustre2_client lustre2_mds lustre2_oss store_csv store_rabbitv3 store_flatfile store_sos lustre_client linux_proc_sampler" - attrtypo="scheme:schema" - n=0 - v="" - for p in $consolidated; do - arr=(${p//:/ }) - val=$($NODEATTR $naf -c ${arr[0]} 2>/dev/null) - if test -n "$val"; then - logger -t $LTAG -p syslog.err "Remove gender ${arr[0]} or use ${arr[1]} instead." - ((n++)) - v="$v, ${arr[0]}" - fi - done - for p in $renamed; do - arr=(${p//:/ }) - val=$($NODEATTR $naf -c ${arr[0]} 2>/dev/null) - if test -n "$val"; then - logger -t $LTAG -p syslog.err "Rename gender ${arr[0]} to ${arr[1]}." - ((n++)) - v="$v, ${arr[0]}" - fi - done - for p in $prefixtypo; do - arr=(${p//:/ }) - val=$($NODEATTR $naf -l | grep ^${arr[0]} 2>/dev/null) - if test -n "$val"; then - logger -t $LTAG -p syslog.err "Correct gender(s) starting with ${arr[0]} to start with ${arr[1]}." - ((n++)) - v="$v, $val" - fi - done - for p in $attrtypo; do - arr=(${p//:/ }) - val=$(grep [:=]${arr[0]}/ $af | grep -v ^# | grep ' ldmsd_' 2>/dev/null) - if test -n "$val"; then - logger -t $LTAG -p syslog.err "Correct option(s) containing ${arr[0]} to use ${arr[1]}." - ((n++)) - v="$v, $val" - fi - done - for p in $commatypo; do - arr=(${p//:/ }) - val=$($NODEATTR $naf -l | grep ^${arr[0]} 2>/dev/null) - if test -n "$val"; then - logger -t $LTAG -p syslog.err "Found plugin name(s) as a gender: $val. Use : or & instead of , in ldmsd plugin lists, as noted in man ldms-attributes." - ((n++)) - v="$v, $val" - fi - done - x=$($NODEATTR $naf -n -A |grep ^ldmsd) - y=$($NODEATTR $naf -n -A |grep ^ldmsaggd) - z=$($NODEATTR $naf -n -A |grep ^${LDMS_HOSTNAME}$) - if test -n "$x" -o -n "$y"; then - logger -t $LTAG -p syslog.err "Found ldms genders without hostnames: $x $y." - ((n++)) - fi - if test "$1" = "0"; then - # This test only applies for the local genders config, not upstream ones. - if test -z "$z"; then - logger -t $LTAG -p syslog.err "self-genders: Found no genders at all found for $LDMS_HOSTNAME (self)." - logger -t $LTAG -p syslog.err "self-genders: Review $af or setting of LDMS_HOSTNAME or aliasing in /etc/hosts" - logger -t $LTAG -p syslog.err "self-genders: Insufficient input was created from $lgi" - logger -t $LTAG -p syslog.err "self-genders: $NODEATTR $naf -n -A |grep ^${LDMS_HOSTNAME}$)" - exit 1 - ((n++)) - fi - fi - if test $n -gt 0; then - logger -t $LTAG -p syslog.err "Gender file problems: $n ($v). These genders or options need to be removed, replaced, correctly spelled, or punctuated as noted." - logger -t $LTAG -p syslog.err "Review $af" - logger -t $LTAG -p syslog.err "Input created from $lgi" - exit 1 - fi -} - -# verify list of files -check_files () { - local context=$1 - shift - for i in $*; do - if ! test -f $i -a -r $i; then - echo Unable to read genders file $i listed in $context - logger -t $LTAG -p syslog.err Unable to read genders file $i listed in $context - dietrace 1 - fi - done -} - -# put together a file from a list and echo the compiled name. -# 1st argument is use as the suffix in the name. -assemble_upstream_genders () { - local lvl=$1 - shift - local ALLDIR=$localstatedir/run/ldmsd/genderscratch - mkdir -p $ALLDIR - if ! test -d $ALLDIR; then - echoq "Unable to find/make $ALLDIR. make or mount it." - dietrace 1 - fi - local ALLGENDERS=$ALLDIR/genders.$LDMSCLUSTER.$lvl - /bin/rm -f $ALLGENDERS - for i in $*; do - echo "#-------------------" >> $ALLGENDERS - echo "# from $i:" >> $ALLGENDERS - cat $i >> $ALLGENDERS - done - - if ! test -f "$ALLGENDERS"; then - echoq Unable to create $ALLGENDERS. Check filesystem. - dietrace 1 - fi - echo $ALLGENDERS -} - -# Dig up genders file or set LDMS_USE_GENDERS=0 and warn. -# If LDMS_GENDERS is empty computes the default file and sets LDMS_GENDERS. -# Copies/concatenates genders files into a scratch file -# to accomodate level2 and beyond daemons. -# The default file content always depends on LDMSCLUSTER. -build_genders_file () { - if test "x$LDMS_USE_GENDERS" = "x0"; then - NODEATTR=: - NODEATTRFILE="" - CLUSTER_GENDERS="" - AGG_GENDERS="" - ALLDIR="" - LDMS_GENDERS="" - export LDMS_GENDERS - return - fi - if test -z "$LDMS_GENDERS"; then - # if not specified, take first of files found - GENDERBASE=$sysconfdir/sysconfig/ldms.d/ClusterGenders - LDMS_GENDERS="$GENDERBASE/genders.$LDMSCLUSTER $sysconfdir/genders" - havefiles=0 - for f in $LDMS_GENDERS; do - if test -f $f -a -r $f; then - LDMS_GENDERS=$f - havefiles=1 - break - fi - done - if test "$havefiles" = "0"; then - NODEATTR=: - NODEATTRFILE="" - CLUSTER_GENDERS="" - AGG_GENDERS="" - ALLDIR="" - LDMS_GENDERS="" - export LDMS_GENDERS NODEATTR NODEATTRFILE - return - fi - else - # die if user named something missing - check_files LDMS_GENDERS $LDMS_GENDERS - fi - # now put multiple files together. - ALLDIR=$localstatedir/run/ldmsd/genderscratch - mkdir -p $ALLDIR - if ! test -d $ALLDIR; then - echoq "Unable to find/make $ALLDIR. make or mount it." - dietrace 1 - fi - local ALLGENDERS=$ALLDIR/genders.$LDMSCLUSTER - /bin/rm -f $ALLGENDERS - for i in $LDMS_GENDERS; do - echo "#-------------------" >> $ALLGENDERS - echo "# from $i:" >> $ALLGENDERS - cat $i >> $ALLGENDERS - done - - if ! test -f "$ALLGENDERS"; then - echoq Unable to create $ALLGENDERS. Check filesystem. - dietrace 1 - fi - LDMS_GENDERS_INPUT=$(echo $LDMS_GENDERS | tr " " ,) - export LDMS_GENDERS_INPUT - LDMS_GENDERS=$ALLGENDERS - export LDMS_GENDERS - echoq LDMS_GENDERS=$LDMS_GENDERS - NODEATTRFILE="-f $LDMS_GENDERS" - ATTRFILE="$LDMS_GENDERS" - NODEATTR=nodeattr - export NODEATTRFILE NODEATTR ATTRFILE - - NODEATTRFILE1="" - NODEATTRFILE2="" - if test -n "$LDMS_GENDERS_1"; then - check_files LDMS_GENDERS_1 $LDMS_GENDERS_1 - LDMS_GENDERS_INPUT_1=$(echo $LDMS_GENDERS_1 | tr " " ,) - export LDMS_GENDERS_INPUT_1 - export LDMS_GENDERS_1=$(assemble_upstream_genders 1 $LDMS_GENDERS_1) - echoq LDMS_GENDERS_1=$LDMS_GENDERS_1 - export NODEATTRFILE1="-f $LDMS_GENDERS_1" - export ATTRFILE1="$LDMS_GENDERS_1" - if ! $NODEATTR $NODEATTRFILE1 -k > /dev/null 2>&1; then - echoq "problem with $NODEATTRFILE1" - logger -t $LTAG -p syslog.crit -s "BAD GENDERS $NODEATTRFILE1" - $NODEATTR $NODEATTRFILE1 -k - dietrace 1 - fi - fi - if test -n "$LDMS_GENDERS_2"; then - check_files LDMS_GENDERS_2 $LDMS_GENDERS_2 - LDMS_GENDERS_INPUT_2=$(echo $LDMS_GENDERS_2 | tr " " ,) - export LDMS_GENDERS_INPUT_2 - export LDMS_GENDERS_2=$(assemble_upstream_genders 2 $LDMS_GENDERS_2) - echoq LDMS_GENDERS_2=$LDMS_GENDERS_2 - export NODEATTRFILE2="-f $LDMS_GENDERS_2" - export ATTRFILE2="$LDMS_GENDERS_2" - if ! $NODEATTR $NODEATTRFILE2 -k > /dev/null 2>&1; then - echoq "problem with $NODEATTRFILE2" - logger -t $LTAG -p syslog.crit -s "BAD GENDERS $NODEATTRFILE2" - $NODEATTR $NODEATTRFILE2 -k - dietrace 1 - fi - fi - if ! $NODEATTR $NODEATTRFILE -k > /dev/null 2>&1; then - echoq "problem with $NODEATTRFILE" - logger -t $LTAG -p syslog.crit -s "BAD GENDERS $NODEATTRFILE" - $NODEATTR $NODEATTRFILE -k - dietrace 1 - fi - -} - -failure() { - echo stop using function \'failure\'. - return 1 -} - -# save exported env vars -# safe in privatetmp environment -save_env_init () { - mkdir -p $localstatedir/run/ldmsd/tmp - env1=$(mktemp $localstatedir/run/ldmsd/tmp/env1.$1.XXX) - if test -z "$env1"; then - logger -t $LTAG -p syslog.error -s "$0: cannot make env tempfile" - dietrace 1 - fi - printenv |sort > $env1 -} - -# append changed exported env vars to $2 -save_env_finish () { - env2=$(mktemp $localstatedir/run/ldmsd/tmp/env2.$1.XXX) - if test -z "$env2"; then - logger -t $LTAG -p syslog.error -s "$0: cannot make env tempfile" - dietrace 1 - fi - printenv |sort > $env2 - diff $env1 $env2 |sed -e 's/< .*//g' \ - -e 's/^-*//g' \ - -e 's/^[0-9].*//g' \ - -e 's/^> //g' \ - -e 's/"/\"/g' \ - -e "s/'/'\"'\"'/g" \ - -e "s/=/='/" \ - -e "s/$/'/" \ - |grep = > $2 - if ! test "$DEBUG" = "yes"; then - /bin/rm -f $env1 $env2 - fi -} - -# append changed exported env vars to $2 -# prepend export to all lines -save_env_finish_sysvinit () { - env2=$(mktemp $localstatedir/run/ldmsd/tmp/env2.$1.XXX) - printenv |sort > $env2 - diff $env1 $env2 |sed -e 's/< .*//g' \ - -e 's/^-*//g' \ - -e 's/^[0-9].*//g' \ - -e 's/^> //g' \ - -e 's/"/\"/g' \ - -e "s/'/'\"'\"'/g" \ - -e "s/=/='/" \ - -e "s/$/'/" \ - | grep = | sed -e 's/^/export /'> $2 - if ! test "$DEBUG" = "yes"; then - /bin/rm -f $env1 $env2 - fi -} - - -# translate genders encoded args to key=value args. -# reformat : -> spc; 1st / to =; & to , . -config_from_gender() { - # echoq "genderin: $1" - oldIFS=$IFS - IFS=: - avitems="" - for i in $1; do - avitems="$avitems `echo $i |sed -e 's%/%=%' -e 's%&%,%g'`" - done - if ! test -z $oldIFS; then - IFS=$oldIFS - else - unset IFS - # unset and the empty string for ifs are not the same - fi - # logger -t $LTAG -p syslog.info "$avitems"; - echo $avitems -} - -# log a message at info level if VERBOSE = -v -echoq() -{ - if [[ $VERBOSE != "-v" ]]; then - return; - fi - logger -t $LTAG -p syslog.info "$@"; -} - - -# return the substituted value based on host name. -# genders provides %n replacement prior; we do the rest here. -# input: hostname input_val -# output: substituted value based on the following: -# replace %#d with the #'th integer substring split from hostname -# replace %#D with the #'th integer substring split from hostname less lead 0s -# replace %#m with the #'th - separated substring split from hostname -# replace %#u with the #'th _ separated substring split from hostname -# Any case where # is greater than the number of such -# elements in the input is left unsubstituted without warning. -# gender usage examples: -# extract the number suffix and use in related names -# chama-login[1-8] ldmsd_host=chama-lsm%0d-ib0,ldmsd_clientof=chama-rps%0d,ldmsd_producer=ln%0d -# extract the number - suffix and use as producer name -# chama-rps[1-8] ldmsd_producer=%1m -gender_substitute () { - ghost=$1 - val=$2 - if test -z $2; then - echo "" - return - fi - ilist=$(echo $ghost | sed -e 's/[-_a-zA-Z]\+/ /g') - wlist=$(echo $ghost | sed -e 's/-/ /g') - ulist=$(echo $ghost | sed -e 's/_/ /g') - vnew=$val - n=0 - for i in $ilist; do - sub="%${n}D" - j=$(echo $i | sed -e 's/^0*//') - if test -z "$j"; then - j=0 - fi - vnew=$(echo ${vnew//$sub/$j}) - ((n++)) - done - n=0 - for i in $ilist; do - sub="%${n}d" - vnew=$(echo ${vnew//$sub/$i}) - ((n++)) - done - n=0 - for w in $wlist; do - sub="%${n}m" - vnew=$(echo ${vnew//$sub/$w}) - ((n++)) - done - n=0 - for u in $ulist; do - sub="%${n}u" - vnew=$(echo ${vnew//$sub/$u}) - ((n++)) - done - echo $vnew -} - -# warn about old v2 names and anything else deprecated. -plugin_name_check () { - case $1 in - slurmjobid) - logger -p syslog.err -t $LTAG.config.$1 "Unknown plugin. Consider ldms_jobid instead" - return 0 - ;; - procstatutil) - logger -p syslog.err -t $LTAG.config.$1 "Unknown plugin. Consider procstat instead" - return 0 - ;; - procstatutil2) - logger -p syslog.err -t $LTAG.config.$1 "Unknown plugin. Consider procstat instead" - return 0 - ;; - store_derived_csv) - logger -p syslog.err -t $LTAG.config.$1 "Unknown plugin. Consider store_function_csv instead" - return 0 - ;; - *) - return 1 - ;; - esac -} - -# Generate metric plugin configuration, using the set of plugins from -# genders # on each host. -# Individual plugin config generation failures do not stop other -# plugins, but will be logged. -# Failed plugins may cause ldmsd itself to not start later when -# the config file is read. -# -# Each plugin listed in LDMSD_METRIC_PLUGINS is started. -# -# The options for starting plugin P are taken from (if present) -# plugin-suffixed genders: -# (1) ldmsd_${P} gender value as the options (as in v2) -# OR -# (2) ldmsd_config_text_${P} gender value as a file containing a plugin -# specific configuration text line or lines -# excluding the start command line. -# As a special case, value yes means use -# $sysconfdir/sysconfig/ldms.d/plugins-conf/$P. -# The first line of the file is unconditionally appended to -# standard arguments for name producer instance & component_id. -# Any additional lines that a plugin may support should use the full -# "config name=PLUGIN " syntax -# This works well for plugin-specific options standard across -# an entire cluster. -# Comments within this file should never begin the first line, -# but may appear any where else. -# OR -# (3) ldmsd_config_gen_${P} gender value as a program which will generate -# plugin configuration text *and start command* on stdout. -# As a special case, value yes means run -# $sysconfdir/sysconfig/ldms.d/plugins-conf/gen.$P -# The generation program is passed the arguments: -# plugin-name producer-name host sample-interval sample-offset -# The environment variables visible to the daemon runtime -# are also visible when the generator programs are called to -# generate their portions of the complete plugin configuration file. -# OR -# (4) The defaults. -# NOTES: -# Only one configuration method is allowed for each plugin. -# host and producer-name may differ. Multiple configurations of the -# same plugin should be handled with options 2 or 3. -# -start_ldmsd_plugins () { - - out=$1 - echoq $LDMSD_METRIC_PLUGINS - echoq $out - - if test -n "$LDMSD_METRIC_SETS_DEFAULT_AUTHZ"; then - echo "metric_sets_default_authz $LDMSD_METRIC_SETS_DEFAULT_AUTHZ" >> $out - fi - - producer=$(gender_substitute $host $($NODEATTR $NODEATTRFILE -v $host ldmsd_producer 2>/dev/null)) - if test -z $producer; then - producer=$host - fi - - for pi in $(eval echo ${LDMSD_METRIC_PLUGINS} | tr ":;'\`" "\n"); do - - if plugin_name_check $pi; then - logger -p syslog.err -t $LTAG.config.$1 "Skipping plugin $pi" - continue - fi - - interval=$($NODEATTR $NODEATTRFILE -v $host ldmsd_interval_${pi} 2>/dev/null) - if test -z $interval; then - interval=$LDMSD_INTERVAL_DEFAULT - fi - - offset=$($NODEATTR $NODEATTRFILE -v $host ldmsd_offset_${pi} 2>/dev/null) - if test -z $offset; then - offset=$LDMSD_OFFSET_DEFAULT - fi - - # plugin options from gender files. - configtmp=$($NODEATTR $NODEATTRFILE -v $host ldmsd_${pi} 2>/dev/null) - grok="$(config_from_gender $configtmp)" - eval extraconfig='$grok' - conf="0" - instance="" - schema="" - if test -n "$extraconfig"; then - conf="v2" - if echo "$extraconfig" |grep schema=; then - schema=$(echo $extraconfig|sed -e 's/.*schema=//g' -e 's/ .*//g') - fi > /dev/null - if test -n "$schema"; then - instance=${producer}/$schema - else - instance=${producer}/${pi} - fi - if echo "$extraconfig" |grep instance=; then - instance=$(echo $extraconfig|sed -e 's/.*instance=//g' -e 's/ .*//g') - fi > /dev/null - fi - - # plugin options from per-plugin plain text file - cattext=$($NODEATTR $NODEATTRFILE -v $host ldmsd_config_text_${pi} 2>/dev/null) - if test -n "$cattext"; then - if test $conf != "0"; then - logger -p syslog.warning -t $LTAG.config.$pi "Skipping plugin $pi. Specifying both ldmsd_config_text_${pi} and ldmsd_${pi} is not allowed." - continue - fi - conf="text" - if ! test -f $cattext; then - if test -f $sysconfdir/sysconfig/ldms.d/plugins-conf/$cattext; then - cattext=$sysconfdir/sysconfig/ldms.d/plugins-conf/$cattext - fi - if test $cattext = "yes"; then - cattext=$sysconfdir/sysconfig/ldms.d/plugins-conf/$pi - fi - fi - if ! test -f $cattext; then - logger -p syslog.warning -t $LTAG.config.$pi "ldmsd_config_text_${pi} file $cattext not a regular file." - continue - fi - if ! test -r $cattext; then - logger -p syslog.warning -t $LTAG.config.$pi "ldmsd_config_text_${pi} file $cattext not readable." - continue - fi - fi - - # plugin options from per-plugin config/start generators - genprog=$($NODEATTR $NODEATTRFILE -v $host ldmsd_config_gen_${pi} 2>/dev/null) - if test -n "$genprog"; then - if ! test $conf = "0"; then - logger -p syslog.warning -t $LTAG.config.$pi "Skipping plugin $pi. Specifying both ldmsd_config_gen_${pi} and ldmsd_${pi} or ldmsd_config_text_${pi} not allowed." - continue - fi - conf="generate" - if ! test -f $genprog; then - if test -f $sysconfdir/sysconfig/ldms.d/plugins-conf/$genprog; then - genprog=$sysconfdir/sysconfig/ldms.d/plugins-conf/$genprog - fi - if test $genprog = "yes"; then - genprog=$sysconfdir/sysconfig/ldms.d/plugins-conf/gen.$pi - fi - fi - if ! test -f $genprog; then - logger -p syslog.warning -t $LTAG.config.$pi "ldmsd_config_gen_${pi} $genprog not a regular file." - dietrace 1 - fi - if ! test -r $genprog; then - logger -p syslog.warning -t $LTAG.config.$pi "ldmsd_config_gen_${pi} $genprog not readable." - dietrace 1 - fi - if ! test -x $genprog; then - logger -p syslog.warning -t $LTAG.config.$pi "ldmsd_config_gen_${pi} $genprog not executable." - dietrace 1 - fi - fi - - echoq "Generating config for metric plugin <${pi}>" - # write stuff to out as determined from gender values - if test -z "$instance"; then - instance=${producer}/${pi} - fi - ARGS_START="name=$pi interval=$interval offset=$offset" - ARGS_CONFIG="name=$pi producer=$producer instance=${instance} component_id=${COMPONENT_ID}" - echo load name=${pi} >> $out - case $conf in - v2) - echo "# config from gender ldmsd_${pi}" >> $out - echo "config $ARGS_CONFIG $extraconfig" >> $out - echo "start $ARGS_START" >> $out - ;; - text) - echo "# config from $cattext" >> $out - echo -n "config $ARGS_CONFIG " >> $out - cat $cattext >> $out - echo "" >> $out - echo "start $ARGS_START" >> $out - ;; - generate) - echo "# config from $genprog $pi $producer $host $interval $offset" >> $out - $genprog $pi $producer $host $interval $offset >> $out - ;; - *) - echo "# config sampler with defaults" >> $out - echo "config $ARGS_CONFIG" >> $out - echo "start $ARGS_START" >> $out - ;; - esac - done - - echo "# " >> $out - echo "# end metric sets section" >> $out - echo "# " >> $out - return $? -} - -generate_collector_config () { - LDMSD_PLUGIN_CONFIG_FILE=$localstatedir/run/ldmsd/all-config.$LDMSCLUSTER - export LDMSD_PLUGIN_CONFIG_FILE - /bin/rm -f $LDMSD_PLUGIN_CONFIG_FILE - start_ldmsd_plugins $LDMSD_PLUGIN_CONFIG_FILE - return 0 -} - -# Generate aggregation configuration, using the set of plugins from -# genders on each host. -start_add_hosts () { - # This function generates and sends lines like the next few - # to the local aggregator. - # prdcr_add name=$producer host=$host type=active xprt=sock interval=$retry port=$port1 - # prdcr_start name=$producer - # updtr_add name=$producer interval=1000000 offset=10000 - # updtr_prdcr_add name=$producer regex=$producer - # updtr_start name=$producer - # - # - # where each line is tailored to the remote host collected from. - # This potentially requires 1000s of nodeattr calls if done in shell - # rather than C/C++, so a C++ wrapper on libgenders is used. - out=$1 - - local aflist="-g $LDMS_GENDERS" - if test -n "$ATTRFILE1"; then - aflist="$aflist -g $ATTRFILE1" - fi - if test -n "$ATTRFILE2"; then - aflist="$aflist -g $ATTRFILE2" - fi - if test "$DEBUG" = "yes"; then - $LDMSCTL_ARGS -n $LDMS_HOSTNAME $aflist -v 1 - fi - # actually do it. - echo "# aggregator config args computed with $LDMSCTL_ARGS -n $LDMS_HOSTNAME $aflist" >> $out - $LDMSCTL_ARGS -n $LDMS_HOSTNAME $aflist >> $out - echo "# " >> $out - echo "# end aggregation section" >> $out - echo "# " >> $out -} - -generate_aggregator_config () { - start_add_hosts $LDMSD_PLUGIN_CONFIG_FILE - sed -i -e 's/updtr_add /updtr_add auto_interval=true /' $LDMSD_PLUGIN_CONFIG_FILE - return 0 -} - -# scan gender file for metric plugins and explicit schema names -get_schemas_from_genders () { - naf="$1" - local plugins=$($NODEATTR $naf -V -U ldmsd_metric_plugins 2>/dev/null) - local pl=$(echo $plugins | tr ",: " "\n" | sort -u) - local extra_schema="" - local lines="" - local x="" - for i in $pl; do - lines=$($NODEATTR $NODEATTRFILE -V -U ldmsd_$i ) - x=$(echo $lines | tr ": " "\n" | grep ^schema/| sed -e 's%schema/%%'| sort -u) - if test -z "$x"; then - extra_schema="$extra_schema $i" - else - extra_schema="$extra_schema $x" - fi - done - echo $extra_schema -} - -# extract schemas for a specific store from genders or environment -# into a space separated list. Upstream genders files, if defined, -# will be scanned for possible schema names also. -get_schema_list () { - local schema_host=$1 - local plugin=$2 - # string in gender is : separated list of schema names - - # List of schemas specifically fed to plugin. if empty, use - # plugin names and ldmsd_schemas_extra values. - local schemas=$($NODEATTR $NODEATTRFILE -v $schema_host ldmsd_schemas_${plugin} 2>/dev/null) - - # schemas not wanted on this plugin - local badschemas=$($NODEATTR $NODEATTRFILE -v $schema_host ldmsd_exclude_schemas_${plugin} 2>/dev/null) - - # schemas not wanted on any plugin - local reallybadschemas=$($NODEATTR $NODEATTRFILE -v $schema_host ldmsd_exclude_schemas 2>/dev/null) - - if test -z "$schemas"; then - # by default give all schemas to every store unless listed in env. - # get schema names from any gender-visible host - if test -z "$LDMSD_SCHEMA_LIST"; then - local stmp=$(get_schemas_from_genders "$NODEATTRFILE") - schemas="$stmp" - stmp=$(get_schemas_from_genders "$NODEATTRFILE1") - schemas="$schemas $stmp" - stmp=$(get_schemas_from_genders "$NODEATTRFILE2") - schemas="$schemas $stmp" - else - # string in env is , separated list of schema names - schemas="$LDMSD_SCHEMA_LIST" - fi - fi - if test -n "$LDMSD_EXCLUDE_SCHEMA_LIST"; then - envbadschemas="$LDMSD_EXCLUDE_SCHEMA_LIST" - fi - local excludelist="${envbadschemas},${badschemas},${reallybadschemas}" - local keepfile=$(mktemp $localstatedir/run/ldmsd/tmp/schemas.1.XXX) - local badfile=$(mktemp $localstatedir/run/ldmsd/tmp/schemas.2.XXX) - echo $schemas | tr ",: " "\n" | sort -u > $keepfile - echo $excludelist | tr ",: " "\n" | sort -u > $badfile - local slist=$(comm -23 $keepfile $badfile) - if ! test "$DEBUG" = "yes"; then - /bin/rm -f $keepfile $badfile - fi - echo $slist -} - - -generate_standard_storage_policies () { - # create the standard combination for pi/schema if allowed - pi=$1 - out=$2 - schemas=$3 - local contopt schopt container schema pcontopt pschopt - - stplist=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_names 2>/dev/null` - usedef=0 - if test -n "$stplist"; then - for stp in $(echo $stplist | tr ':' ' '); do - if test "$stp" = "default"; then - usedef=1 - fi - done - if test $usedef = "0"; then - return - fi - fi - - # get default producers - if $STRGPMATCHHOSTS; then - defpr=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_producers 2>/dev/null` - fi - if test -z "$defpr"; then - defpr='.*' - fi - logger -p syslog.info -t $LTAG "std strgp schemas $schemas" - for s in $schemas; do - stp=${s}_${pi} - stpconfig=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_custom_$stp 2>/dev/null` - if $STRGPMATCHHOSTS; then - stpprod=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_producers_$stp 2>/dev/null` - stpexcl=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_exclude_producers_$stp 2>/dev/null` - fi - stpmets=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_metrics_$stp 2>/dev/null` - stpexmets=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_exclude_metrics_$stp 2>/dev/null` - plugconfig=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_plugconf_$stp 2>/dev/null` - - if test -n "$stpconfig"; then - substpconfig=$(config_from_gender $stpconfig) - if test -n "$plugconfig"; then - plugschema=$(echo $substpconfig | sed -e 's/plugin=/name=/') - grok="`config_from_gender $plugconfig`" - eval PLUG_CONFIG_${pi}='$grok' - eval extraconfig='$'"PLUG_CONFIG_${pi}" - echo "config $plugschema $extraconfig" >> $out - fi - echo "strgp_add name=$stp $substpconfig" >> $out - else - # default container and schema options - pschopt="schema=$s" - pcontopt="container=$pi" - schopt="schema=$s" - contopt="container=$pi" - if test -n "$plugconfig"; then - grok="`config_from_gender $plugconfig`" - eval PLUG_CONFIG_${pi}='$grok' - eval extraconfig='$'"PLUG_CONFIG_${pi}" - # cancel default container and schema options if given - if echo "$extraconfig" |grep schema=; then - schema=$(echo $extraconfig|sed -e 's/.*schema=//g' -e 's/ .*//g') - fi > /dev/null - if test -n "$schema"; then - pschopt="schema=$schema" - schopt="" - fi - if echo "$extraconfig" |grep container=; then - container=$(echo $extraconfig|sed -e 's/.*container=//g' -e 's/ .*//g') - fi > /dev/null - if test -n "$container"; then - pcontopt="container=$container" - contopt="" - fi - echo "config name=$pi $contopt $schopt $extraconfig" >> $out - fi - echo "strgp_add name=$stp plugin=$pi $pcontopt $pschopt" >> $out - fi - if $STRGPMATCHHOSTS; then - if test -n "$stpprod"; then - #substpprod=$(config_from_gender $stpprod) - echo "strgp_prdcr_add name=$stp regex=$stpprod" >> $out - else - echo "strgp_prdcr_add name=$stp regex=$defpr" >> $out - fi - if test -n "$stpexcl"; then - echo "strgp_prdcr_del name=$stp regex=$stpexcl" >> $out - fi - else - echo "strgp_prdcr_add name=$stp regex=$defpr" >> $out - fi - if test -n "$stpmets"; then - for metric in $(echo $stpmets | tr ':' ' '); do - echo "strgp_metric_add name=$stp metric=$metric" >> $out - done - fi - if test -n "$stpexmets"; then - for metric in $(echo $stpexmets | tr ':' ' '); do - echo "strgp_metric_del name=$stp metric=$metric" >> $out - done - fi - echo "strgp_start name=$stp" >> $out - done -} - -generate_nonstandard_storage_policies () { - # create the user defined bits - out=$1 - - stplist=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_names 2>/dev/null` - if test -z "$stplist"; then - return - fi - - # get default producers - if $STRGPMATCHHOSTS; then - defpr=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_producers 2>/dev/null` - fi - if test -z "$defpr"; then - defpr='.*' - fi - for stp in $(echo $stplist | tr ':' ' '); do - if test "$stp" = "default"; then - continue - fi - stpconfig=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_custom_$stp 2>/dev/null` - stpprod=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_producers_$stp 2>/dev/null` - stpexcl=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_exclude_producers_$stp 2>/dev/null` - stpmets=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_metrics_$stp 2>/dev/null` - stpexmets=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_exclude_metrics_$stp 2>/dev/null` - plugconfig=`$NODEATTR $NODEATTRFILE -v $host ldmsd_strgp_plugconf_$stp 2>/dev/null` - - if test -z "$stpconfig"; then - logger -t $LTAG -p syslog.error -s "$0: ldmsd_strgp_custom_$stp is required for non-default storage policy $stp in ldmsd_strgp_names." - dietrace 1 - fi - substpconfig=$(config_from_gender $stpconfig) - if test -n "$plugconfig"; then - plugschema=$(echo $substpconfig | sed -e 's/plugin=/name=/') - grok="`config_from_gender $plugconfig`" - eval PLUG_CONFIG_${pi}='$grok' - eval extraconfig='$'"PLUG_CONFIG_${pi}" - echo "config $plugschema $extraconfig" >> $out - fi - echo "strgp_add name=$stp $substpconfig" >> $out - if $STRGPMATCHHOSTS; then - if test -n "$stpprod"; then - echo "strgp_prdcr_add name=$stp regex=$stpprod" >> $out - else - echo "strgp_prdcr_add name=$stp regex=$defpr" >> $out - fi - if test -n "$stpexcl"; then - echo "strgp_prdcr_del name=$stp regex=$stpexcl" >> $out - fi - else - echo "strgp_prdcr_add name=$stp regex=$defpr" >> $out - fi - if test -n "$stpmets"; then - for metric in $(echo $stpmets | tr ':' ' '); do - echo "strgp_metric_add name=$stp metric=$metric" >> $out - done - fi - if test -n "$stpexmets"; then - for metric in $(echo $stpexmets | tr ':' ' '); do - echo "strgp_metric_del name=$stp metric=$metric" >> $out - done - fi - echo "strgp_start name=$stp" >> $out - done -} - -# Generate storage plugin configuration, using the set of plugins from -# genders # on each host. -# Individual plugin config generation failures do not stop other -# plugins, but will be logged. -# Failed plugins may cause ldmsd itself to not start later when -# the config file is read. -# -# Each plugin listed in LDMSD_STORE_PLUGINS is started. -# -# The options for starting plugin P are taken from (if present) -# plugin-suffixed genders: -# (1) ldmsd_${P} gender value as the options (as in v2) -# OR -# (2) ldmsd_config_text_${P} gender value as a file containing a plugin -# specific configuration text line or lines. -# The text must include policy start command lines, unlike for samplers. -# As a special case, value yes means use -# $sysconfdir/sysconfig/ldms.d/plugins-conf/$P. -# The first line of the file is unconditionally appended to -# standard arguments for named store instance. -# Any additional lines that a plugin may support should use the full -# "config name=PLUGIN " syntax -# This works well for plugin-specific options standard across -# an entire cluster. -# Comments within this file should never begin the first line, -# but may appear any where else. -# OR -# (3) ldmsd_config_gen_${P} gender value as a program which will generate -# storage plugin configuration text *and start command* on stdout. -# As a special case, value yes means run -# $sysconfdir/sysconfig/ldms.d/plugins-conf/gen.$P -# The generation program is passed the arguments: -# plugin-name host [schemas for plugin if defined] -# The environment variables visible to the daemon runtime -# are also visible when the generator programs are called to -# generate their portions of the complete plugin configuration file. -# OR -# (4) The defaults. -# NOTES: -# Only one configuration method (1-4) is allowed for each plugin. -# host and producer-name may differ. Multiple configurations of the -# same plugin should be handled with options 2 or 3. -# -start_stores () { - if test -z $LDMSD_STORE_PLUGINS; then - echo "No stores required." - return; - fi - out=$1 - echoq $LDMSD_STORE_PLUGINS - echoq $out - - for pi in $(eval echo $LDMSD_STORE_PLUGINS | tr ":;'\`" "\n"); do - # schemas from env or genders - schemas=$(get_schema_list $host $pi) - # plugin options from gender files - config=$($NODEATTR $NODEATTRFILE -v $host ldmsd_${pi} 2>/dev/null) - grok="$(config_from_gender $config)" - eval STORE_CONFIG_${pi}='$grok' - eval extraconfig='$'"STORE_CONFIG_${pi}" - - conf="0" - if test -n "$extraconfig"; then - conf="v2" - fi - - # plugin options from per-plugin plain text file - cattext=$($NODEATTR $NODEATTRFILE -v $host ldmsd_config_text_${pi} 2>/dev/null) - if test -n "$cattext"; then - if test $conf = "1"; then - logger -p syslog.warning -t $LTAG.config.$pi "Skipping plugin $pi. Specifying both ldmsd_config_text_${pi} and ldmsd_${pi} is not allowed." - continue - fi - conf="text" - if ! test -f $cattext; then - if test -f $sysconfdir/sysconfig/ldms.d/plugins-conf/$cattext; then - cattext=$sysconfdir/sysconfig/ldms.d/plugins-conf/$cattext - fi - if test $cattext = "yes"; then - cattext=$sysconfdir/sysconfig/ldms.d/plugins-conf/$pi - fi - fi - if ! test -f $cattext; then - logger -p syslog.warning -t $LTAG.config.$pi "ldmsd_config_text_${pi} file $cattext not a regular file." - continue - fi - if ! test -r $cattext; then - logger -p syslog.warning -t $LTAG.config.$pi "ldmsd_config_text_${pi} file $cattext not readable." - continue - fi - fi - - # plugin options from per-plugin config/start generators - genprog=$($NODEATTR $NODEATTRFILE -v $host ldmsd_config_gen_${pi} 2>/dev/null) - if test -n "$genprog"; then - if ! test $conf = "0"; then - logger -p syslog.warning -t $LTAG.config.$pi "Skipping plugin $pi. Specifying both ldmsd_config_gen_${pi} and ldmsd_${pi} or ldmsd_config_text_${pi} not allowed." - continue - fi - conf="generate" - if ! test -f $genprog; then - if test -f $sysconfdir/sysconfig/ldms.d/plugins-conf/$genprog; then - genprog=$sysconfdir/sysconfig/ldms.d/plugins-conf/$genprog - fi - if test $genprog = "yes"; then - genprog=$sysconfdir/sysconfig/ldms.d/plugins-conf/gen.$pi - fi - fi - if ! test -f $genprog; then - logger -p syslog.warning -t $LTAG.config.$pi "ldmsd_config_gen_${pi} $genprog not a regular file." - continue - fi - if ! test -r $genprog; then - logger -p syslog.warning -t $LTAG.config.$pi "ldmsd_config_gen_${pi} $genprog not readable." - continue - fi - if ! test -x $genprog; then - logger -p syslog.warning -t $LTAG.config.$pi "ldmsd_config_gen_${pi} $genprog not executable." - continue - fi - fi - - echoq "Generating config for store plugin <${pi}>" - # write stuff to out as determined from gender values - # dead: ARGS_START="name=$pi interval=$interval offset=$offset" - ARGS_CONFIG="name=$pi $extraconfig" - echo load name=${pi} >> $out - - case $conf in - v2) - echo "# config store from gender ldmsd_${pi}" >> $out - # config the plugin defaults - echo "config $ARGS_CONFIG" >> $out - generate_standard_storage_policies $pi $out "$schemas" - ;; - text) - echo "# config store from $cattext" >> $out - echo -n "config $ARGS_CONFIG " >> $out - cat $cattext >> $out - echo "" >> $out - ;; - generate) - echo "# config store from $genprog $pi $host $schemas" >> $out - $genprog $pi $host $schemas >> $out - ;; - *) - echo "# config store from defaults" >> $out - echo "config $ARGS_CONFIG" >> $out - for s in $schemas; do - policy=${s}_${pi} - echo "strgp_add name=$policy plugin=$pi container=$pi schema=$s" >> $out - echo "strgp_prdcr_add name=$policy regex=.*" >> $out - echo "strgp_start name=$policy" >> $out - done - ;; - esac - done - - # generate storage policy explicitly requested by nonstandard names - generate_nonstandard_storage_policies $out - - echo "# " >> $out - echo "# end stores section" >> $out - echo "# " >> $out - - return $? -} - -generate_store_config() { - start_stores $LDMSD_PLUGIN_CONFIG_FILE -} - -generate_debug_config() { - out=$LDMSD_PLUGIN_CONFIG_FILE - if test -n "$LDMSD_DEBUG_CONFIG_FILE" -a -f "$LDMSD_DEBUG_CONFIG_FILE"; then - echo "# lines appended from $LDMSD_DEBUG_CONFIG_FILE" >> $out - cat $LDMSD_DEBUG_CONFIG_FILE >> $out - else - echo "# no LDMSD_DEBUG_CONFIG_FILE defined." >> $out - fi -} - -generate_transform_config() { - : # pending transform api -} - -#export -f start_ldms_plugins start_add_hosts start_stores -export generate_collector_config generate_aggregator_config generate_store_config generate_transform_config build_genders_file check_genders_file check_log_option generate_standart_storage_policies generate_nonstandard_storage_policies generate_debug_config - - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.agg.conf b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.agg.conf deleted file mode 100644 index b10978c11..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.agg.conf +++ /dev/null @@ -1,51 +0,0 @@ -# auth file must be set to a full path name of a secretword file. -LDMS_AUTH_FILE= -LDMS_AUTH_TYPE=ovis - -# Variables overriding defaults -# See man ldmsd-genders(8) for details. -# LDMSCLUSTER=remotename -# LDMS_GENDERS="/etc/sysconfig/ldms.d/ClusterGenders/genders.agg" -# LDMS_GENDERS_1="/etc/sysconfig/ldms.d/ClusterGenders/genders.local" -# directory where the log ldmsd.agg.log will go, or 'syslog' -# LDMS_LOG_PATH=/var/log/ldms-clusters -# LDMSD_DEBUG_CONFIG_FILE=/etc/sysconfig/ldms.d/debug/ldmsd.extra.local.conf -# -# LDMSAGGD_MEM_RES= -# LDMSD_EVENT_THDS= -# LDMSD_USE_UNIX_SOCK= -# LDMSD_USE_INET_SOCK= -# LDMSAGGD_CONNECTION_RETRY_INTERVAL= -# LDMSD_NUMA= -# LDMSD_PROC= -# LDMS_LIB_PATH= -# VERBOSE=-v - -# Variables overriding attribute-derived values read with libgenders -#LDMSD_PORT=412 -# LDMSD_XPRT= -# LDMSD_HOST= -# LDMSD_DBG= - -# Variable overriding the use of attributes entirely for plugin configuration. -# If defined, only this file is used for plugin configuration: -# LDMSD_PLUGIN_CONFIG_FILE= - -# sampler related overrides -# LDMSD_METRIC_PLUGINS= -# COMPONENT_ID= -# LDMSD_IDBASE= -# LDMSD_INTERVAL_DEFAULT= -# LDMSD_OFFSET_DEFAULT= - -# aggregator related overrides -# LDMSAGGD_INTERVAL_DEFAULT= -# LDMSAGGD_OFFSET_DEFAULT= - -# storage related overrides -# LDMSD_STORE_PLUGINS= -# LDMSD_SCHEMA_LIST= - -# Experimental disabling of attribute loading with genders. -# Not expected to work without local customization -# LDMS_USE_GENDERS=0 diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.all_instances.conf.example b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.all_instances.conf.example deleted file mode 100644 index a8bb7281f..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.all_instances.conf.example +++ /dev/null @@ -1,115 +0,0 @@ -# -# Example of centrally defining ports and timing on a multi-cluster -# aggregation host. Each cluster has its own daemon for level two on -# host milly. The set of clusters is managed by the CAPVIZ team. -# -# This contains includable logic common to all aggregators that tweaks by target. -# Ports on milly need to be consistently defined and timing needs to -# not produce NIC contention. -# The variable ALL_PICKY can be set to make the failure to match a configured -# host fatal. - -# in order of who aggregates first. used in other utility scripts, not here. -clusterlist="skybridge chama serrano solo uno ghost doom eclipse hazel cts1x" - -# cluster csv ldmsds start at 413 (411, 412 reserved for milly) -# web serving ldmsds start at 453 eventually -# job serving ldmsds start at 473 eventually -# coll serving ldmsds start at 493 eventually -case $LDMSCLUSTER in -milly) - export MILLY_PORT=411 - ;; -agg) - export MILLY_AGG_PORT=412 - ;; -solo) - export CAPVIZ_AGG_PORT=413 - ;; -chama) - export CAPVIZ_AGG_PORT=414 - ;; -skybridge) - export CAPVIZ_AGG_PORT=415 - ;; -serrano) - export CAPVIZ_AGG_PORT=416 - ;; -uno) - export CAPVIZ_AGG_PORT=417 - ;; -ghost) - export CAPVIZ_AGG_PORT=418 - ;; -cts1x) - export CAPVIZ_AGG_PORT=419 - ;; -doom) - export CAPVIZ_AGG_PORT=420 - ;; -eclipse) - export CAPVIZ_AGG_PORT=421 - ;; -hazel) - export CAPVIZ_AGG_PORT=422 - ;; -*) - if test -n "$ALL_PICKY"; then - echo "PORT: unset for $LDMSCLUSTER in ldmsd.all_instances.conf" - exit 1 - fi -esac - - - -# timing on a shared network link needs to be consistent and noncontending. -# current schedule is 2 second gap between clusters. larger may need longer. -base_interval=60000000 -# max offset is 29999999 -case $LDMSCLUSTER in -solo) - export CAPVIZ_AGG_INTERVAL=$base_interval - export CAPVIZ_AGG_OFFSET=8200000 - ;; -chama) - export CAPVIZ_AGG_INTERVAL=$base_interval - export CAPVIZ_AGG_OFFSET=4200000 - ;; -skybridge) - export CAPVIZ_AGG_INTERVAL=$base_interval - export CAPVIZ_AGG_OFFSET=2200000 - ;; -serrano) - export CAPVIZ_AGG_INTERVAL=$base_interval - export CAPVIZ_AGG_OFFSET=6200000 - ;; -uno) - export CAPVIZ_AGG_INTERVAL=$base_interval - export CAPVIZ_AGG_OFFSET=10200000 - ;; -ghost) - export CAPVIZ_AGG_INTERVAL=$base_interval - export CAPVIZ_AGG_OFFSET=12200000 - ;; -cts1x) - export CAPVIZ_AGG_INTERVAL=$base_interval - export CAPVIZ_AGG_OFFSET=18200000 - ;; -doom) - export CAPVIZ_AGG_INTERVAL=$base_interval - export CAPVIZ_AGG_OFFSET=14200000 - ;; -eclipse) - export CAPVIZ_AGG_INTERVAL=$base_interval - export CAPVIZ_AGG_OFFSET=16200000 - ;; -hazel) - export CAPVIZ_AGG_INTERVAL=$base_interval - export CAPVIZ_AGG_OFFSET=16200000 - ;; -*) - if test -n "$ALL_PICKY"; then - echo "TIMING: unset for $LDMSCLUSTER in ldmsd.all_instances.conf" - exit 1 - fi -esac diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.hermes.conf b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.hermes.conf deleted file mode 100644 index aacf2be80..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.hermes.conf +++ /dev/null @@ -1,4 +0,0 @@ -# hermes 'cluster' conf file used by twain to aggregate hermes when -# started as ldmsd@hermes.service -gender_root=/home/baallan/ovis/repos/ogc-gitlab-tossinit/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders -LDMS_GENDERS="$gender_root/genders.hermes $gender_root/genders.poseidon $gender_root/twain.genders.hermes" diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.hermes.local.conf b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.hermes.local.conf deleted file mode 100644 index 585ecea5f..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.hermes.local.conf +++ /dev/null @@ -1,78 +0,0 @@ -# loaded from sysconfig/ldmsd -# This file is the location for redirecting to an alternate genders file -# and for setting other invariant environment bits not set via genders. - -# For multicluster aggregation, we need to compose the cluster -# admins genders with the aggregator host file specific to it that picks up -# store configuations. - -# LDMS_LOG_PATH defines where to send logs. if a path, it must be a -# directory existing on all nodes. -# If empty we use journal or syslog instead. To suppress entirely, set to NONE. -# This suppresses the daemon's logs, not the systemd scripting messages. -# -# Example of a file for debugging without syslog access. -# LDMS_LOG_PATH=/var/log/ldms-clusters/$LDMSCLUSTER -LDMS_LOG_PATH=journal -USER=root -export USER - -LDMS_GENDERS="/home/baallan/ovis/repos/ogc-gitlab-tossinit/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/genders.hermes /home/baallan/ovis/repos/ogc-gitlab-tossinit/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/genders.poseidon" -LDMS_GENDERS_HOST=hermes.ca.sanda.gov -# hostfull comes from env, and might be short or not. -if test -n $LDMS_GENDERS_HOST; then - hostfull=$LDMS_GENDERS_HOST -else - hostfull=$HOSTNAME -fi - -# LDMS_HOSTNAME is a hostname that doesn't contain the domain name -host="$( echo $hostfull | cut -d "." -f1 )" -LDMS_HOSTNAME=$host -LDMSCLUSTER=$host - -# In the absence of cluster genders one of LDMSD_IDBASE COMPONENT_ID -# must be set -# LDMSD_IDBASE is for cluster environments where nodes have numeric -# suffix in their names and no ldmsd_idbase gender is defined. -# LDMSD_IDBASE=1 -# COMPONENT_ID is for stand-alone data collector hosts. It must be >= 1. -COMPONENT_ID=1 - -# set 1 if RDMAV_FORK_SAFE=1 is needed by ldmsd network usage. -# or empty if not. -LDMS_RDMAV_FORK_SAFE=1 -export LDMS_RDMAV_FORK_SAFE - -# zap transport changes to defaults/environment if needed. -# export ZAP_LIBPATH=$libdir/ovis-lib/ -# export ZAP_EVENT_WORKERS=16 -# export ZAP_EVENT_QDEPTH=65536 -# -# Cray zap environment variables -# FIXME -- Note: if using ugni you need to set your configured cookie by defining the ZAP_UGNI_COOKIE environment variable below -# export ZAP_UGNI_UNBIND_TIMEOUT=2 -# export ZAP_UGNI_DISCONNECT_EV_TIMEOUT=4 -# export ZAP_UGNI_STATE_INTERVAL=10000000 -# export ZAP_UGNI_STATE_OFFSET=-100000 -# export ZAP_UGNI_PTAG=91 -# export ZAP_UGNI_COOKIE=0xc5900000 - - -# very odd values to specify, unless running multiple sampler daemons. -# LDMSD_USE_UNIX_SOCK -# LDMSD_USE_INET_SOCK - - -#STORE_PATH=/mprojects/ovis/ClusterData/$LDMSCLUSTER/ldms/v3/store_csv - -#LDMSAGGD_CONNECTION_RETRY_INTERVAL=10000000 - -AGG_NAME=$LDMSCLUSTER - -# number to start 'compid' of aggregators for use in file system -# name computations. Should be larger than highest real compid in cluster. -AGG_ID_BASE=1000 - -# chama has about 1300 node x 8 set x 4k/set (blockmin) or 52M. allow some room. -LDMSAGGD_MEM_RES=100M diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.in b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.in deleted file mode 100644 index 2c7ac1ee6..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.in +++ /dev/null @@ -1,539 +0,0 @@ -# -# loaded from ldmsd-pre-systemd -# Defines Paths to executables and libs and boot functions for samplers. -# This is where the configuration is extracted from genders information. -# Create an alternate genders file and name it in ldmsd.%I.conf variable -# LDMS_GENDERS for exception data, if any, needed. -# -# Path to invariants are not handled by genders. -# -# Implementation note: -# 1) any use of nodeattr should be scripted to fail gracefully and use -# a sensible default instead. -# 2) this file is mainly sanity checking; shell/genders heavy lifting -# goes on in ldms-functions supplied functions after all the required defaults -# have been checked here. - -export prefix=@prefix@ -export exec_prefix=@exec_prefix@ -export sbindir=@sbindir@ -export bindir=@bindir@ -export libdir=@libdir@ -export localstatedir=@localstatedir@ -export sysconfdir=@sysconfdir@ -export pythondir=@pythondir@ -export libevent2_libdir=@libeventpath@ - -if test -z "$FUNCTIONS" -o ! -r "$FUNCTIONS"; then - echo "ldms.d/ldmsd can only be used from systemctl or service launchers, not directly." - exit 1 -fi - -COMMONFILE=$sysconfdir/sysconfig/ldms.d/ldmsd.all_instances.conf -if test -f $COMMONFILE; then -ALL_PICKY=1 -. $COMMONFILE -fi - -if test -z "$LDMSCLUSTER"; then - NODEFILE=$sysconfdir/sysconfig/ldms.d/ldmsd.local.conf -else - NODEFILE=$sysconfdir/sysconfig/ldms.d/ldmsd.$LDMSCLUSTER.conf -fi - -if test -f $NODEFILE; then -# load ldmsd localizations source -. $NODEFILE -else - logger -t $LTAG syslog.warning "Missing $NODEFILE. Most likely this means \"$LDMSCLUSTER \" is a command-line typo." - logger -t $LTAG syslog.warning "EXPECT ERRORS TO FOLLOW." -fi - -if test -n "$LDMSD_GENDERS_HOST"; then - echo 'set LDMS_GENDERS_HOST not LDMSD_GENDERS_HOST' - dietrace 1 -fi -if test -n "$LDMS_GENDERS_HOST"; then - hostfull=$LDMS_GENDERS_HOST -else - hostfull=`hostname` -fi -host="$( echo $hostfull | cut -d "." -f1 )" -LDMS_HOSTNAME=$host -export host hostfull - -if ! test -f $libdir/ovis-lib-configvars.sh; then - logger -t $LTAG syslog.err "Missing $libdir/ovis-lib-configvars.sh" - dietrace 1 -fi -if ! test -f $libdir/ovis-ldms-configvars.sh; then - logger -t $LTAG syslog.err "Missing $libdir/ovis-ldms-configvars.sh" - dietrace 1 -fi - -. $libdir/ovis-lib-configvars.sh -. $libdir/ovis-ldms-configvars.sh - -export LD_LIBRARY_PATH=$libdir:$ovis_ldms_pkglibdir:$ovis_ldms_plugins:$libevent2_libdir:$LD_LIBRARY_PATH -if test -z "$LDMSD_PLUGIN_LIBPATH"; then - LDMSD_PLUGIN_LIBPATH=$ovis_ldms_plugins -fi -if test -z "$ZAP_LIBPATH"; then - ZAP_LIBPATH=$ovis_ldms_plugins -fi -export ZAP_LIBPATH LDMSD_PLUGIN_LIBPATH - -if test -z "$PYTHONPATH"; then - export PYTHONPATH="$pythondir" -else - export PYTHONPATH="$pythondir:$PYTHONPATH" -fi - -if test -z "$LDMS_SECRETS_DIR"; then - LDMS_SECRETS_DIR=$sysconfdir/sysconfig/ldms.d/ClusterSecrets -fi -if test -z "$LDMS_AUTH_FILE" -a "x$LDMS_AUTH_TYPE" = "xovis" ; then - LDMS_AUTH_FILE=$LDMS_SECRETS_DIR/$LDMSCLUSTER.ldmsauth.conf -fi - -# Derive component IDs from hostname embedded numbers, with -# special handling for cray. -test -d /proc/cray_xt -RETVAL=$? -if [ $RETVAL -eq 0 ]; then - # cray specific variables - COMPONENT_ID="$(cat /proc/cray_xt/nid)" - CNAME="$(cat /proc/cray_xt/cname)" - NIDNUM=$(printf %05d ${COMPONENT_ID}) - HOSTNAME="nid$(printf %05d ${COMPONENT_ID})" - NODENUM=$(echo $CNAME | awk -F "n" '{print $2}') - ARIES=$(echo $CNAME | awk -F "n" '{print $1}') - IS_PHI="$(head /proc/cpuinfo | grep Phi)" - NODETYPE=$( uname -r | awk -F "ari_" '{print $2}' ) - if [ -z $NODETYPE ]; then - NODETYPE=c - fi - export CNAME NIDNUM NODENUM NODETYPE ARIES IS_PHI -else - hostnumber="$(echo $LDMS_HOSTNAME | sed 's/[a-z\-]//g' | sed 's/^0*//g')" - if [ -z $hostnumber ]; then - echoq "WARNING: $host (no digits in hostname?)" - hostnumber=0 - fi -fi -export hostnumber - -build_genders_file -check_genders_file 0 -check_genders_file 1 -check_genders_file 2 - -if ! $NODEATTR $NODEATTRFILE -k > /dev/null 2>&1; then - echoq "problem with $NODEATTRFILE" - logger -t $LTAG -p syslog.crit -s "BAD GENDERS $NODEATTRFILE" - $NODEATTR $NODEATTRFILE -k - dietrace 1 -fi -export NODEATTR NODEATTRFILE - -if ! $NODEATTR $NODEATTRFILE $host ldmsaggd >/dev/null 2>&1; then - echoq "$host is is not an LDMSD aggregation host." -fi - -if test -n "$NODE_ID_BASE"; then - if test -n "$LDMSD_IDBASE"; then - logger -t $LTAG -p syslog.info "Ignoring NODE_ID_BASE for LDMSD_IDBASE"; - else - # support legacy usage - LDMSD_IDBASE=$NODE_ID_BASE - fi -fi -# precedence: -# shell defined COMPONENT_ID -# ldmsd_id defined number -# ldmsd_idbase + ldmsd_idsuffix -# ldmsd_idbase + detected number suffix -if test -z "$LDMSD_IDBASE"; then - LDMSD_IDBASE=`$NODEATTR $NODEATTRFILE -v $host ldmsd_idbase 2>/dev/null` - if test -z "$LDMSD_IDBASE" ; then - LDMSD_IDBASE=1 - fi -fi -export LDMSD_IDBASE - -if test -z $COMPONENT_ID; then - LDMSD_ID=`$NODEATTR $NODEATTRFILE -v $host ldmsd_id 2>/dev/null` - if test -n "$LDMSD_ID" ; then - COMPONENT_ID=$LDMSD_ID - fi -fi -if test -z $COMPONENT_ID; then - suff=`$NODEATTR $NODEATTRFILE -v $host ldmsd_idsuffix 2>/dev/null` - if test -n "$suff" ; then - hostnumber=$suff - fi - if test -n "$AGG_ID_BASE"; then - COMPONENT_ID="$(( $AGG_ID_BASE + $hostnumber ))" - fi - if test -n "$LDMSD_IDBASE" -a -z "$COMPONENT_ID"; then - COMPONENT_ID="$(( $LDMSD_IDBASE + $hostnumber ))" - fi - if test -z "$COMPONENT_ID"; then - COMPONENT_ID=1 - fi -fi -export COMPONENT_ID - -if [ $COMPONENT_ID -lt 1 ]; then - logger -t $LTAG syslog.err "Component_ID for $host is $COMPONENT_ID. Exiting..." - logger -t $LTAG syslog.info "set COMPONENT_ID in conf file or LDMSD_IDBASE in genders file." - dietrace 1 -fi - -# Define processor affinity if wanted -if test -n "$LDMSD_NUMA" -o -n "$IS_PHI"; then - if test -z "$LDMSD_PROC"; then - LDMSD_PROC=`$NODEATTR $NODEATTRFILE -v $host ldmsd_proc 2>/dev/null` - fi - if test -z $LDMSD_PROC; then - LDMSD_PROC=67 - fi -fi - -# Define which physical core to bind ldmsd process to on numa hosts -if [[ -z $LDMSD_PROC ]]; then - NUMACTL="" - NUMAOPT="" -else - NUMACTL="numactl" - NUMAOPT="--physcpubind=$LDMSD_PROC" -fi -export NUMACTL NUMAOPT - -check_auth_option - -if ! $NODEATTR $NODEATTRFILE $host ldmsd >/dev/null 2>&1; then - not_collector=1 - echoq "$host is is not an LDMSD (data collection) host." -fi - -# now check localizations and define from genders anything that's missing. - -PATH="$sbindir:$bindir:$PATH" -if test -z $LDMS_LIB_PATH; then - LDMS_LIB_PATH="$libdir/ovis-ldms" -fi -# never override LDMS_PLUGIN_PATH independently -LDMS_PLUGIN_PATH="$LDMS_LIB_PATH" -export LDMS_PLUGIN_PATH -export LDMS_LIB_PATH - -# load up daemon genders values not scripted earlier -# then process missing values -if test -z $LDMSD_PORT; then - LDMSD_PORT=`$NODEATTR $NODEATTRFILE -v $host ldmsd_port 2>/dev/null` - if test -z $LDMSD_PORT; then - LDMSD_PORT=411 - else - case $LDMSD_PORT in - [0-9]*) - : - ;; - '$'*) - LDMSD_PORT=`eval echo $LDMSD_PORT` - ;; - *) - logger -t $LTAG syslog.error "Unexpected LDMSD_PORT=$LDMSD_PORT" - dietrace 1 - ;; - esac - fi -fi -export LDMSD_PORT - -if test -z $LDMSD_XPRT; then - LDMSD_XPRT=`$NODEATTR $NODEATTRFILE -v $host ldmsd_xprt 2>/dev/null` - if test -z $LDMSD_XPRT; then - LDMSD_XPRT=sock - fi -fi -export LDMSD_XPRT - -# When ugni is used as the transport, ZAP_UGNI_COOKIE must be set, and for the -# Cray-XE, ZAP_UGNI_PTAG must also be set. -if test "$LDMSD_XPRT" = "ugni"; then - kern_rel=$(uname -r) - if test "${kern_rel#*-cray_ari}" != "$kern_rel"; then - if test -z "$ZAP_UGNI_COOKIE"; then - logger -t $LTAG syslog.error "When LDMSD_XPRT is 'ugni' on a Cray XC, ZAP_UGNI_COOKIE must also be set" - dietrace 1 - fi - export ZAP_UGNI_COOKIE - elif test "${kern_rel#*-cray_gem}" != "$kern_rel"; then - if test -z "$ZAP_UGNI_PTAG"; then - logger -t $LTAG syslog.error "When LDMSD_XPRT is 'ugni' on a Cray XE, ZAP_UGNI_PTAG must also be set" - dietrace 1 - fi - if test -z "$ZAP_UGNI_COOKIE"; then - logger -t $LTAG syslog.error "When LDMSD_XPRT is 'ugni' on a Cray XE, ZAP_UGNI_COOKIE must also be set" - dietrace 1 - fi - export ZAP_UGNI_PTAG ZAP_UGNI_COOKIE - fi -fi - -if test -z $LDMSD_HOST; then - LDMSD_HOST=`$NODEATTR $NODEATTRFILE -v $host ldmsd_host 2>/dev/null` -fi - -if test -z $LDMSD_DBG; then - LDMSD_DBG=`$NODEATTR $NODEATTRFILE -v $host ldmsd_dbg 2>/dev/null` - if test -z $LDMSD_DBG; then - LDMSD_DBG=ERROR - else - echoq LDMSD_DBG IS $LDMSD_DBG - fi -fi -export LDMSD_DBG - -# : separated list of metric sets to load at startup -if test -z "$LDMSD_METRIC_PLUGINS"; then - LDMSD_METRIC_PLUGINS=`$NODEATTR $NODEATTRFILE -v $host ldmsd_metric_plugins 2>/dev/null` - if test -z "$LDMSD_METRIC_PLUGINS"; then - LDMSD_METRIC_PLUGINS="" - fi -fi -export LDMSD_METRIC_PLUGINS - -if test -z "$LDMSD_INTERVAL_DEFAULT"; then - LDMSD_INTERVAL_DEFAULT=`$NODEATTR $NODEATTRFILE -v $host ldmsd_interval_default 2>/dev/null` - if test -z "$LDMSD_INTERVAL_DEFAULT"; then - LDMSD_INTERVAL_DEFAULT=10000000 - # 10 sec - fi -fi -export LDMSD_INTERVAL_DEFAULT - -if test -z "$LDMSD_OFFSET_DEFAULT"; then - LDMSD_OFFSET_DEFAULT=`$NODEATTR $NODEATTRFILE -v $host ldmsd_offset_default 2>/dev/null` - if test -z "$LDMSD_OFFSET_DEFAULT"; then - LDMSD_OFFSET_DEFAULT=0 - fi -fi -export LDMSD_OFFSET_DEFAULT - -# Note the LDMS_LOG_PATH may become a problem if -# on a shared file system that goes down and daemon debugging is enabled. -if test -z "$LDMS_LOG_PATH"; then - LDMS_LOG_PATH=$($NODEATTR $NODEATTRFILE -v $host ldmsd_log 2>/dev/null) - if test -z "$LDMS_LOG_PATH"; then - LDMS_LOG_PATH=journal - else - # expand env variables in path, if any - LDMS_LOG_PATH=$(eval echo $LDMS_LOG_PATH) - fi -fi -export LDMS_LOG_PATH -export LDMS_LOG_OPT -export LDMS_LOG_FILE - -if test -z "$LDMSD_USE_UNIX_SOCK"; then - LDMSD_USE_UNIX_SOCK=`$NODEATTR $NODEATTRFILE -v $host ldmsd_use_unix_socket 2>/dev/null` -fi - -if test -z "$LDMSD_SOCKPATH"; then - LDMSD_SOCKPATH=`$NODEATTR $NODEATTRFILE -v $host ldmsd_sockpath 2>/dev/null` -fi - -if test "x$LDMSD_USE_UNIX_SOCK" = "xyes"; then - #Paths to unix domain socket used by ldmsctl to communicate with ldmsd - if test -z "$LDMSD_SOCKPATH"; then - LDMSD_SOCKPATH="$localstatedir/run/ldmsd/usock.$LDMSCLUSTER" - fi - LDMSD_SOCK_OPT="-S" - sockdir=`dirname $LDMSD_SOCKPATH` - mkdir -p $sockdir 2>/dev/null - logger syslog.err "LDMSD_USE_UNIX_SOCK is not supported by ldmsd in this release." - LDMSD_SOCK_OPT="" - unset LDMSD_SOCKPATH - # the unix socket option is not yet available in v4. -else - LDMSD_SOCK_OPT="" - unset LDMSD_SOCKPATH -fi -export LDMSD_SOCK_OPT LDMSD_SOCKPATH - -if test -z "$VGBIN"; then - VGBIN=`$NODEATTR $NODEATTRFILE -v $host ldmsd_vg 2>/dev/null` -fi -if test -n "$VGBIN"; then - export VGBIN - if test -z "$VGOPT"; then - if test -x $VGBIN; then - VGOPTFILE=`$NODEATTR $NODEATTRFILE -v $host ldmsd_vgargfile 2>/dev/null` - else - logger -t $LTAG syslog.err "VGBIN $VGBIN missing. Fix in $NODEATTRFILE" - dietrace 1 - fi - if test -n "$VGOPTFILE"; then - if test -f $VGOPTFILE; then - VGOPT=`cat $VGOPTFILE` - else - logger -t $LTAG syslog.err "VGOPTFILE $VGOPTFILE missing. Fix in $NODEATTRFILE" - dietrace 1 - fi - fi - fi -fi -if test -n "$VGOPT"; then - export VGOPT -fi - -if test -z "$LDMSD_USE_INET_SOCK"; then - LDMSD_USE_INET_SOCK=`$NODEATTR $NODEATTRFILE -v $host ldmsd_use_inet_socket 2>/dev/null` -fi - -if test -z "$LDMSD_CONFIG_PORT"; then - LDMSD_CONFIG_PORT=`$NODEATTR $NODEATTRFILE -v $host ldmsd_config_port 2>/dev/null` - LDMSD_CONFIG_PORT="sock:$LDMSD_CONFIG_PORT" -else - case $LDMSD_CONFIG_PORT in - sock:*) - ;; - *) - LDMSD_CONFIG_PORT="sock:$LDMSD_CONFIG_PORT" - ;; - esac - -fi - -if test "x$LDMSD_USE_INET_SOCK" = "xyes"; then - LDMSD_INET_OPT="-x" - if test -z "LDMSD_CONFIG_PORT"; then - LDMSD_CONFIG_PORT="sock:410" - fi -else - LDMSD_INET_OPT="" - LDMSD_CONFIG_PORT="" -fi -export LDMSD_INET_OPT LDMSD_CONFIG_PORT - -# deal with store plugins -if test -n "$LDMSAGGD_STORES"; then - logger -t $LTAG syslog.error "LDMSAGGD_STORES defined is obsolete. Use LDMSD_STORE_PLUGINS" - dietrace 1 -fi -if test -n "$STORE_PATH"; then - logger -t $LTAG syslog.error "STORE_PATH defined is obsolete. Set it in store_csv plugin option instead." - dietrace 1 -fi -if test -z "$LDMSD_STORE_PLUGINS"; then - LDMSD_STORE_PLUGINS=`$NODEATTR $NODEATTRFILE -v $host ldmsd_store_plugins 2>/dev/null` - if test -z "$LDMSD_STORE_PLUGINS"; then - echoq "no stores configured." - fi -fi -export LDMSD_STORE_PLUGINS - -if test -z $LDMSCTL_ARGS; then - LDMSCTL_ARGS=$bindir/ldmsctl_args3 -fi -if ! test -x $LDMSCTL_ARGS; then - echoq "cannot verify $LDMSCTL_ARGS" - dietrace 1 -fi -if test "$DEBUG" = "yes"; then - # log some noise - $LDMSCTL_ARGS -n $LDMS_HOSTNAME -t store-list -v 1 -fi - -if test -z "$LDMSD_SCHEMA_LIST"; then - # query entire gender hierarchy recursively for schemas in use anywhere. - LDMSD_SCHEMA_LIST=`$LDMSCTL_ARGS -n $LDMS_HOSTNAME -t store-list 2>/dev/null` -fi -LDMSD_ALL_SCHEMA=`echo $LDMSD_SCHEMA_LIST | tr ",: " "\n" | sort -u` - -if test -z "$LDMSAGGD_CONNECTION_RETRY_INTERVAL"; then - LDMSAGGD_CONNECTION_RETRY_INTERVAL=`$NODEATTR $NODEATTRFILE -v $host ldmsaggd_conn_retry 2>/dev/null` - if test -z "$LDMSAGGD_CONNECTION_RETRY_INTERVAL"; then - LDMSAGGD_CONNECTION_RETRY_INTERVAL=2000000 - fi -fi - -if test -z "$LDMSAGGD_INTERVAL_DEFAULT"; then - LDMSAGGD_INTERVAL_DEFAULT=`$NODEATTR $NODEATTRFILE -v $host ldmsaggd_interval_default 2>/dev/null` - if test -z "$LDMSAGGD_INTERVAL_DEFAULT"; then - LDMSAGGD_INTERVAL_DEFAULT=10000000 - fi -fi -export LDMSAGGD_INTERVAL_DEFAULT - -if test -z "$LDMSAGGD_OFFSET_DEFAULT"; then - LDMSAGGD_OFFSET_DEFAULT=`$NODEATTR $NODEATTRFILE -v $host ldmsaggd_offset_default 2>/dev/null` - if test -z "$LDMSAGGD_OFFSET_DEFAULT"; then - LDMSAGGD_OFFSET_DEFAULT=200000 - fi -fi -export LDMSAGGD_OFFSET_DEFAULT - -if test -n "$LDMSAGGD_NUM_PROCS"; then - logger -t $LTAG syslog.error "LDMSAGGD_NUM_PROCS defined is obsolete. Use LDMSD_EVENT_THDS or gender ldmsd_event_thds instead." - dietrace 1 -fi - -if test -z "$LDMSAGGD_MEM_RES"; then - LDMSAGGD_MEM_RES=`$NODEATTR $NODEATTRFILE -v $host ldmsaggd_mem_res 2>/dev/null` -fi -export LDMSAGGD_MEM_RES -if test -z "$LDMSAGGD_MEM_RES"; then - MEM_OPT="" -else - MEM_OPT="-m" -fi -export MEM_OPT - -if test -z "$LDMSD_EVENT_THDS"; then - LDMSD_EVENT_THDS=`$NODEATTR $NODEATTRFILE -v $host ldmsd_event_thds 2>/dev/null` - if test -z "$LDMSD_EVENT_THDS"; then - LDMSD_EVENT_THDS=4 - fi -fi -export LDMSD_EVENT_THDS - - -if test -z "$LDMSD_PLUGIN_CONFIG_FILE"; then - if test "x$LDMS_USE_GENDERS" != "x0"; then - # these will set LDMSD_PLUGIN_CONFIG_FILE - generate_collector_config - generate_aggregator_config - generate_transform_config - generate_store_config - generate_debug_config - else - logger -t $LTAG syslog.error "Generating LDMSD configuration file without genders file not yet supported." - exit 1 - # here we would like instead an automated process that just assembles - # snippets from plugins-conf driven by shell variables. - # such a process requires more admin cleverness in using ldms plugin syntax - fi -else - if ! test -f $LDMSD_PLUGIN_CONFIG_FILE; then - logger -t $LTAG syslog.info "Missing $LDMSD_PLUGIN_CONFIG_FILE config file specified by user in LDMSD_PLUGIN_CONFIG_FILE variable." - dietrace 1 - fi -fi -if ! test -s $LDMSD_PLUGIN_CONFIG_FILE; then - logger -t $LTAG syslog.warning "LDMSD configuration $LDMSD_PLUGIN_CONFIG_FILE is empty. Daemon idling." -fi - -export LDMSD_PLUGIN_CONFIG_FILE - -if test -n "$LDMSD_START_HOOKS"; then - for i in $LDMSD_START_HOOKS; do - if test -f $i; then - . $i - else - logger -t $LTAG syslog.info "Missing config file specified by user in LDMSD_START_HOOKS: $i" - fi - done -fi diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.local.conf b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.local.conf deleted file mode 100644 index fc22eb6a9..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.local.conf +++ /dev/null @@ -1,54 +0,0 @@ -# auth type must be ovis or munge -LDMS_AUTH_TYPE=ovis -# auth file must be set to a full path name of a secretword file if using type 'ovis'. -LDMS_AUTH_FILE= - -# Variables overriding defaults -# See man ldmsd-genders(8) for details. -# LDMSCLUSTER=remotename -# LDMS_GENDERS="/etc/sysconfig/ldms.d/ClusterGenders/genders.local" -# LDMS_LOG_PATH=/path/file -# LDMSAGGD_MEM_RES= -# LDMSD_EVENT_THDS= -# LDMSD_USE_UNIX_SOCK= -# LDMSD_USE_INET_SOCK= -# LDMSAGGD_CONNECTION_RETRY_INTERVAL= -# LDMSD_NUMA= -# LDMSD_PROC= -# LDMS_LIB_PATH= -# VERBOSE=-v - -# Variables overriding attribute-derived values read with libgenders -# LDMSD_PORT= -# LDMSD_XPRT= -# LDMSD_HOST= -# LDMSD_DBG= - -# Variable overriding the use of attributes entirely for plugin configuration. -# If defined, only this file is used for plugin configuration: -# LDMSD_PLUGIN_CONFIG_FILE= -# -# If defined, append this file to the generated plugin configuration -# LDMSD_DEBUG_CONFIG_FILE=/etc/sysconfig/ldms.d/debug/ldmsd.extra.local.conf - -# sampler related overrides -# LDMSD_METRIC_PLUGINS= -# COMPONENT_ID= -# LDMSD_IDBASE= -# LDMSD_INTERVAL_DEFAULT= -# LDMSD_OFFSET_DEFAULT= - -# aggregator related overrides -# LDMSAGGD_INTERVAL_DEFAULT= -# LDMSAGGD_OFFSET_DEFAULT= - -# storage related overrides -# LDMSD_STORE_PLUGINS= -# LDMSD_SCHEMA_LIST= - -# start-time init scripts; missing input is ignored with an info message. -LDMSD_START_HOOKS="$sysconfdir/sysconfig/ldms.d/plugins-conf/init_jobinfo.sh" - -# Experimental disabling of attribute loading with genders. -# Not expected to work without local customization -# LDMS_USE_GENDERS=0 diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.poseidon.local.conf b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.poseidon.local.conf deleted file mode 100644 index aec617e66..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.poseidon.local.conf +++ /dev/null @@ -1,80 +0,0 @@ -# loaded from sysconfig/ldmsd -# This file is the location for redirecting to an alternate genders file -# and for setting other invariant environment bits not set via genders. - -# For multicluster aggregation, we need to compose the cluster -# admins genders with the aggregator host file specific to it that picks up -# store configuations. - -# LDMS_LOG_PATH defines where to send logs. if a path, it must be a -# directory existing on all nodes. -# If empty we use journal or syslog instead. To suppress entirely, set to NONE. -# This suppresses the daemon's logs, not the systemd scripting messages. -# -# Example of a file for debugging without syslog access. -# LDMS_LOG_PATH=/var/log/ldms-clusters/$LDMSCLUSTER -LDMS_LOG_PATH=journal -USER=root -export USER - -LDMS_GENDERS="/home/baallan/ovis/repos/ogc-gitlab-tossinit/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ClusterGenders/genders.poseidon" -LDMS_GENDERS_HOST=poseidon.ca.sanda.gov -# hostfull comes from env, and might be short or not. -if test -n $LDMS_GENDERS_HOST; then - hostfull=$LDMS_GENDERS_HOST -else - hostfull=$HOSTNAME -fi - -# LDMS_HOSTNAME is a hostname that doesn't contain the domain name -host="$( echo $hostfull | cut -d "." -f1 )" -LDMS_HOSTNAME=$host -LDMSCLUSTER=$host - -# In the absence of cluster genders one of LDMSD_IDBASE COMPONENT_ID -# must be set -# LDMSD_IDBASE is for cluster environments where nodes have numeric -# suffix in their names and no ldmsd_idbase gender is defined. -# LDMSD_IDBASE=1 -# COMPONENT_ID is for stand-alone data collector hosts. It must be >= 1. -COMPONENT_ID=1 - -# set 1 if RDMAV_FORK_SAFE=1 is needed by ldmsd network usage. -# or empty if not. -LDMS_RDMAV_FORK_SAFE=1 -export LDMS_RDMAV_FORK_SAFE - -# zap transport changes to defaults/environment if needed. -# export ZAP_LIBPATH=$libdir/ovis-lib/ -# export ZAP_EVENT_WORKERS=16 -# export ZAP_EVENT_QDEPTH=65536 -# -# Cray zap environment variables -# FIXME -- Note: if using ugni you need to set your configured cookie by defining the ZAP_UGNI_COOKIE environment variable below -# export ZAP_UGNI_UNBIND_TIMEOUT=2 -# export ZAP_UGNI_DISCONNECT_EV_TIMEOUT=4 -# export ZAP_UGNI_STATE_INTERVAL=10000000 -# export ZAP_UGNI_STATE_OFFSET=-100000 -# export ZAP_UGNI_PTAG=91 -# export ZAP_UGNI_COOKIE=0xc5900000 - - -# very odd values to specify, unless running multiple sampler daemons. -# LDMSD_USE_UNIX_SOCK -# LDMSD_USE_INET_SOCK -# LDMSD_LOCAL_SOCK= -# LDMSD_LOCAL_SOCK_DIR= -# LDMSCTL_SOCK_DIR= - -#STORE_PATH=/mprojects/ovis/ClusterData/$LDMSCLUSTER/ldms/v3/store_csv - -#LDMSAGGD_CONNECTION_RETRY_INTERVAL=10000000 - -AGG_NAME=$LDMSCLUSTER - -# number to start 'compid' of aggregators for use in file system -# name computations. Should be larger than highest real compid in cluster. -AGG_ID_BASE=1000 - -# chama has about 1300 node x 8 set x 4k/set (blockmin) or 52M. allow some room. -LDMSAGGD_MEM_RES=100M diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.twain.conf b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.twain.conf deleted file mode 100644 index df05fcc6e..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/ldmsd.twain.conf +++ /dev/null @@ -1,44 +0,0 @@ -# loaded from sysconfig/ldmsd -# This file is the location for redirecting to an alternate genders file -# and for setting other invariant environment bits not set via genders. - -# For multicluster aggregation, we need to compose the cluster -# admins genders with the aggregator host file specific to it that picks up -# store configuations. - -# LDMS_LOG_PATH defines where to send logs. if a path, it must be a -# directory existing on all nodes. -# If empty we use journal or syslog instead. To suppress entirely, set to NONE. -# This suppresses the daemon's logs, not the systemd messages. -# -# Example of a file for debugging without syslog access. -# LDMS_LOG_PATH=/var/log/ldms-clusters/$LDMSCLUSTER -LDMS_LOG_PATH=journal -USER=root -export USER - -#LDMS_GENDERS_HOST= - - -# set 1 if RDMAV_FORK_SAFE=1 is needed by ldmsd network usage. -# or empty if not. -LDMS_RDMAV_FORK_SAFE=1 - -# zap transport changes to defaults/environment if needed. -# export ZAP_LIBPATH=$libdir/ovis-lib/ -# export ZAP_EVENT_WORKERS=16 -# export ZAP_EVENT_QDEPTH=65536 -# Cray zap environment -# FIXME -- Note: if using ugni you need to set your configured cookie by defining the ZAP_UGNI_COOKIE environment variable below -# export ZAP_UGNI_UNBIND_TIMEOUT=2 -# export ZAP_UGNI_DISCONNECT_EV_TIMEOUT=4 -# export ZAP_UGNI_STATE_INTERVAL=10000000 -# export ZAP_UGNI_STATE_OFFSET=-100000 -# export ZAP_UGNI_PTAG=91 -# export ZAP_UGNI_COOKIE=0xc5900000 - - -# very odd values to specify, unless running multiple sampler daemons. -# LDMSD_LOCAL_SOCK= -# LDMSD_LOCAL_SOCK_DIR= -# LDMSCTL_SOCK_DIR= diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/Makefile.am b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/Makefile.am deleted file mode 100644 index 5f0590d7c..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ - -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf - -if ENABLE_TOSS_SYSTEMD - -dist_doc_DATA = \ -README \ -cray_gemini_r_sampler \ -cray_power_sampler \ -gen.aries_nic_mmr \ -gen.aries_rtr_mmr \ -gen.msr_interlagos \ -gen.vmstat \ -hfclock \ -lnet_stats \ -lustre2_client \ -meminfo \ -node_delta.sh \ -node_rate.sh \ -node_sum_vector.sh \ -power_sampler \ -procnetdev \ -procnfs \ -procstat \ -sysclassib \ -vmstat \ -init_jobinfo.sh \ -dstat \ -gw_sysclassib.cts1 \ -gw_sysclassib.tlcc2 \ -jobid \ -llnl_lustre_client \ -lustre2_client.cts1x \ -lustre2_client.srn \ -opa2 \ -procstat.36 \ -procstat.48 \ -procstat.72 \ -procstat.96 \ -procstat.nocores \ -store_csv \ -store_csv.opts \ -syspapi-events.json.E5-2695 \ -syspapi_sampler - - -endif - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/README b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/README deleted file mode 100644 index e41c86933..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/README +++ /dev/null @@ -1,28 +0,0 @@ -This directory contains ldms plugin-specific config file snippets and -config file snippet generators. - -By convention the static file snippets need only list -on a single line the plugin-specific options to be added to all -instances of the plugin started by ldmsd. Selection of -which plugins are started is managed by libgenders attributes -or environment variables. Where a plugin -supports multiple calls to configure, additional lines -in the text file should begin with - config name=PLUGIN -where PLUGIN is replaced with the specific name. - -By convention generated file snippets for samplers must contain -complete 'config' lines including (where needed) name, producer, -component_id, & instance. -The arguments supplied to the collector plugins are - plugin-name producer-name host sample-interval sample-offset -The generator must also write out the plugin start command. - -By convention generate file snippets for storage must contain -complete 'config' lines. -The arguments supplied to the store plugins are - plugin-name hostname schema-list -where schema-list is the list of schemas the store should -capture. -The generator must also write out the plugin start command. - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/cray_gemini_r_sampler b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/cray_gemini_r_sampler deleted file mode 100644 index d3521c3b5..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/cray_gemini_r_sampler +++ /dev/null @@ -1 +0,0 @@ -llite=snx11024 rtrfile=/etc/route_files/processed_interconnect.txt gpu_devices=Tesla_K20X hsn_metrics_type=2 diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/cray_power_sampler b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/cray_power_sampler deleted file mode 100644 index d3bd86360..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/cray_power_sampler +++ /dev/null @@ -1 +0,0 @@ -hfinterval=100000 hfcount=10 diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/dstat b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/dstat deleted file mode 100644 index 82443dfe2..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/dstat +++ /dev/null @@ -1 +0,0 @@ -job_set=${host}/jobid perm=0644 io=1 stat=1 statm=1 fdtypes=1 auto-schema=1 diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.aries_nic_mmr b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.aries_nic_mmr deleted file mode 100755 index 92ab5669f..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.aries_nic_mmr +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/bash -# arguments are plugin producer host sampleinterval sampleoffset -# environment variables exported to ldmsd will also be visible here. -echo config name=$1 producer=$2 instance=$2/$1 component_id=$COMPONENT_ID aries_rtr_id=$ARIES file=${MMR_CONF_PATH}/metric_set_nic schema=metric_set_nic -echo start name=$1 interval=$4 offset=$5 diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.aries_rtr_mmr b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.aries_rtr_mmr deleted file mode 100755 index ef58f81f9..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.aries_rtr_mmr +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/bash -# arguments are plugin producer host sampleinterval sampleoffset -# environment variables exported to ldmsd will also be visible here. -echo config name=$1 producer=$2 instance=$2/$1 component_id=$COMPONENT_ID aries_rtr_id=$ARIES file=${MMR_CONF_PATH}/metric_set_rtr_${NODENUM}_${ARIES_REDUNDANCY}_${NODETYPE} schema=metric_set_rtr_${NODENUM}_${ARIES_REDUNDANCY}_${NODETYPE} -echo start name=$1 interval=$4 offset=$5 diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.msr_interlagos b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.msr_interlagos deleted file mode 100755 index 80fd15832..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.msr_interlagos +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -generate () { - local PLUGIN=$1 - local PRODUCER=$2 - local HOSTNAME=$3 - local SAMPLE_INTERVAL=$4 - local SAMPLE_OFFSET=$5 - if [[ -z $MAXCORE ]]; then - echo config name=$PLUGIN action=initialize producer=${HOSTNAME} instance=${HOSTNAME}/$PLUGIN component_id=${COMPONENT_ID} conffile=${MSR_CONFIG_FILE} - else - echo config name=$PLUGIN action=initialize producer=${HOSTNAME} instance=${HOSTNAME}/$PLUGIN component_id=${COMPONENT_ID} corespernuma=8 maxcore=${MAXCORE} conffile=${MSR_CONFIG_FILE} - fi - # Uncore counters - echo config name=$PLUGIN action=add metricname=L3_CACHE_MISSES - echo config name=$PLUGIN action=add metricname=DCT_RD_TOT - echo config name=$PLUGIN action=add metricname=RW_DRAM_EXT - echo config name=$PLUGIN action=add metricname=RW_DRAM_INT - # Core counters - echo config name=$PLUGIN action=add metricname=TOT_CYC - echo config name=$PLUGIN action=add metricname=TOT_INS - echo config name=$PLUGIN action=add metricname=LS_DISP - echo config name=$PLUGIN action=add metricname=RETIRED_FLOPS - echo config name=$PLUGIN action=add metricname=VEC_INS - echo config name=$PLUGIN action=add metricname=TLB_DM - echo config name=$PLUGIN action=finalize - echo start name=$PLUGIN interval=$SAMPLE_INTERVAL offset=$SAMPLE_OFFSET -} -generate $* diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.vmstat b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.vmstat deleted file mode 100755 index 051076585..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gen.vmstat +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/bash -# This is an example of a trivial (vmstat) plugin that could be -# configure with a text file or no file at all. -# Arguments are plugin producer host sampleinterval sampleoffset -# environment variables exported to ldmsd will also be visible here. -echo config name=$1 producer=$2 instance=$2/$1 component_id=$COMPONENT_ID with_jobid=0 -echo start name=$1 interval=$4 offset=$5 diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gw_sysclassib.cts1 b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gw_sysclassib.cts1 deleted file mode 100644 index 6eff1d223..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gw_sysclassib.cts1 +++ /dev/null @@ -1,2 +0,0 @@ -job_set=${host}/jobid ports=hfi_0.1,mlx5_0.1 schema=gw_sysclassib perm=0644 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gw_sysclassib.tlcc2 b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gw_sysclassib.tlcc2 deleted file mode 100644 index 60ddf1005..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/gw_sysclassib.tlcc2 +++ /dev/null @@ -1,2 +0,0 @@ -job_set=${host}/jobid ports=qib0.1,mlx4_0.1 schema=gw_sysclassib perm=0644 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/hfclock b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/hfclock deleted file mode 100644 index 84c873590..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/hfclock +++ /dev/null @@ -1 +0,0 @@ -with_jobid=0 hfcount=1000 hfinterval=10000 diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/init_jobinfo.sh b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/init_jobinfo.sh deleted file mode 100644 index ed98d1670..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/init_jobinfo.sh +++ /dev/null @@ -1,26 +0,0 @@ -# This script fragment runs in the daemon's environment -# via inclusion at ldmsd startup, if it has been configured. -# -# Creates a 'no job' data file so jobid/jobinfo plugins can run -# quietly on any node, even where slurmd does not. -# -# Assume that job data file is named as indicated in -# job_stubfile. You may need to revise this for your site. -job_stubfile=$localstatedir/run/ldms.slurm.jobinfo -mkdir -p $localstatedir/run -if ! test -f $job_stubfile; then -cat << EOF > $job_stubfile -JOBID=0 -UID=0 -USER=nobody -JOB_USER=nobody -JOB_USER_ID=0 -JOB_ID=0 -JOB_APP_ID=0 -JOB_END=0 -JOB_EXIT=0 -JOB_NAME=none -JOB_START=0 -JOB_STATUS=0 -EOF -fi diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/jobid b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/jobid deleted file mode 100644 index 937ca7a66..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/jobid +++ /dev/null @@ -1,2 +0,0 @@ -file=/var/run/ldms.slurm.jobinfo perm=0644 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/llnl_lustre_client b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/llnl_lustre_client deleted file mode 100644 index 95a9ebd1d..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/llnl_lustre_client +++ /dev/null @@ -1,2 +0,0 @@ -job_set=${host}/jobid perm=0644 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lnet_stats b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lnet_stats deleted file mode 100644 index 95a9ebd1d..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lnet_stats +++ /dev/null @@ -1,2 +0,0 @@ -job_set=${host}/jobid perm=0644 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lustre2_client b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lustre2_client deleted file mode 100644 index bb6a3edb0..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lustre2_client +++ /dev/null @@ -1 +0,0 @@ -with_jobid=1 llite=fscratch,gscratch diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lustre2_client.cts1x b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lustre2_client.cts1x deleted file mode 100644 index c63bd1793..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lustre2_client.cts1x +++ /dev/null @@ -1 +0,0 @@ -job_set=${host}/jobid perm=0644 llite=scratch2,scratch3,cls02006 schema=lustre2_client_cts1x_234 diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lustre2_client.srn b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lustre2_client.srn deleted file mode 100644 index 5e67f3b92..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/lustre2_client.srn +++ /dev/null @@ -1,2 +0,0 @@ -job_set=${host}/jobid perm=0644 llite=nscratch,pscratch schema=lustre2_client_np -# schema set for just scratch2,3,4. never sure which is up diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/meminfo b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/meminfo deleted file mode 100644 index 95a9ebd1d..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/meminfo +++ /dev/null @@ -1,2 +0,0 @@ -job_set=${host}/jobid perm=0644 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/node_delta.sh b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/node_delta.sh deleted file mode 100755 index 90a8ca488..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/node_delta.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -echo "trnsfp_add name=meminfo-delta plugin=trnsf_delta mode=published input_schema=meminfo output_schema=meminfo-delta test=1" -echo "trnsfp_start name=meminfo-delta" -echo "trnsfp_add name=vmstat-delta plugin=trnsf_delta mode=published input_schema=vmstat output_schema=vmstat-delta test=1" -echo "trnsfp_start name=vmstat-delta" - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/node_rate.sh b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/node_rate.sh deleted file mode 100755 index 4ce267074..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/node_rate.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -echo "trnsfp_add name=meminfo-rate plugin=trnsf_rate mode=published input_schema=meminfo output_schema=meminfo-rate test=1" -echo "trnsfp_start name=meminfo-rate" -echo "trnsfp_add name=vmstat-rate plugin=trnsf_rate mode=published input_schema=vmstat output_schema=vmstat-rate test=1" -echo "trnsfp_start name=vmstat-rate" -echo "trnsfp_add name=msr_interlagos-rate plugin=trnsf_rate mode=published input_schema=msr_interlagos_delta_sum_vector metrics=Ctr4_c,Ctr5_c test=1" -echo "trnsfp_start name=msr_interlagos-rate" - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/node_sum_vector.sh b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/node_sum_vector.sh deleted file mode 100755 index 3daa2c0e4..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/node_sum_vector.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -echo "trnsfp_add name=msr_interlagos-sum_vector plugin=trnsf_sum_vector mode=published input_schema=msr_interlagos_delta test=1" -echo "trnsfp_start name=msr_interlagos-sum_vector" - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/opa2 b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/opa2 deleted file mode 100644 index 94d0ca58f..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/opa2 +++ /dev/null @@ -1,3 +0,0 @@ -job_set=${host}/jobid ports=hfi1_0.1 perm=0644 - - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/power_sampler b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/power_sampler deleted file mode 100644 index d3bd86360..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/power_sampler +++ /dev/null @@ -1 +0,0 @@ -hfinterval=100000 hfcount=10 diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procnetdev b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procnetdev deleted file mode 100644 index 9d8d3b2d1..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procnetdev +++ /dev/null @@ -1 +0,0 @@ -job_set=${host}/jobid ifaces=eth0,eth2,ib0,ib1 perm=0644 diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procnfs b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procnfs deleted file mode 100644 index 95a9ebd1d..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procnfs +++ /dev/null @@ -1,2 +0,0 @@ -job_set=${host}/jobid perm=0644 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat deleted file mode 100644 index 6733c7a6e..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat +++ /dev/null @@ -1 +0,0 @@ -with_jobid=0 maxcpu=8 diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.36 b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.36 deleted file mode 100644 index 781ccce33..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.36 +++ /dev/null @@ -1,2 +0,0 @@ -job_set=${host}/jobid schema=procstat_36 perm=0644 maxcpu=36 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.48 b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.48 deleted file mode 100644 index 7ab5dee5c..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.48 +++ /dev/null @@ -1,2 +0,0 @@ -job_set=${host}/jobid schema=procstat_48 perm=0644 maxcpu=48 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.72 b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.72 deleted file mode 100644 index 72002a518..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.72 +++ /dev/null @@ -1,2 +0,0 @@ -job_set=${host}/jobid schema=procstat_72 perm=0644 maxcpu=72 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.96 b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.96 deleted file mode 100644 index 07f5b6920..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.96 +++ /dev/null @@ -1,2 +0,0 @@ -job_set=${host}/jobid schema=procstat_96 perm=0644 maxcpu=96 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.nocores b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.nocores deleted file mode 100644 index 93e0b2bc3..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/procstat.nocores +++ /dev/null @@ -1,2 +0,0 @@ -job_set=${host}/jobid schema=procstat_nocores perm=0644 maxcpu=0 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/store_csv b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/store_csv deleted file mode 100644 index 42bef113d..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/store_csv +++ /dev/null @@ -1,2 +0,0 @@ -path=/localdisk/ldms altheader=1 rollover=0 rolltype=2 rename_template=%D/spool/%B typeheader=2 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/store_csv.opts b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/store_csv.opts deleted file mode 100644 index 91f7b4aed..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/store_csv.opts +++ /dev/null @@ -1,21 +0,0 @@ -# this file is for use with the store_csv plugin opt_file= option. - -# defaults for all schemas unless overridden for a specific container and schema -store_csv path=/localdisk/ldms \ - altheader=1 \ - rollover=0 \ - rolltype=2 \ - rename_template=%D/spool/%B \ - typeheader=2 - -# tailored setting for loadavg instance, just for example -container=loadavg_store \ - schema=loadavg \ - path=/localdisk/ldms \ - altheader=0 \ - create_gid=1000000039 \ - create_perm=640 \ - rename_template=%D/archive-spool/%{HOSTNAME}/%B \ - rename_perm=444 - - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/sysclassib b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/sysclassib deleted file mode 100644 index 95a9ebd1d..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/sysclassib +++ /dev/null @@ -1,2 +0,0 @@ -job_set=${host}/jobid perm=0644 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/syspapi-events.json.E5-2695 b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/syspapi-events.json.E5-2695 deleted file mode 100644 index 98d803a7c..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/syspapi-events.json.E5-2695 +++ /dev/null @@ -1,9 +0,0 @@ -{ - "schema": "syspapi-E5-2695", - "events": [ - "INST_RETIRED:ANY_P", - "CPU_CLK_THREAD_UNHALTED:THREAD_P", - "MEM_LOAD_UOPS_RETIRED:L1_MISS", - "MEM_LOAD_UOPS_RETIRED:L2_MISS" - ] -} diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/syspapi_sampler b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/syspapi_sampler deleted file mode 100644 index 21a3b7ac5..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/syspapi_sampler +++ /dev/null @@ -1,2 +0,0 @@ -cfg_file=/etc/sysconfig/ldms.d/plugins-conf/syspapi-events.json.E5-2695 perm=0644 - diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/trnsf_producer_add.sh b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/trnsf_producer_add.sh deleted file mode 100755 index eef11f421..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/trnsf_producer_add.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -generate () { - local PLUGIN=$1 - local PRODUCER=$2 - local HOSTNAME=$3 - local SAMPLE_INTERVAL=$4 - local SAMPLE_OFFSET=$5 - echo "prdcr_add name=${HOSTNAME} type=local" - echo "prdcr_start name=${HOSTNAME}" - - echo "updtr_add name=local_meminfo interval=$SAMPLE_INTERVAL offset=10000" - echo "updtr_prdcr_add name=local_meminfo regex=${HOSTNAME}" - echo "updtr_match_add name=local_meminfo regex=^meminfo$ match=schema" - echo "updtr_start name=local_meminfo" - - echo "updtr_add name=local_vmstat interval=$SAMPLE_INTERVAL offset=10000" - echo "updtr_prdcr_add name=local_vmstat regex=${HOSTNAME}" - echo "updtr_match_add name=local_vmstat regex=^vmstat$ match=schema" - echo "updtr_start name=local_vmstat" - - echo "updtr_add name=local_interlagos interval=$SAMPLE_INTERVAL offset=10000" - echo "updtr_prdcr_add name=local_interlagos regex=${HOSTNAME}" - echo "updtr_match_add name=local_interlagos regex=^msr_interlagos$ match=schema" - echo "updtr_start name=local_interlagos" - - echo "updtr_add name=local_cray interval=$SAMPLE_INTERVAL offset=10000" - echo "updtr_prdcr_add name=local_cray regex=${HOSTNAME}" - echo "updtr_match_add name=local_cray regex=^cray_gemini_r_sampler$ match=schema" - echo "updtr_start name=local_cray" -} -generate $* diff --git a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/vmstat b/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/vmstat deleted file mode 100644 index 95a9ebd1d..000000000 --- a/util/sample_init_scripts/genders/systemd/etc/sysconfig/ldms.d/plugins-conf/vmstat +++ /dev/null @@ -1,2 +0,0 @@ -job_set=${host}/jobid perm=0644 - diff --git a/util/sample_init_scripts/genders/systemd/ldms-manpatch.sh b/util/sample_init_scripts/genders/systemd/ldms-manpatch.sh deleted file mode 100755 index 358492a99..000000000 --- a/util/sample_init_scripts/genders/systemd/ldms-manpatch.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# This script takes the first argument (full path man page alias) and tries -# to apply the rest of the arguments as sed to it. -# If the file is not found, $file.gz is checked and if present modified -# instead. -# This is handy to update sysconfdir, localstatedir, and prefix(/usr) -# in man pages. -src=$1 -shift -case $src in -*.gz) - if test -f ${src}; then - out=`mktemp .XXXXXX` - zcat $src | sed $* > $out && gzip $out && cp $out.gz $src && rm -f $out $out.gz - exit 0 - fi - ;; -*) - if test -f $src; then - sed -i $* $src - exit $? - fi - if test -f ${src}.gz; then - out=`mktemp .XXXXXX` - zcat $src.gz | sed $* > $out && gzip $out && cp $out.gz $src.gz && rm -f $out $out.gz - exit $? - fi - ;; -esac -echo "cannot patch $src: missing file or unexpected format" -exit 1 diff --git a/util/sample_init_scripts/genders/systemd/ldmsd-pre-systemd.in b/util/sample_init_scripts/genders/systemd/ldmsd-pre-systemd.in deleted file mode 100755 index 9a1f55ebe..000000000 --- a/util/sample_init_scripts/genders/systemd/ldmsd-pre-systemd.in +++ /dev/null @@ -1,73 +0,0 @@ -#! /bin/bash -# -# Generate systemd environment file for ldmsd. -# loaded from systemd ldmsd.service. -# Note that the same physical node can have multiple collection schemes, -# such as chama.few chama.many chama.highfrequency. -# Note that the same physical cluster can have multiple store schemes, -# such as chama.store chama.web chama.splunk. -# -# Systemd supplied arguments %I /envfilepath -# -# First argument is the cluster/configuration name (no slashes) or local -# Second argument is the output file name. -# -# Defines Paths to executables and libs and boot functions for samplers. -# This is where the configuration is extracted from genders information. -# Create an alternate genders file and name it in ldmsd.%I.conf for -# exception data, if any, needed. -# -# Correct PATH and LD_LIBRARY_PATH must be preset for this to work. -# Paths to invariants are not handled by genders. -# -# Inputs: -# When run on ldmsd@.service instance %I the following shell script is read: -# $sysconfdir/sysconfig/ldms.d/ldmsd -# See the README in ldms.d for additional details. -# -# Functions defined in $sysconfdir/sysconfig/ldms.d/ldms-functions are -# preloaded. -# -# -# Environment -# Variables exported by ldms.d/ldmsd and its descendants are -# exported to the daemon's environment. -# -# VERBOSE=-v -LDMSCLUSTER=$1 -OUTNAME=$2 -echo $0 $1 $2 -sysconfdir=@sysconfdir@ - -if test -z "$LDMSCLUSTER"; then - echo "$0: ldmsd instance not defined" - logger -p syslog.error -s "$0: ldmsd instance not defined" - exit 1 -fi - -# Note: ldmsd checks for the definition of FUNCTIONS to ensure it's been called correctly -FUNCTIONS=$sysconfdir/sysconfig/ldms.d/ldms-functions -if test -f $FUNCTIONS; then - . $FUNCTIONS -else - logger -p syslog.error -s "$0: cannot find $FUNCTIONS" - exit 1 -fi - -save_env_init $1 -export LDMSCLUSTER -NODEFILE=$sysconfdir/sysconfig/ldms.d/ldmsd -# load ldms-aggd localizations source (which will include ldmsd localizations) -if test -f $NODEFILE; then - . $NODEFILE -else - logger -p syslog.error -s "$0: cannot find $NODEFILE" - exit 1 -fi - -# double check logging not misconfigured -check_log_option - -echo "# generated by $0 `date`" > $OUTNAME -save_env_finish $1 $OUTNAME -#LDMS_POST_INSTALLED=0 do not change this line diff --git a/util/sample_init_scripts/genders/systemd/ldmsd-wrapper.sh.in b/util/sample_init_scripts/genders/systemd/ldmsd-wrapper.sh.in deleted file mode 100755 index 1cad53b07..000000000 --- a/util/sample_init_scripts/genders/systemd/ldmsd-wrapper.sh.in +++ /dev/null @@ -1,14 +0,0 @@ -#! /bin/bash -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -sbindir=@sbindir@ -localstatedir=@localstatedir@ - -export LD_LIBRARY_PATH=$libdir:/usr/lib:$LD_LIBRARY_PATH -mkdir -p $localstatedir/run/ldmsd/tmp -target=$1 -shift -echo "$VGBIN $VGOPT $NUMACTL $NUMAOPT $sbindir/ldmsd $*" > $localstatedir/run/ldmsd/ldmsd.start.$target -$VGBIN $VGOPT $NUMACTL $NUMAOPT $sbindir/ldmsd $* -#LDMS_POST_INSTALLED=0 do not change this line diff --git a/util/sample_init_scripts/genders/systemd/services/.gitignore b/util/sample_init_scripts/genders/systemd/services/.gitignore deleted file mode 100644 index 4cc338813..000000000 --- a/util/sample_init_scripts/genders/systemd/services/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/ldmsd.service -/ldmsd@.service diff --git a/util/sample_init_scripts/genders/systemd/services/Makefile.am b/util/sample_init_scripts/genders/systemd/services/Makefile.am deleted file mode 100644 index e3a841b0b..000000000 --- a/util/sample_init_scripts/genders/systemd/services/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ - -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts/genders/systemd/services - -doc_DATA=ldmsd.service ldmsd@.service README.ldmsd - -EXTRA_DIST = ldmsd.service.in ldmsd@.service.in - -do_subst = @LDMS_SUBST_RULE@ - -ldmsd.service: ldmsd.service.in - $(do_subst) < $< > $@ - -ldmsd@.service: ldmsd@.service.in - $(do_subst) < $< > $@ - -if ENABLE_TOSS_SYSTEMD -dist_doc_DATA = README.ldmsd -endif - diff --git a/util/sample_init_scripts/genders/systemd/services/README.ldmsd b/util/sample_init_scripts/genders/systemd/services/README.ldmsd deleted file mode 100644 index f1c104042..000000000 --- a/util/sample_init_scripts/genders/systemd/services/README.ldmsd +++ /dev/null @@ -1,14 +0,0 @@ -These files get dropped in -/usr/lib/systemd/system (on rhel7/centos7/fedora) -/lib/systemd/system (on ubuntu 16/debian) - -And those modified for off-root installations should be dropped in -/etc/systemd/system - -These files are converted to sysvinit automatically with -https://github.com/akhilvij/systemd-to-sysvinit-converter -which we do not redistribute. - -A converted template is provided. To make a new sysvinit service for serving a remote -machine X, run the template through sed like so: -cat ldmsd.template | sed -e 's/hermes/your_remote_host/g' > /etc/init.d/ldms.your_remote_host diff --git a/util/sample_init_scripts/genders/systemd/services/ldmsd.service.in b/util/sample_init_scripts/genders/systemd/services/ldmsd.service.in deleted file mode 100644 index c9f4f6823..000000000 --- a/util/sample_init_scripts/genders/systemd/services/ldmsd.service.in +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) 2017, Sandia National Laboratories All rights reserved. -# -# 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; version 2 of the License. -# -# 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 -# -# systemd service file for LDMS forking server -# - -[Unit] -Description=LDMS service -After=network.target -After=syslog.target - -[Install] -WantedBy=multi-user.target - -[Service] -# In most installations, ldms must run as root to sample protected resource counters. -#User=ldms -#Group=ldms - -Type=forking - -PIDFile=@localstatedir@/run/ldmsd/ldmsd-local.pid -StandardOutput=journal -StandardError=journal -SyslogIdentifier=ldmsd - -# Disable service start and stop timeout logic of systemd for ldmsd service. -TimeoutSec=0 - -# Execute pre and post scripts as root -PermissionsStartOnly=true - -# This script is the same as ldmsd@.service (except that LDMSCLUSTER is hardwired to 'local') - -# Needed to create env file -ExecStartPre = /usr/bin/test -x @bindir@/ldmsd-pre-systemd -ExecStartPre = /bin/mkdir -p @localstatedir@/run/ldmsd -ExecStartPre = /bin/rm -f @localstatedir@/run/ldmsd/ldmsd.env.local -ExecStartPre = @bindir@/ldmsd-pre-systemd local @localstatedir@/run/ldmsd/ldmsd.env.local -ExecStartPre = /usr/bin/test @localstatedir@/run/ldmsd/ldmsd.env.local -nt @bindir@/ldmsd-pre-systemd - -EnvironmentFile = -@localstatedir@/run/ldmsd/ldmsd.env.local - -# Start main service -# This is all one line so it is easily converted to sysvinit, not so -# it is easy to read. -ExecStart= /bin/bash -c '/bin/rm -f $LDMSD_SOCKPATH ; @bindir@/ldmsd-wrapper.sh local $LDMSD_GLOBAL_OPTS $MEM_OPT $LDMSAGGD_MEM_RES -c $LDMSD_PLUGIN_CONFIG_FILE -a $LDMS_AUTH_TYPE $LDMS_AUTH_ARGS -r @localstatedir@/run/ldmsd/ldmsd-local.pid -x $LDMSD_XPRT:$LDMSD_PORT -P $LDMSD_EVENT_THDS $LDMSD_INET_OPT $LDMSD_CONFIG_PORT $LDMSD_SOCK_OPT $LDMSD_SOCKPATH -v $LDMSD_DBG $LDMS_LOG_OPT $LDMS_LOG_FILE 2>&1' - -# Sets open_files_limit -LimitNOFILE = 65536 -# Set RAM limit on daemon instance cgrpup -#LimitRSS = infinity -# delay between sigterm and sigkill during stop. -TimeoutStopSec=60 - -#Restart=on-failure -Restart=no - -RestartPreventExitStatus=1 -# We don't use /tmp. If test-installing to /tmp subdir, privatetmp breaks startup. -PrivateTmp=0 -#LDMS_POST_INSTALLED=0 do not change this line diff --git a/util/sample_init_scripts/genders/systemd/services/ldmsd@.service.in b/util/sample_init_scripts/genders/systemd/services/ldmsd@.service.in deleted file mode 100644 index cf0f330e6..000000000 --- a/util/sample_init_scripts/genders/systemd/services/ldmsd@.service.in +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) 2017, Sandia National Laboratories All rights reserved. -# -# 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; version 2 of the License. -# -# 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 -# -# systemd service file for LDMS forking server -# - -[Unit] -Description=LDMS service for multiple configurations -After=network.target -After=syslog.target - -[Install] -WantedBy=multi-user.target - -[Service] -# In most installations, ldms must run as root to sample protected resource counters. -#User=ldms -#Group=ldms - -Type=forking - -PIDFile=@localstatedir@/run/ldmsd/ldmsd-%I.pid -StandardOutput=journal -StandardError=journal -SyslogIdentifier=ldmsd@%i - -# Disable service start and stop timeout logic of systemd for ldmsd service. -TimeoutSec=0 - -# Execute pre and post scripts as root -PermissionsStartOnly=true - -# This script is the same as ldmsd.service (except that LDMSCLUSTER is %I) - -# Needed to create env file -ExecStartPre = /usr/bin/test -x @bindir@/ldmsd-pre-systemd -ExecStartPre = /bin/mkdir -p @localstatedir@/run/ldmsd -ExecStartPre = /bin/rm -f @localstatedir@/run/ldmsd/ldmsd.env.%I -ExecStartPre = @bindir@/ldmsd-pre-systemd %I @localstatedir@/run/ldmsd/ldmsd.env.%I -ExecStartPre = /usr/bin/test @localstatedir@/run/ldmsd/ldmsd.env.%I -nt @bindir@/ldmsd-pre-systemd - -EnvironmentFile = -@localstatedir@/run/ldmsd/ldmsd.env.%I - -# Start main service -# This is all one line so it is easily converted to sysvinit, not so -# it is easy to read. -ExecStart= /bin/bash -c '/bin/rm -f $LDMSD_SOCKPATH ; @bindir@/ldmsd-wrapper.sh %I $LDMSD_GLOBAL_OPTS $MEM_OPT $LDMSAGGD_MEM_RES -c $LDMSD_PLUGIN_CONFIG_FILE -a $LDMS_AUTH_TYPE $LDMS_AUTH_ARGS -r @localstatedir@/run/ldmsd/ldmsd-%I.pid -x $LDMSD_XPRT:$LDMSD_PORT -P $LDMSD_EVENT_THDS $LDMSD_INET_OPT $LDMSD_CONFIG_PORT $LDMSD_SOCK_OPT $LDMSD_SOCKPATH -v $LDMSD_DBG $LDMS_LOG_OPT $LDMS_LOG_FILE 2>&1' - -# Sets open_files_limit -LimitNOFILE = 65536 -# Set RAM limit on daemon instance cgrpup -#LimitRSS = infinity -# delay between sigterm and sigkill during stop. -TimeoutStopSec=60 - -#Restart=on-failure -Restart=no - -RestartPreventExitStatus=1 -# We don't use /tmp. If test-installing to /tmp subdir, privatetmp breaks startup. -PrivateTmp=0 -#LDMS_POST_INSTALLED=0 do not change this line diff --git a/util/sample_init_scripts/genders/sysv/.gitignore b/util/sample_init_scripts/genders/sysv/.gitignore deleted file mode 100644 index 458f93e2d..000000000 --- a/util/sample_init_scripts/genders/sysv/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/ldmsd-pre-sysvinit diff --git a/util/sample_init_scripts/genders/sysv/Makefile.am b/util/sample_init_scripts/genders/sysv/Makefile.am deleted file mode 100644 index 1a1ce88d5..000000000 --- a/util/sample_init_scripts/genders/sysv/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -EXTRA_DIST = ldmsd-pre-sysvinit.in -DISTCLEANFILES = ldmsd-pre-sysvinit -if ENABLE_TOSS_SYSTEMD -SUBDIRS = etc -bin_SCRIPTS= ldmsd-pre-sysvinit -endif - diff --git a/util/sample_init_scripts/genders/sysv/etc/Makefile.am b/util/sample_init_scripts/genders/sysv/etc/Makefile.am deleted file mode 100644 index 64a2758e2..000000000 --- a/util/sample_init_scripts/genders/sysv/etc/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ - -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts/genders/sysv/etc - -if ENABLE_TOSS_SYSTEMD - -SUBDIRS = init.d - -install-data-hook: - $(MKDIR_P) $(DESTDIR)$(docdir) - (cd $(DESTDIR)$(docdir); \ - if ! test -L ./sysconfig; then \ - if test -d ./sysconfig; then \ - back=`mktemp -u ./sysconfig.bak.XXX`; \ - mv ./sysconfig $$back; \ - fi; \ - ln -s ../../systemd/etc/sysconfig . ;\ - fi; \ - ) -endif diff --git a/util/sample_init_scripts/genders/sysv/etc/init.d/.gitignore b/util/sample_init_scripts/genders/sysv/etc/init.d/.gitignore deleted file mode 100644 index efb08e393..000000000 --- a/util/sample_init_scripts/genders/sysv/etc/init.d/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/ldmsd -/ldmsd.template diff --git a/util/sample_init_scripts/genders/sysv/etc/init.d/Makefile.am b/util/sample_init_scripts/genders/sysv/etc/init.d/Makefile.am deleted file mode 100644 index 6e1ec6ec7..000000000 --- a/util/sample_init_scripts/genders/sysv/etc/init.d/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ - -docdir = $(datadir)/doc/@PACKAGE@/sample_init_scripts/genders/sysv/etc/init.d -EXTRA_DIST = ldmsd.in ldmsd.template.in -DISTCLEANFILES = ldmsd ldmsd.template - -if ENABLE_TOSS_SYSTEMD -dist_doc_DATA = \ - README \ - ldmsd \ - ldmsd.template -endif - diff --git a/util/sample_init_scripts/genders/sysv/etc/init.d/README b/util/sample_init_scripts/genders/sysv/etc/init.d/README deleted file mode 100644 index 6fc099ca8..000000000 --- a/util/sample_init_scripts/genders/sysv/etc/init.d/README +++ /dev/null @@ -1,11 +0,0 @@ -The file ldmsd.template is provided for running multiple ldmsd instances -under sysvinit. To make a new service -for serving a remote machine X, run the template through -sed like so: -cat ldmsd.template | sed -e 's/hermes/X/g' > /etc/init.d/ldmsd.X - -Then you can use -service ldmsd.X start -service ldmsd.X stop -to manage the daemon. - diff --git a/util/sample_init_scripts/genders/sysv/etc/init.d/ldmsd.in b/util/sample_init_scripts/genders/sysv/etc/init.d/ldmsd.in deleted file mode 100755 index 4b37dad47..000000000 --- a/util/sample_init_scripts/genders/sysv/etc/init.d/ldmsd.in +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash -### BEGIN INIT INFO -# Provides: ldmsd -# Required-Start: $syslog $local_fs $network -# Required-Stop: $syslog $local_fs $network -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: LDMS service -### END INIT INFO - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -bindir=@bindir@ -sbindir=@sbindir@ -localstatedir=@localstatedir@ - -dist=`lsb_release -i -s` -rel=`lsb_release -r -s` -case ${dist},$rel in -Ubuntu,1*) - LDM=log_daemon_msg - LEM=log_end_msg - ;; -debian,*) - LDM=log_daemon_msg - LEM=log_end_msg - ;; -Red*) - LDM=log_success_msg - LEM=log_failure_msg - ;; -Cent*) - LDM=log_success_msg - LEM=log_failure_msg - ;; -*) - LDM=log_success_msg - LEM=log_failure_msg - ;; -esac - - -. /lib/lsb/init-functions -prog=ldmsd - -PIDFILE=$localstatedir/run/ldmsd/ldmsd-local.pid -DESC="LDMSD service for local in sysvinit" -start() { - $LDM "Starting $DESC" "$prog" - /usr/bin/test -x $bindir/ldmsd-pre-sysvinit - if [ $? -ne 0 ]; then - $LEM 1 failed to find $bindir/ldmsd-pre-sysvinit - exit 1 - fi - /bin/mkdir -p $localstatedir/run/ldmsd - if [ $? -ne 0 ]; then - $LEM 1 failed /bin/mkdir -p $localstatedir/run/ldmsd - exit 1 - fi - /bin/rm -f $localstatedir/run/ldmsd/ldmsd.env.local 2>/dev/null - if [ $? -ne 0 ]; then - $LEM 1 failed /bin/rm -f $localstatedir/run/ldmsd/ldmsd.env.local - exit 1 - fi - $bindir/ldmsd-pre-sysvinit local $localstatedir/run/ldmsd/ldmsd.env.local - if [ $? -ne 0 ]; then - $LEM 1 failed to run $bindir/ldmsd-pre-sysvinit local $localstatedir/run/ldmsd/ldmsd.env.local - exit 1 - fi - /usr/bin/test $localstatedir/run/ldmsd/ldmsd.env.local -nt $bindir/ldmsd-pre-sysvinit - if [ $? -ne 0 ]; then - $LEM 1 failed to generate $localstatedir/run/ldmsd/ldmsd.env.local - exit 1 - fi - . $localstatedir/run/ldmsd/ldmsd.env.local - # $LEM 1 LDP = $LD_LIBRARY_PATH - start_daemon -p $PIDFILE /bin/bash -c '/bin/rm -f $LDMSD_SOCKPATH 2>/dev/null;$bindir/ldmsd-wrapper.sh local $LDMSD_GLOBAL_OPTS $MEM_OPT $LDMSAGGD_MEM_RES -c $LDMSD_PLUGIN_CONFIG_FILE -a $LDMS_AUTH_FILE -r $localstatedir/run/ldmsd/ldmsd-local.pid -x $LDMSD_XPRT:$LDMSD_PORT -P $LDMSD_EVENT_THDS $LDMSD_INET_OPT $LDMSD_CONFIG_PORT $LDMSD_SOCK_OPT $LDMSD_SOCKPATH -v $LDMSD_DBG $LDMS_LOG_OPT $LDMS_LOG_FILE 2>&1' - if [ $? -ne 0 ]; then - $LEM 1 failed to launch ldmsd - exit 1 - fi - if [ $? -eq 0 ]; then - $LDM 0 success - fi - exit 0 -} - -stop() { - $LDM "Stopping $DESC" "$prog" - killproc -p $PIDFILE $sbindir/ldmsd - if [ $? -ne 0 ]; then - $LEM 1 error seen while stopping pid in $PIDFILE - exit 1 - fi - if [ $? -eq 0 ]; then - $LDM 0 success - fi -} - -force_reload() { - stop - start - -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - force-reload) - force_reload - ;; - restart) - stop - start - ;; - - *) - echo "$Usage: $prog {start|stop|force-reload|restart}" - exit 2 -esac -#LDMS_POST_INSTALLED=0 do not change this line diff --git a/util/sample_init_scripts/genders/sysv/etc/init.d/ldmsd.template.in b/util/sample_init_scripts/genders/sysv/etc/init.d/ldmsd.template.in deleted file mode 100755 index 816c1bef9..000000000 --- a/util/sample_init_scripts/genders/sysv/etc/init.d/ldmsd.template.in +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash -### BEGIN INIT INFO -# Provides: ldmsd@hermes -# Required-Start: $syslog $local_fs $network -# Required-Stop: $syslog $local_fs $network -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: LDMS service for multiple configurations -### END INIT INFO - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -bindir=@bindir@ -sbindir=@sbindir@ -localstatedir=@localstatedir@ - -dist=`lsb_release -i -s` -rel=`lsb_release -r -s` -case ${dist},$rel in -Ubuntu,1*) - LDM=log_daemon_msg - LEM=log_end_msg - ;; -debian,*) - LDM=log_daemon_msg - LEM=log_end_msg - ;; -Red*) - LDM=log_success_msg - LEM=log_failure_msg - ;; -Cent*) - LDM=log_success_msg - LEM=log_failure_msg - ;; -*) - LDM=log_success_msg - LEM=log_failure_msg - ;; -esac - - -. /lib/lsb/init-functions -prog=ldmsd@hermes - -PIDFILE=$localstatedir/run/ldmsd/ldmsd-hermes.pid -DESC="LDMSD service for hermes in sysvinit" -start() { - $LDM "Starting $DESC" "$prog" - /usr/bin/test -x $bindir/ldmsd-pre-sysvinit - if [ $? -ne 0 ]; then - $LEM 1 failed to find $bindir/ldmsd-pre-sysvinit - exit 1 - fi - /bin/mkdir -p $localstatedir/run/ldmsd - if [ $? -ne 0 ]; then - $LEM 1 failed /bin/mkdir -p $localstatedir/run/ldmsd - exit 1 - fi - /bin/rm -f $localstatedir/run/ldmsd/ldmsd.env.hermes 2>/dev/null - if [ $? -ne 0 ]; then - $LEM 1 failed /bin/rm -f $localstatedir/run/ldmsd/ldmsd.env.hermes - exit 1 - fi - $bindir/ldmsd-pre-sysvinit hermes $localstatedir/run/ldmsd/ldmsd.env.hermes - if [ $? -ne 0 ]; then - $LEM 1 failed to run $bindir/ldmsd-pre-sysvinit hermes $localstatedir/run/ldmsd/ldmsd.env.hermes - exit 1 - fi - /usr/bin/test $localstatedir/run/ldmsd/ldmsd.env.hermes -nt $bindir/ldmsd-pre-sysvinit - if [ $? -ne 0 ]; then - $LEM 1 failed to generate $localstatedir/run/ldmsd/ldmsd.env.hermes - exit 1 - fi - . $localstatedir/run/ldmsd/ldmsd.env.hermes - # $LEM 1 LDP = $LD_LIBRARY_PATH - start_daemon -p $PIDFILE /bin/bash -c '/bin/rm -f $LDMSD_SOCKPATH 2>/dev/null;$bindir/ldmsd-wrapper.sh hermes $LDMSD_GLOBAL_OPTS $MEM_OPT $LDMSAGGD_MEM_RES -c $LDMSD_PLUGIN_CONFIG_FILE -a $LDMS_AUTH_FILE -r $localstatedir/run/ldmsd/ldmsd-hermes.pid -x $LDMSD_XPRT:$LDMSD_PORT -P $LDMSD_EVENT_THDS $LDMSD_INET_OPT $LDMSD_CONFIG_PORT $LDMSD_SOCK_OPT $LDMSD_SOCKPATH -v $LDMSD_DBG $LDMS_LOG_OPT $LDMS_LOG_FILE 2>&1' - if [ $? -ne 0 ]; then - $LEM 1 failed to launch ldmsd - exit 1 - fi - if [ $? -eq 0 ]; then - $LDM 0 success - fi - exit 0 -} - -stop() { - $LDM "Stopping $DESC" "$prog" - killproc -p $PIDFILE $sbindir/ldmsd - if [ $? -ne 0 ]; then - $LEM 1 error seen while stopping pid in $PIDFILE - exit 1 - fi - if [ $? -eq 0 ]; then - $LDM 0 success - fi -} - -force_reload() { - stop - start - -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - force-reload) - force_reload - ;; - restart) - stop - start - ;; - - *) - echo "$Usage: $prog {start|stop|force-reload|restart}" - exit 2 -esac -#LDMS_POST_INSTALLED=0 do not change this line diff --git a/util/sample_init_scripts/genders/sysv/etc/sysconfig b/util/sample_init_scripts/genders/sysv/etc/sysconfig deleted file mode 120000 index 469e817a9..000000000 --- a/util/sample_init_scripts/genders/sysv/etc/sysconfig +++ /dev/null @@ -1 +0,0 @@ -../../systemd/etc/sysconfig \ No newline at end of file diff --git a/util/sample_init_scripts/genders/sysv/ldmsd-pre-sysvinit.in b/util/sample_init_scripts/genders/sysv/ldmsd-pre-sysvinit.in deleted file mode 100755 index 191ceea46..000000000 --- a/util/sample_init_scripts/genders/sysv/ldmsd-pre-sysvinit.in +++ /dev/null @@ -1,75 +0,0 @@ -#! /bin/bash -# -# Generate sysv environment file for ldmsd. -# loaded from /etc/init.d/ldmsd -# Note that the same physical node can have multiple collection schemes, -# such as chama.few chama.many chama.highfrequency. -# Note that the same physical cluster can have multiple store schemes, -# such as chama.store chama.web chama.splunk. -# -# User supplied arguments daemon-instance-name /envfilepath -# -# First argument is the cluster/configuration name (no slashes) or local -# Second argument is the output file name. -# -# Defines Paths to executables and libs and boot functions for samplers. -# This is where the configuration is extracted from genders information. -# Create an alternate genders file and name it in ldmsd.%I.conf for -# exception data, if any, needed. -# -# Correct PATH and LD_LIBRARY_PATH must be preset for this to work. -# Paths to invariants are not handled by genders. -# -# Inputs: -# When run on ldmsd.X instance the following shell script is read: -# /etc/sysconfig/ldms.d/ldmsd -# See the README in ldms.d for additional details. -# -# Functions defined in /etc/sysconfig/ldms.d/ldms-functions are -# preloaded. -# -# -# Environment -# Variables exported by ldms.d/ldmsd and its descendants are -# exported to the daemon's environment. -# -# VERBOSE=-v -LDMSCLUSTER=$1 -OUTNAME=$2 -#echo $0 $1 $2 -sysconfdir=@sysconfdir@ - -if test -z "$LDMSCLUSTER"; then - echo "$0: ldmsd instance not defined" - logger -p syslog.error -s "$0: ldmsd instance not defined" - exit 1 -fi - -# Note: ldmsd checks for the definition of FUNCTIONS to ensure it's been called correctly -FUNCTIONS=$sysconfdir/sysconfig/ldms.d/ldms-functions -if test -f $FUNCTIONS; then - . $FUNCTIONS -else - logger -p syslog.error -s "$0: cannot find $FUNCTIONS" - exit 1 -fi - -save_env_init $1 -export LDMSCLUSTER -NODEFILE=$sysconfdir/sysconfig/ldms.d/ldmsd - -if test -f $NODEFILE; then - . $NODEFILE -else - logger -p syslog.error -s "$0: cannot find $NODEFILE" - exit 1 -fi - -# load ldms-aggd localizations source (which will include ldmsd localizations) -. $NODEFILE -# double check logging not misconfigured -check_log_option - -echo "# generated by $0 `date`" > $OUTNAME -save_env_finish_sysvinit $1 $OUTNAME -#LDMS_POST_INSTALLED=0 do not change this line diff --git a/util/sample_init_scripts/genders/test/genders.aries b/util/sample_init_scripts/genders/test/genders.aries deleted file mode 100755 index cfd65b3e0..000000000 --- a/util/sample_init_scripts/genders/test/genders.aries +++ /dev/null @@ -1,30 +0,0 @@ -# watch yourself -# monitoring data collectors are ldmsd -# run a data collector -aries ldmsd -# collector transport is: -aries ldmsd_port=411,ldmsd_xprt=sock,ldmsd_host=aries -# data sets to collect are: -aries ldmsd_metric_sets=meminfo:procnetdev:procstat -# extra parameters for sets are -aries ldmsd_procnetdev=ifaces/eth0 -# where will aggregate our data -aries ldmsd_clientof=aries -# debug the setup -aries ldmsd_dbg=DEBUG - -# AGGREGATOR 1ST LEVEL -# port 411 cannot be used for both ldms_aggd and ldmsd if xprt/host combination is the same. -# CLIENTOFLIST is expanded to match ldmsd_clientof=aries. See man page for alternatives. -aries ldmsaggd=CLIENTOFLIST -# sampling schedule -aries ldmsaggd_interval_default=2000000,ldmsaggd_offset_default=100000 -# transport for aggregated data: -aries ldmsaggd_port=412,ldmsaggd_xprt=sock,ldmsaggd_host=aries -# debug the setup -aries ldmsaggd_dbg=DEBUG - -# LOCAL STORE -aries ldmsaggd_stores=store_csv -aries ldmsaggd_store_csv=altheader/1:id_pos/1:rolltype/2:rollover/0 - diff --git a/util/sample_init_scripts/genders/test/genders.ldms b/util/sample_init_scripts/genders/test/genders.ldms deleted file mode 100755 index 1f389fe9c..000000000 --- a/util/sample_init_scripts/genders/test/genders.ldms +++ /dev/null @@ -1,56 +0,0 @@ -# this is maihly for testing ldmsctl_args, as no such cluster exists. -# define test agg hierarchy like so, then find sets. -# # suffix (d) indicates collector on node that also hosts aggregator. -# (-sock-)|(-----------rdma/ib-------) -# top <- a2 <-----+ c2n3,pqv -# | \a2(d)pqv | -# | + c2n4,pqv -# | + a1(d)pqv -# | + a1 <---+ c1n1,pqv -# | + c1n2,pqv -# | -# +- b2(d)tu -# +- b2 <-+ b1(d)rs -# + b1 <--+ c3n5,rs -# + c3n6,rs -# -## DEFINE local collector transport/port/host -c1n[1-2],c2n[3-4],c3n[5-6],a1,b1 ldmsd,ldmsd_host=%n-ib0,ldmsd_port=411,ldmsd_xprt=rdma -a2,b2 ldmsd,ldmsd_host=%n-eth0,ldmsd_port=411,ldmsd_xprt=sock -# DEFINE metric sets -c1n[1-2],c2n[3-4],a[1-2] ldmsd_metric_sets=p:q:v -c3n[5-6],b1 ldmsd_metric_sets=r:s -b2 ldmsd_metric_sets=t:u -# exclude set v from leaf nodes, but not from a2. -a[1-2],b[1-2] ldmsaggd_exclude_sets=v -# DEFINE aggregator port/host (HSN) -a1,b1 ldmsaggd_host=%n-ib1,ldmsaggd_port=412,ldmsaggd_xprt=rdma -# DEFINE aggregator ports/hosts (ext'l net) -a2,b2 ldmsaggd_host=%n-eth0,ldmsaggd_port=412,ldmsaggd_xprt=sock -## DEFINE COLLECTOR-AGG RELATIONS -# pq on leaf -c1n[1-2] ldmsd_clientof=a1 -c2n[3-4] ldmsd_clientof=a2 -# pq on dual agg/leaf a1(d) -a1 ldmsd_clientof=a2 -# rs on leaf -c3n[5-6] ldmsd_clientof=b1 -# rs on dual agg/leaf b1(d) -b1 ldmsd_clientof=b2 -# tu on dual agg/leaf b2(d) -b2 ldmsd_clientof=top -# pq on dual agg/leaf a2(d) -a2 ldmsd_clientof=top -## DEFINE AGG-AGG RELATIONS -a1 ldmsaggd_clientof=a2 -b1 ldmsaggd_clientof=b2 -a2 ldmsaggd_clientof=top -b2 ldmsaggd_clientof=top -# Any explicit names in ldmsaggd are checked for collectors only, -# which may not be expected by someone configure higher level aggregators -# assemble aggd lists via (AGG)CLIENTOFLIST -a1 ldmsaggd=CLIENTOFLIST -b1 ldmsaggd=CLIENTOFLIST -a2 ldmsaggd=CLIENTOFLIST:AGGCLIENTOFLIST -b2 ldmsaggd=CLIENTOFLIST:AGGCLIENTOFLIST -top ldmsaggd=CLIENTOFLIST:AGGCLIENTOFLIST diff --git a/util/sample_init_scripts/genders/test/genders.ldms.chama b/util/sample_init_scripts/genders/test/genders.ldms.chama deleted file mode 100644 index 1c291a09a..000000000 --- a/util/sample_init_scripts/genders/test/genders.ldms.chama +++ /dev/null @@ -1,78 +0,0 @@ -# ldms genders by node selfreported hostname needed for init.d control - -# switch these to INFO or DEBUG for short periods or by node type. -chama[1-1232],chama-gw[1-48],chama-lsm[1-8],chama-rps[1-8] ldmsd_dbg=ERROR -chama[1-1232],chama-gw[1-48],chama-lsm[1-8],chama-rps[1-8] ldmsaggd_dbg=ERROR - -# monitoring data collectors are ldmsd; what about iscb[1-140],sw[1-32]? -chama[1-1232],chama-gw[1-48],chama-lsm[1-8],chama-rps[1-8] ldmsd - -# define transport for data collectors -chama[1-1232],chama-gw[1-48],chama-lsm[1-8],chama-rps[1-8] ldmsd_port=411,ldmsd_xprt=rdma - -# define the hostname needed for the transport. -chama[1-1232],chama-gw[1-48],chama-lsm[1-8],chama-rps[1-8] ldmsd_host=%n-ib0 - -# define sampling schedule (microsecond units). Is 10 sec too fast/slow? -chama[1-1232],chama-gw[1-48],chama-lsm[1-8],chama-rps[1-8] ldmsd_interval_default=10000000,ldmsd_offset_default=0 - -# what to collect -chama[1-1232],chama-gw[1-48],chama-lsm[1-8],chama-rps[1-8] slurmjobid:meminfo:vmstat:procnfs:lustre2_client:procstat:procnetdev:sysclassib - -# OPTIONS for specific plugins or host sets -# what about fscratch, gscratch in lustre2_client? -chama[1-1232],chama-gw[1-48],chama-lsm[1-8],chama-rps[1-8] ldmsd_meminfo=with_jobid/1 -chama[1-1232],chama-gw[1-48],chama-lsm[1-8],chama-rps[1-8] ldmsd_vmstat=with_jobid/1 -chama[1-1232],chama-gw[1-48],chama-lsm[1-8],chama-rps[1-8] ldmsd_procnfs=with_jobid/1 - -chama[1-1232],chama-gw[1-48],chama-lsm[1-8],chama-rps[1-8] ldmsd_lustre2_client=llite/scratch1:with_jobid/1 - -# change maxcpu to 32 if hyperthreading is on or optional per-user. -chama[1-1232],chama-gw[1-48],chama-lsm[1-8],chama-rps[1-8] ldmsd_procstat=with_jobid/1:maxcpu/16 - -# the net data has holes in the gw for eth2,eth3 and in rest of nodes for ib1. -chama[1-1232],chama-lsm[1-8],chama-rps[1-8],chama-gw[1-48] ldmsd_procnetdev=with_jobid/1:ifaces/eth0ð1ð2ð3&ib0&ib1 - -# verify correct ib ports for ldmsd_sysclassib -chama[1-1232],chama-gw[1-48],chama-lsm[1-8],chama-rps[1-8] ldmsd_sysclassib=with_jobid/1:ports/mlx4_0.1 -# qlogic cards? -#chama[1-1232],chama-gw[1-48],chama-lsm[1-8],chama-rps[1-8] ldmsd_sysclassib=with_jobid/1:ports/qib0.1 - -# component id groups -chama[1-1232] ldmsd_idbase=0 -chama-rps[1-8] ldmsd_idbase=11000 -chama-lsm[1-8] ldmsd_idbase=12000 -chama-gw[1-48] ldmsd_idbase=13000 - -# aggregator 1st level -# CLIENTOFLIST is expanded to match ldmsd_clientof values. -# bOOTNODELIST expands to bootnode values. See man page for alternatives. -# Port 411 cannot be used for both ldms_aggd and ldmsd if xprt is the same. -# -# %n in ldmsagdd means aggregate yourself; could shove off to aries. -chama-rps[1-8] ldmsaggd=BOOTNODELIST,%n - -# transport -chama-rps[1-8] ldmsaggd_port=411,ldmsaggd_xprt=sock -chama-rps[1-8] ldmsaggd_host=%n - -# who aggregators will report to -chama-rps[1-8] ldmsaggd_clientof=aries - -# schedule aggregation a delta T after collection. -chama-rps[1-8] ldmsaggd_interval_default=10000000,ldmsaggd_offset_default=350000 - -# aries is agging ataco 1st level aggregator -aries ldmsaggd=AGGCLIENTOFLIST - -# aries agg schedule (offset should be bigger than ataco agg offset. -aries ldmsaggd_interval_default=10000000,ldmsaggd_offset_default=750000 - -# store format -aries ldmsaggd_stores=store_csv -aries ldmsaggd_dbg=DEBUG -aries ldmsaggd_store_csv=altheader/1:id_pos/1:rolltype/2:rollover/0 - -# yes, need the // in the next line; 1st / is the = replacement, remember? -# oh, and file may be missing at the moment on aries. -# oh, and need path treated as its own gender and maybe as a template string.