#!/bin/ksh # $Id: sample.init,v 1.1 2004/11/11 15:19:43 ksb Exp $ # Description: cron-less unix CPU sampler startup (for PEG) and/or any # other persistent samplers # chkconfig: 2345 90 90 # # $Install(*): ssh %s -l root /usr/local/bin/install -o root - /etc/init.d/pegsample <%f \\&\\& /sbin/chkconfig --add pegsample # . /usr/local/lib/distrib/local.defs PROGNAME=`basename $0 .init` RUN_AS="su monitor" # Now fire them up, stop them, or check them case _"$1" in _start) # start all the persistent samplers here, sleep a little to # avoid a beat in them, and/or change -p a little ( echo PATH=/usr/local/libexec:$PATH echo unixstats -p 113 \& \/dev/null >/dev/null ;; _stop) pkill -U monitor unixstats pkill -U monitor networkstats ;; _version) PATH=/usr/local/libexec:$PATH echo "$PROGNAME: "'$Id: sample.init,v 1.1 2004/11/11 15:19:43 ksb Exp $' ;; *) echo "usage: $0 [start|stop]" 1>&2 ;; esac