Created
April 29, 2019 14:26
-
-
Save bogdangrigg/5db26e7bbd434d659ff33170de95a107 to your computer and use it in GitHub Desktop.
Log parsing snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Realtime lines per second in a log file | |
tail -f /var/log/logfile | perl -e 'while (<>) {$l++;if (time > $e) {$e=time;print "$l\n";$l=0}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment