Skip to content

Commit b1ba3a8

Browse files
committed
update calculating requests per second with pv
- signed-off-by: trimstray <trimstray@gmail.com>
1 parent 6c975ab commit b1ba3a8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/HELPERS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5383,6 +5383,9 @@ tail -2000 "$_fd" | cut -d '"' -f3 | cut -d ' ' -f2 | sort | uniq -c | sort -nr
53835383
_fd="access.log"
53845384
tail -F "$_fd" | pv -lr >/dev/null
53855385
5386+
# https://serverfault.com/a/641552
5387+
tail -F "$_fd" | pv --line-mode --rate --timer --average-rate -b > /dev/null
5388+
53865389
# - add `head -n X` to the end to limit the result
53875390
# - add this to the end for print header:
53885391
# ... | xargs printf '%10s%24s%18s\n%10s%24s%18s\n' "AMOUNT" "DATE" "IP_ADDRESS"

0 commit comments

Comments
 (0)