changequote(~,@)dnl ~#!/bin/sh # $Id: rrd.host,v 2.46 2008/07/17 16:47:16 ksb Exp $ # # Example startup for the rrdisk program in /etc/init.d/rrd # $Link: ln -s ../init.d/rrd /etc/rc3.d/S10rrd # $Install(link): ${install-install} -c -S../rc3.d/S10rrd %f /etc/init.d/rrd # $Install: ${install-install} -c %f /etc/init.d/rrd # # RRD records 5m samples. To get a clean fit we sample 179s (1.67x) # by default. To get a more accurate view we can over sample by e # which would be a sample every 110 seconds. (We do that for cps.) # # We force the timezone into the abrv. form via date, to make # the conversion in the vxstat code safer PATH=/usr/sbin:$PATH:/usr/local/libexec case $1 in 'start') # configured for @HOST aka SHORTHOST~ su monitor -c "TZ=`date +%Z` /usr/local/libexec/rrdisk@ifelse( sso,substr(SHORTHOST,0,3),~ -113 -p swap0=c1t0d0s1 swap1=c1t1d0s1 swap2=c1t2d0s1 swap3=c1t3d0s1 @, SHORTHOST,ideal,~ -110 -p deploy=md1@, SHORTHOST,perfect,~ -110 -p deploy=md1@, SHORTHOST,ebpdev1,~ -p swap=c0t0d0s1 varebp=c0t11d0s6 optvips=c0t10d0s6 opt=c0t8d0s6@, SHORTHOST,fltops,~ -p swap=c0t0d0s1 oracle=c6t0d0s6 oas=c8t0d0s6 source=c7t0d0s6 ias=c8t1d0s6 webtrends=c7t1d0s6 data=c6t1d0s6 data2=c6t3d0s6 data1=c6t2d0s6 dump1=c7t2d0s6 dump2=c7t3d0s6 nts=c9t2d0s6@, SHORTHOST,fltmart,~ -p swap=c0t0d0s1 sas=c0t3d0s5 data1=c0t2d0s6 data2=c0t3d0s6@, ~ -p swap=c0t0d0s1@)~ &" @dnl We could make the default give a run-time error=UnKnownDevice ~ ;; 'stop') pkill -U monitor rrdisk ;; *) echo "`basename $0`: usage: /etc/init.d/rrd {start|stop}" esac @dnl