TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Tail out log files from multiple remote hosts with one command

28 pointsby NickC_devabout 10 years ago

8 comments

Plugawyabout 10 years ago
So it&#x27;s basically:<p><pre><code> tail -f &lt;(ssh -t host &#x27;tail -f &#x2F;var&#x2F;log&#x2F;sth&#x27;) &lt;(ssh -t host2 &#x27;tail -f &#x2F;var&#x2F;log&#x2F;sth&#x27;) </code></pre> + I need to install nodejs?
评论 #9091193 未加载
评论 #9091798 未加载
rakooabout 10 years ago
For another display, there&#x27;s also multitail (<a href="http://www.vanheusden.com/multitail/" rel="nofollow">http:&#x2F;&#x2F;www.vanheusden.com&#x2F;multitail&#x2F;</a>) that you can run with a custom command, such as<p><pre><code> ssh host tail -f &#x2F;path&#x2F;to&#x2F;log </code></pre> (which is the command that remtail seems to be doing)
jfromaabout 10 years ago
I use pssh [1].<p><pre><code> pssh -H h1 -H h2 -P &quot;tail -n 1000 &#x2F;var&#x2F;log&#x2F;x.log&quot; </code></pre> It is very easy to install on every platform since is on most package managers.<p>[1]: <a href="http://linux.die.net/man/1/pssh" rel="nofollow">http:&#x2F;&#x2F;linux.die.net&#x2F;man&#x2F;1&#x2F;pssh</a>
评论 #9092026 未加载
ghuntleyabout 10 years ago
<p><pre><code> &gt; You can optionally use a credentials file in ~&#x2F;.remtail.json of this format: </code></pre> What ever happened to just using .netrc?<p><a href="http://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-File.html" rel="nofollow">http:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;inetutils&#x2F;manual&#x2F;html_node&#x2F;The-_...</a>
评论 #9091154 未加载
fsniperabout 10 years ago
Good implementation but not for my tastes. node.js for this purpose? I think it&#x27;s a bit heavy in this case.<p>mssh or cluster ssh is also effective in this manner, with the added flexibility of ssh terminals.
typicalbenderabout 10 years ago
I&#x27;ve also used dsh[1] to accomplish the same thing. Never tried to use username and password for this though so that actually may be more of a pain with dsh. Also tailing multiple files on the same host is pretty cool.<p>[1] - <a href="http://www.tecmint.com/using-dsh-distributed-shell-to-run-linux-commands-across-multiple-machines/" rel="nofollow">http:&#x2F;&#x2F;www.tecmint.com&#x2F;using-dsh-distributed-shell-to-run-li...</a>
fidzabout 10 years ago
In my company, we have hundred machines and tailing done with ansible. If we want customize the log view, we can simply edit the playbook. I think it is very handy compared to we need additional npm package (and not to mention additional effort for customization).
dugmartinabout 10 years ago
If you want to send that tail output to your browser here is a little app I released last week:<p><a href="http://dougmart.in/projects/pagepipe" rel="nofollow">http:&#x2F;&#x2F;dougmart.in&#x2F;projects&#x2F;pagepipe</a>