Calculating requests per second with pv

Miss apachetop under nginx or lighttpd? You can use pv to get a quick-and-dirty readout for almost any daemon:

sudo tail -F /var/log/nginx/access.log | pv -lr >/dev/null
[54.7/s ]

grep can naturally be used to filter the results.

Comments (1)

Nice example of a quick and dirty hack. Came in handy to grab some quick numbers. Good stuff!

Sept. 24, 2014, 10:35 p.m. #