Skip to content

Instantly share code, notes, and snippets.

@originalhat
Last active August 29, 2015 14:18
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 originalhat/60e23cdf5fa051216467 to your computer and use it in GitHub Desktop.
Save originalhat/60e23cdf5fa051216467 to your computer and use it in GitHub Desktop.
logging from multiple hosts (and some other goodies)

Multiple Host Logging [Multitail]

Install multitool via homebrew.

cf. vanheusden.com/multitail

Basic Logging

Logging stuff from multiple (2) hosts.

multitail -l 'ssh user@127.0.0.1 "tail -f /log/destination/*.log"' -l 'ssh user@127.0.0.1 "tail -f /log/destination/*.log"'

Searching Logs

Search a log using multitail by combining them and using the -E flag.

multitail -E 'SEARCH ITEM' --mergeall -l 'ssh user@127.0.0.1 "tail -f /log/destination/*.log"' -l 'ssh user@127.0.0.1 "tail -f /log/destination/*.log"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment