Étiquette : command line

How to count number of new line in a log file per seconds

Here is a good way to count number of new line in a log file per seconds in linux command line   tail -f /var/log/logfile | grep something | perl -e 'while (<>) {$l++;if (time > $e) {$e=time;print "$l\n";$l=0}}'  

Publié dans linux, tips Tagués avec : , ,