TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

28 点作者 NickC_dev大约 10 年前

8 条评论

Plugawy大约 10 年前
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 未加载
rakoo大约 10 年前
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)
jfroma大约 10 年前
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 未加载
ghuntley大约 10 年前
<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 未加载
fsniper大约 10 年前
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.
typicalbender大约 10 年前
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>
fidz大约 10 年前
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).
dugmartin大约 10 年前
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>