<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Bericht</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1595" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=657031308-23082007><FONT color=#0000ff size=2>What about a few
'master config' files only containing some basic setup and 'include: ..'
statements to all your existing config files? </FONT></SPAN></DIV>
<DIV><SPAN class=657031308-23082007><FONT color=#0000ff
size=2>In this way you only need to start your master config
files.</FONT></SPAN></DIV>
<DIV><SPAN class=657031308-23082007><FONT color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=657031308-23082007><FONT color=#0000ff
size=2>HTH,</FONT></SPAN></DIV>
<DIV><SPAN class=657031308-23082007><FONT color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=657031308-23082007><FONT color=#0000ff
size=2>Jan.</FONT></SPAN></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=nl dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
mrtg-bounces@lists.oetiker.ch [mailto:mrtg-bounces@lists.oetiker.ch] <B>On
Behalf Of </B>Brad Lodgen<BR><B>Sent:</B> Wednesday, August 22, 2007 11:56
PM<BR><B>To:</B> mrtg@lists.oetiker.ch<BR><B>Subject:</B> [mrtg] MRTG Daemon
at Startup with hundreds of configs<BR><BR></FONT></DIV>Hi there,<BR><BR>I'm
looking at a project to switch a server that is using MRTG to monitor hundreds
of devices over to running MRTG in daemon mode, for efficiency. As one could
infer, there are hundreds of config files to go along with those hundreds of
devices. Since MRTG has to be started once for each config, I'm trying to
develop a Linux startup script that will execute all of the configs. I will
copy/paste the startup script I'm currently working with. Does anyone have any
idea how to change this to make it start up all of the configs? It may be an
easy answer, but I'm very fresh on shell scripting and have spent hours
searching for this info, to no avail. Please help! <BR><BR>Thanks in advance
for any advice or help you may provide...here is the startup script I
found....<BR><BR><BR><PRE class=alt2 dir=ltr style="BORDER-RIGHT: 1px inset; PADDING-RIGHT: 6px; BORDER-TOP: 1px inset; PADDING-LEFT: 6px; PADDING-BOTTOM: 6px; MARGIN: 0px; OVERFLOW: auto; BORDER-LEFT: 1px inset; WIDTH: 640px; PADDING-TOP: 6px; BORDER-BOTTOM: 1px inset; HEIGHT: 498px; TEXT-ALIGN: left">#!/bin/bash<BR>#<BR># mrtg This shell script starts mrtg<BR>#<BR># Author: Stefan SF <BR>#<BR># chkconfig: 345 90 35<BR>#<BR># description: mrtg The Multi Router Traffic Grapher<BR># processname: mrtg<BR>
# config: /etc/mrtg/mrtg.conf<BR>#<BR>### BEGIN INIT INFO<BR># Provides: mrtg<BR># Required-Start: $network<BR># Default-Stop: 0 1 6<BR># Short-Description: Starts the The Multi Router Traffic Grapher<BR># Description: The Multi Router Traffic Grapher (MRTG) is a tool to monitor \
<BR># the traffic load on network-links. MRTG generates HTML pages \<BR># containing GIF/PNG images which provide a live visual \<BR># representation of this traffic.<BR>### END INIT INFO
<BR><BR># source function library<BR>. /etc/rc.d/init.d/functions<BR><BR>MRTG="/usr/bin/mrtg"<BR>CONFIG="/etc/mrtg/mrtg.cfg"<BR>PIDFILE="/var/run/mrtg.pid"<BR>LOCKFILE="/var/lock/mrtg/mrtg"
<BR>OPTIONS="--daemon"<BR><BR>RETVAL=0<BR><BR>start() {<BR>        echo -n $"Enabling MRTG: "<BR>        rm -f ${LOCKFILE} 2> /dev/null<BR>        env LANG=C ${MRTG} --pid-file=${PIDFILE} --lock-file=${LOCKFILE} ${OPTIONS} ${CONFIG}
<BR>        RETVAL=$?<BR>        echo<BR>}<BR><BR>stop() {<BR>        echo -n $"Disabling MRTG: "<BR>        kill `cat ${PIDFILE}` && rm -f ${LOCKFILE}<BR>        RETVAL=$?<BR>        echo<BR>}<BR><BR>restart() {<BR>        stop<BR>        start<BR>}<BR><BR>case "$1" in
<BR> start)<BR>        start<BR>        ;<BR> stop) <BR>        stop<BR>        ;<BR> restart|force-reload)<BR>        restart<BR>        ;<BR> status)<BR>        if [ -f $LOCKFILE ]; then<BR>                echo $"MRTG is enabled."<BR>                RETVAL=0<BR>        else<BR>                echo $"MRTG is disabled."
<BR>                RETVAL=3<BR>        fi<BR>        ;<BR> *)<BR>        echo $"Usage: $0 {start|stop|status|restart|force-reload}"<BR>        exit 1<BR>esac<BR><BR>exit $RETVAL</PRE><BR></BLOCKQUOTE></BODY></HTML>
<table><tr><td bgcolor=#ffffff><font color=#000000>_________________________________________________________<br>
<br>
Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten.<br>
_________________________________________________________<br>
<br>
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The state accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.<br>
_________________________________________________________<br>
</font></td></tr></table>