Last active
August 29, 2015 14:27
-
-
Save bmvakili/e7fe92cb54207b8da699 to your computer and use it in GitHub Desktop.
Parse Unique Visitors from Apache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APACHE_LOG_FILE=/var/log/apache2/jenkinsrow-access_log | |
LINES_TO_SCAN=100000 | |
EXCLUDED_ENTITIES="(router.asus.com|NewRelicPinger|Googlebot|slurp|spider|bingbot)" | |
tail $APACHE_LOG_FILE -n $LINES_TO_SCAN | egrep -v "$EXCLUDED_ENTITIES" | sed -r 's!^[^ ]* ([^ ]*) .*!\1!g' | uniq -c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment