Practice / Software

Top 10 IPs from an access log

Easy · Coding (typed)

An nginx access log has the client IP as the first field on each line. Write a command (or short script) that prints the 10 IPs with the most requests and their counts. Then change it to count only lines with a 5xx status (the 9th field).

Create a free account to answer it and get scored on what a strong answer covers.