Number of log events per day and second

Ever want to know how many log events per day and per second (in a day) you are generating??? Derived from this SK.

You can run this on your MLM MDS from the root mdsenv and NOT inside a domain context.

——————————————————-

#!/bin/sh
. $CPDIR/tmp/.CPprofile.sh
# Print log rate data on all Domains
echo DOMAIN , DAY , LOGSPERDAY , LOGSPERSECOND
for DOMAIN in $(ls -1 $MDSDIR/customers)
do
mdsenv “$DOMAIN” > /bin/null
mcd log > /bin/null
ls -al *.logptr | awk ‘{split($9,a,”_”);print a[1],$5 }’ | sort | awk -v mds=$DOMAIN -F ” ” ‘{s[$1]+=$2} END {for (i in s) printf “%s,%s,%d,%f\n”, mds,i,s[i]/4,s[i]/4/86400} ‘ | sort
done

exit 0

—————————————————————

Try this environment too

. $MDS_CPDIR/tmp/.CPprofile.sh
. $MDS_SYSTEM/shared/bin_definitions.sh

Advertisements
Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

blog.lachmann.org

Michael Endrizzi's - St. Paul MN - CheckPoint blog on topics related to Check Point products and security in general.

%d bloggers like this: