Hands-on task
This task is step 4 of the course “Logs: analysis and housekeeping”
Top IP by server errors
/var/log/access.log has lines of the form IP STATUS — one per request. Find the IP address that produced the most 5xx errors (status 500–599) and write only that IP to /root/top.txt. Note: the "noisiest" IP may have few errors — count only 5xx.
What you'll practise:
- pipeline
- awk filter
- sort/uniq -c
- sort -rn
- frequency counting