summaryrefslogtreecommitdiff
path: root/src/pmdas/sample/Install
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-10-26 12:33:50 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-10-26 12:33:50 +0400
commit47e6e7c84f008a53061e661f31ae96629bc694ef (patch)
tree648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /src/pmdas/sample/Install
downloadpcp-debian.tar.gz
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'src/pmdas/sample/Install')
-rwxr-xr-xsrc/pmdas/sample/Install74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/pmdas/sample/Install b/src/pmdas/sample/Install
new file mode 100755
index 0000000..fd6bee6
--- /dev/null
+++ b/src/pmdas/sample/Install
@@ -0,0 +1,74 @@
+#! /bin/sh
+#
+# Copyright (c) 1997 Silicon Graphics, Inc. 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; either version 2 of the License, or (at your
+# option) any later version.
+#
+# 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.
+#
+# Install the sample PMDA and/or PMNS
+#
+
+. $PCP_DIR/etc/pcp.env
+. $PCP_SHARE_DIR/lib/pmdaproc.sh
+
+iam=sample
+forced_restart=false
+pmda_interface=2
+
+# Do it for sample
+#
+pmdaSetup
+
+echo "======================"
+echo "= sample daemon PMDA ="
+echo "======================"
+
+daemon_opt=true # can install as daemon
+dso_opt=false
+pipe_opt=true # supports pipe IPC
+socket_opt=true # supports socket IPC
+socket_inet_def=2077 # default TCP port for Internet socket IPC
+
+pmdaInstall
+
+# The name of the PMDA for sampledso
+#
+iam=sampledso
+
+# Do it for sampledso ... no pmdaSetup
+#
+
+echo "======================"
+echo "= sampledso DSO PMDA ="
+echo "======================"
+
+domain=30
+SYMDOM=SAMPLEDSO
+sed -e 's/sample/sampledso/' -e 's/SAMPLE/SAMPLEDSO/' <pmns >$tmp/pmns
+pmns_source=$tmp/pmns
+pmns_name=sampledso
+
+if $do_pmda
+then
+ sed -e 's/sample/sampledso/' -e 's/SAMPLE/SAMPLEDSO/' <help >dsohelp
+ help_source=dsohelp
+fi
+
+dso_opt=true
+daemon_opt=false
+dso_suffix=so
+[ "$PCP_PLATFORM" = "mingw" ] && dso_suffix=dll
+[ "$PCP_PLATFORM" = "darwin" ] && dso_suffix=dylib
+dso_name=$PCP_PMDAS_DIR/sample/pmda_sample.$dso_suffix
+dso_entry=sample_init
+
+pmdaInstall
+
+exit 0