![]() ![]() |
hotsanic |
Subversion Repositories: |
Compare with Previous - Blame - Download
#!/usr/bin/env shif ! [ -e settings ]; then OUTFILE="settings"; else OUTFILE="settings.new"; ficat > $OUTFILE <<EOF# Since the cpu stats lack support of multiprocessor machines,# this is a little HotFix for users who want their CPU graphs# to show values reaching above 1. Be sure that this is just a# multiplier for the values stored in the CPU database. And# only effects the diagrams, not the values stored!#EOFvar=`cat settings | grep "^NUMCPU="`if [ "$var" = "" ]; then var="NUMCPU=\"1\""; fiecho "$var" >>$OUTFILEcat >> $OUTFILE <<EOF# This modifies the output format of the CPU graphs.# If you prefer a percentage legend over the absoulte, just set# CPUGRAPH="percent"# otherwhise set it to what ever you like.#EOFvar=`cat settings | grep "^CPUGRAPH="`if [ "$var" = "" ]; then var="CPUGRAPH=\"1\""; fiecho "$var" >>$OUTFILEcat >> $OUTFILE << EOF# Configure which module sections to run locally## Example:# SECTIONS="cpu load proc mem users int uptime"SECTIONS="cpu load proc mem users int uptime"# Configure SNMP monitored hosts## HOST=SNMP:<host>:<community>,<description>## Example:# HOST=SNMP:somehost:public,Router# IRQ description## IRQ=<number>,<short description>## The short description will be trimmed to 5 chars in the diagrams.## example (for an IBM compatible PC):## IRQ=0,timer# IRQ=1,kbd# IRQ=2,casc# IRQ=3,ser1# IRQ=4,ser2# IRQ=5,?# IRQ=6,fdd# IRQ=7,lpt# IRQ=8,rtc# IRQ=9,?# IRQ=10,?# IRQ=11,?# IRQ=12,?# IRQ=13,CoPro# IRQ=14,?# IRQ=15,?#EOFif [ "$OUTFILE" = "settings.new" ]; thencat settings | grep "^IRQ=" >> $OUTFILEelsecat >> $OUTFILE << EOFIRQ=0,timerIRQ=1,kbdIRQ=2,cascIRQ=3,ser1IRQ=4,ser2IRQ=5,IRQ=6,fddIRQ=7,lptIRQ=8,rtcIRQ=9,IRQ=10,IRQ=11,IRQ=12,IRQ=13,CoProIRQ=14,IRQ=15,EOFfiechoecho "Please check the settings file and adapt it to satisfy your needs."if [ "$OUTFILE" = "settings.new" ]; thenmkdir -p backupNOW=`date +%Y%m%d-%H%M%S`mv -f settings backup/settings-$NOWmv -f settings.new settingsecho "a backup of the previous settings has been saved."fiecho