It's thoroughly uninteresting and basic. You've probably written DOS
batch files that were more involved. I think I modified the SNMP daemon
init script for it.
But here it is:
---
#!/sbin/sh
#
case "$1" in
'start')
if [ -f /etc/gmond.conf ]; then
/usr/sbin/gmond
fi
if [ -f /etc/gmetad.conf ]; then
/usr/sbin/gmetad
fi
;;
'stop')
/usr/bin/pkill -9 -x -u 0 '(gmond|gmetad)'
;;
'restart'|'reload')
$0 stop
$0 start
;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0
---
Have fun...
Krishna Kumar wrote:
Hi Steven,
Could you please give me some more info the gmond solaris init script you have mentioned about.. I couldn't find that in my installation..
Thanks a lot..
Rgds,
Krishna
----- Original Message -----
From: steven wagner <[EMAIL PROTECTED]>
Date: Mon, 10 Nov 2003 11:39:29 -0800
To: ganglia ganglia <[email protected]>
Subject: Re: [Ganglia-general] "gmond start" Error
Brooks Davis wrote:
On Thu, Nov 06, 2003 at 10:02:07PM -0500, Krishna Kumar wrote:
Hi,
I installed ganglia on my solaris (with gmetad).. when I try to start the
daemon, it gives me this error..
$ /gmond start
/etc/rc.d/init.d/functions not found
I've copied the gmond.init to /usr/sbin.. Is there something I'm missing
here??!!
/etc/rc.d/init.d/functions is a Linuxism. You might have better luck
starting with the scripts I use in the FreeBSd port:
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/sysutils/ganglia-monitor-core/files/gmond.sh.sample?rev=1.1
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/sysutils/ganglia-monitor-core/files/gmetad.sh.sample?rev=1.1
For solaris you will need to modify the code that sets the PREFIX
variable and remove the call to killall, replacing it with a pkill call.
!!! WARNING !!!
If you don't remove the killall call, it will kill all processes
including init.
!!! WARNING !!!
We should probalby figure out a better way to package the startup
scripts within ganglia so we can include appropriate ones for each OS
since there's no one-size-fits-all solution.
Didn't I, once upon a time, include a gmond.solaris init script of some
sort with the Ganglia distribution?
I have one that works ... it's really nothing special, though...