2 # Calculate OSSEC events per second
3 # Author Michael Starks ossec [at] michaelstarks [dot] com
6 if [ ! -e /etc/ossec-init.conf ]; then
7 echo OSSEC does not appear to be installed on this system. Goodbye.
10 grep -q agent /etc/ossec-init.conf && echo This script can only be run on the manager. Goodbye. && exit 1
18 . /etc/ossec-init.conf
20 for i in $(grep 'Total events for day' ${DIRECTORY}/stats/totals/*/*/ossec-totals-*.log | cut -d: -f3); do
23 EPSSUM=$(($DAILYEVENTS+$EPSSUM))
26 EPSAVG=$(($EPSSUM/$COUNT/(86400)))
28 echo Your total lifetime number of events colected is: $EPSSUM
29 echo Your total daily number of events average is: $(($EPSSUM/$COUNT))
30 echo Your daily events per second average is: $EPSAVG