Signal9Signal9 — home
online
back to labs

Pipeline: Top Talkers in an Access Log

EasyLinux Fundamentals15-20 min
The brief

A web server's access log sits at /root/access.log — one request per line, the client IP is the first whitespace field. No single command answers 'who hit us most?' — you build the answer by chaining small tools. Produce three results under /root/answers/ (already created):

1. top3.txt — the 3 busiest IPs, MOST requests first, one IP per line (just the IP, no counts). The classic chain: pull the field → sort → uniq -c → sort -rn → head → keep just the IP.

2. total.txt — the total number of requests (i.e. lines in the log), as a number.

3. unique.txt — how many DISTINCT client IPs appear, as a number.

This is the 'top talkers' pattern every sysadmin and analyst reaches for. Decompose it into one-step transforms joined by pipes.

What you'll do
  • Rank the top 3 IPs by request count into top3.txt (order matters: busiest first)
  • Count total requests into total.txt
  • Count distinct IPs into unique.txt

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.