DEV Community

YURII DE.
YURII DE.

Posted on

1

NGINX REQ/SEC: parse log

The output of the above-given command will sort out all of the requests while putting a timestamp with each of them. Here, the first number represents the request count:

sudo cat /var/log/nginx/access.log | awk '{print $4}' | uniq -c | sort -rn | head
Enter fullscreen mode Exit fullscreen mode
    683 [26/Aug/2022:04:04:32
    642 [26/Aug/2022:05:59:46
    629 [26/Aug/2022:05:01:55
    604 [26/Aug/2022:07:53:47
    556 [26/Aug/2022:15:02:34
    551 [26/Aug/2022:06:57:02
    548 [26/Aug/2022:08:48:05
    521 [26/Aug/2022:09:37:22
    466 [26/Aug/2022:07:53:46
    447 [26/Aug/2022:15:02:35
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay