Get top IP addresses for specific path in logs

By.

min read

My profile

Share this:
grep '\?add-to-cart' log.txt \
  | awk '{print $1}' \
  | sort | uniq -c | sort -nr | head

TO select above a threshold:

cat access.log | grep ' 429 ' | awk '{print $1}'  | sort | uniq -cd | awk -v limit=900 '$1 > limit{print $2}'
Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *