Skip to content

Instantly share code, notes, and snippets.

@cronnelly
Created March 30, 2013 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cronnelly/5277939 to your computer and use it in GitHub Desktop.
Save cronnelly/5277939 to your computer and use it in GitHub Desktop.
Tail and filter log files on multiple SSH hosts.
for i in $(seq 2); do ssh -A sl-shortlist-0$i "tail -f /var/log/apache2/other_vhosts_access.log | cut -f 4,5,6,7,8,13 | awk -F'=' '{if (\$NF > 500000) print \"$i:\", \$0; fflush()}'" & true; done | cat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment