Scout Realtime – 次世代のtopはWebで見る!
おお、これは格好いいぞ! サーバのステータスを知りたかったら打つコマンドがtopです。リアルタイムに刻々と変わるサーバのステータスを“テキストベース”で確認できます。しかし時代はどんどんグラフィカルになっている中、未だにtopで良いのでしょうか。 そんな疑問を解決してくれるソフトウェアがScout Realtimeです。サーバのステータスをリアルタイムに、かつグラフィカルに表示してくれる新世代のtopコマンドです。
Scout Realtimeのスクリーンショット
Mac OSXでは/proc系の出力がないのでグラフが完全には出ません。
Scout Realtimeのインストール
インストールはRubygemsで行います。
$ gem install scout_realtime
起動はコマンド一つです。
$ scout_realtime
Daemon has started successfully
To view in your browser, do ONE of the following:
A) create an SSH tunnel: ssh -NL 5555:localhost:5555 user@ip_or_hostname (run that command on your own computer, not the server)
then point your browser to: http://localhost:5555
--- OR ---
B) open a port in your firewall: sudo iptables -A INPUT -p tcp --dport 5555 -j ACCEPT (run that command on your server)
then point your browser to: http://your-ip-or-hostname:5555
* FYI, the log file is: /Users/nakatsugawa/.scout/scout_realtime.log
* "scout_realtime stop" to stop the daemon
そうすると5555ポートでサーバが立ち上がるので、SSHトンネルまたはファイアウォールの設定を変更して閲覧が出来ます。グラフがリアルタイムに変わっていくのは見ていて飽きさせません。topの場合、常に現在の値のみ表示されるので、Scout Realtimeの蓄積が役立つ場面も多そうです。
Scout RealtimeはRuby製のオープンソース・ソフトウェア(MIT License)です。