I'm using ubuntu 12.04, all updates installed
PID written by original init script into /var/run/$NAME.pid is not the
correct one. Mostly PID in file is one lower as real PID.
gmond and gmetad support -p, --pid-file=STRING as argument!
Maybe the maintainer auf that package could also add the status into
init script of gmond. With the addtional status function you could
monitor gmond in pacemaker(linuxHA)
#! /bin/sh
### BEGIN INIT INFO
# Provides: ganglia-monitor
# Required-Start: $network $named $remote_fs $syslog
# Required-Stop: $network $named $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/gmond
NAME=gmond
DESC="Ganglia Monitor Daemon"
test -x $DAEMON || exit 0
set -e
. /lib/lsb/init-functions
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --exec
$DAEMON -- -p /var/run/$NAME.pid
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --oknodo --name $NAME \
2>&1 > /dev/null
echo "$NAME."
;;
status)
if [ ! -f /var/run/$NAME.pid ] ; then
echo "Not running: PIDFILE not found"
exit 3
fi
STATUS=""
status_of_proc -p /var/run/$NAME.pid $DAEMON $NAME
STATUS="$?"
if [ "$STATUS" -eq 0 ] ; then
telnet localhost 8649 | grep -q GANGLIA_XML
OUTPUT="$?"
if [ $OUTPUT -eq 0 ] ; then
echo Status OK
exit 0
else
echo Status: error parsing output of $NAME
exit 3
fi
else
echo "Status: PIDFILE exists, but no process for pid"
exit 3
fi
;;
reload)
;;
restart|force-reload)
$0 stop
$0 start
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/729941
Title:
missing params in gmetad and gmond startup scripts
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ganglia/+bug/729941/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs