wget ftp://qosient.com/dev/argus-3.0/argus-3.0.0.tar.gz tar -xzvf argus-3.0.0.tar.gz -cd into argus directory- configure ; make ; make install |
cd support/ cd Config/ mkdir /etc/argus cp ./argus.conf /etc/argus chmod 600 /etc/argus/argus.conf cd .. cd Startup/ cp ./argus /etc/init.d chmod 755 /etc/init.d/argus chkconfig --add argus |
cd /etc/argus mkdir /var/log/argus vi ./argus.conf ARGUS_MONITOR_ID ARGUS_INTERFACE ARGUS_OUTPUT_FILE ARGUS_GENERATE_RESPONSE_TIME_DATA ARGUS_GENERATE_MAC_DATA |
cd /etc/init.d vi ./argus -make sure the setup reflects where you have the configuration file- |
/etc/init.d/argus start |
wget
ftp://qosient.com/dev/argus-3.0/argus-clients-3.0.0.tar.gz tar -xzvf argus-clients-3.0.0.tar.gz cd argus-clients-3.0.0 configure ; make ; make install |
/usr/local/bin/racluster -r /var/log/argus/argus.out -m proto -t `date +%T --date '5 minutes ago'`-`date +%T` -s proto pkts bytes load rate loss |
##SETUP VARIABLES MIN=5 RAC=/usr/local/bin/racluster RAS=/usr/local/bin/rasort LOG=/var/log/argus/argus.out TMP1=/tmp/argus.port.in TMP2=/tmp/argus.oth.in DT1=`date +%H:%M` DT2=`date +%H:%M -d '-5 min'` ##GET STATS INTO A TEMP FILE $RAC -m proto dport -n -r $LOG -s saddr daddr sport dport bytes -t $DT2-$DT1 -w - | $RAS -n -m bytes -s dport bytes > $TMP1 ##A FOR LOOP THROUGH ALL THE PORTS WE ARE INTERESTED IN WHICH DISPLAYS <PORT> <BYTES> for x in 21 22 25 53 80 110 143 443 444 445 1194 1433 1863 3306 5432 do RSLT=`cat $TMP1 | grep -w $x 1> /dev/null ; echo $?` echo $x >> $TMP2 if [ $RSLT == 1 ] then echo "$x 0" | gawk '{ print $1, $2 }' else cat $TMP1 | grep -w $x | gawk '{ print $1, $2 }' fi done ##NOW WE COUNT EVERYTHING ELSE SUM=0 for y in `cat $TMP1 | grep -v -f $TMP2 | gawk '{ print $2 }'` do SUM=`expr $SUM \+ $y` done echo "other $SUM" #CLEANUP rm -rf $TMP1 rm -rf $TMP2 |