News for hackers. Stuff that matters.
Re:Show HN: Tail out log files from multiple remote hosts wi... by jfroma on Sunday February 22, 2015 @07:14PM (#9091859)
I use pssh [1].

  pssh -H h1 -H h2 -P "tail -n 1000 /var/log/x.log"
It is very easy to install on every platform since is on most package managers.

[1]: http://linux.die.net/man/1/pssh

Re:Show HN: Tail out log files from multiple remote hosts wi... by lobster_johnson on Sunday February 22, 2015 @08:11PM (#9092026)
pssh is great.

You'll want -i to avoid the buffered output that would make the log output hard to read.

And if your command doesn't contain anything that you need to escape from the shell, you don't need to quote the command.

And finally, since it implements BSD-style short flags correctly, so you can do "-Pi" instead of "-P -i".

Handy with a pre-defined list of hosts, too:

    pssh -Pi -H "hosts.txt" tail -f /var/log/haproxy.log
or a specific set of hosts:

    pssh -Pi -H `cat hosts.txt | grep prod` tail -f /var/log/haproxy.log
Re:Show HN: Tail out log files from multiple remote hosts wi... by jfroma on Sunday February 22, 2015 @08:21PM (#9092059)
Nice tips, thank you!