miruo for Mac
$ tar zxvf miruo-x.y.z.tar.gz $ cd miruo-x.y.z $ ./configure $ make $ sudo make install
miruo — overview
はじめに miruo はパケットキャプチャ型の TCP セッションモニタです。 以下のような特徴があります。 TCP セッション単位でパケットをまとめて表示できます TCP の接続、切断部分のみをコンパクトに表示できます セグメントが再送された TCP セッションを発見できます 通信に時間がかかった TCP セッションを発見できます RST で中断された TCP セッションを発見できます IP でフラグメントされたセグメントを発見できます tcpdump の -w で保存されたファイルを利用できます 軽量で高速に動作します
インストール方法
$ tar zxvf miruo-x.y.z.tar.gz $ cd miruo-x.y.z $ ./configure $ make $ sudo make install
使い方
usage: miruo [option] [expression]
option -h, --help # help -V, --version # version -i, --interface=dev # eth0,bond0,any... -v, --view-data=NUM # -T, --long-connect=time[ms] # Threshold of connection time for lookup. Default 0ms(off) -t, --long-delay=time[ms] # Threshold of long delay time for lookup. Default 0ms(off) -r, --retransmit=time[ms] # Threshold of retransmit time for lookup. Default 1000ms -s, --stat=interval[sec] # statistics view interval. Default 0sec(off) -f, --file=file # read file(for tcpdump -w) -S, --syn=[0|1] # syn retransmit lookup mode.default=1. 0=ignore 1=lookup -R, --rst=[0|1|2] # rst lookup mode.default=1. (see README) -F, --fragment=[0|1] # ip fragment lookup. default=1 -C, --color=[0|1] # color 0=off 1=on -L, --session-limit=NUM # active session limit. Default 1024 -l, --segment-limit=NUM # active segment limit. Default 65536 -m, --dpi-mode=mode # deep packet inspection mode. (now support only http) -q, --quiet # --all # all session lookup --live # live mode(all segment lookup)
expression には tcpdump と同じ書式でフィルタを記述できます。
ただし、tcp[13] & 2 != 0 などのような、TCP の一部のパケットのみを抽出するルールを書いてしまうと、TCP セッションを追跡できなくなるので注意してください。フィルタの書式については tcpdump の man を参照してください。
良い例
miruo -T3000 host dbserver and port 3306
MySQL に3秒以上接続しているセッションを表示します
悪い例
miruo -T3000 dst host dbserver and dst port 3306
SYN/ACK などをキャプチャできないので TCP を追跡できなくなります
オプションの詳細
-h, --help ヘルプを表示します。
-V, --version バージョンを表示します。
-i, --interface=dev ネットワークインターフェイスを指定します。 any も指定できます。
-v, --view-data=NUM この値が 0 の場合は、再送や遅延したパケットと、接続や切断に関するパケットのみを表示します。 0 以外の値を指定すると、指定された数だけ他のパケットも表示されるようになります。 デフォルト値は 0 です。
-T, --long-connect=time[ms] 接続から切断までの時間が、ここで指定した時間以上だったセッションを表示するように指示します。 デフォルト値は 0 で、接続時間による抽出は行いません。
-t, --long-delay=time[ms] ここで指定した時間よりも、長い時間をかけて到達したパケットを発見します。 デフォルト値は 0 で、到達時間による抽出は行いません。
-r, --retransmit=time[ms] 0 を指定すると、再送されたTCPセグメントを無視します。 0 以外の値を指定すると、指定された時間(ミリ秒単位)以上の時間をかけて再送されたセグメントを表示します。 デフォルトは 1000(ミリ秒)です。
-s, --stat=interval[sec] 定期的にstderrへ統計情報を出力します。 デフォルト値は 0 で、統計情報を表示しません。
-f, --file=file tcpdump -w で保存したファイルを利用したい時にファイル名を指定してください。
-S, --syn=[0|1]
SYN もしくは SYN/ACK の再送を検出するかどうかを指定します。
0: 検出しません 1: 検出します
SYN と SYN/ACK の再送検出は、-r オプションとは独立して処理されます。 -r オプションの指定内容に関わらず、ここで 1 を指定すると再送を検出しますし、0 を指定すると検出しなくなります。
-R, --rst=[0|1|2]
RST フラグで中断されたセッションを検出するかどうかを指定します。
0: 検出しません 1: 検出はしますが、FINを送った後のRSTは検出しません 2: 全てのRSTを検出します
デフォルト値は 1 です。
-F, --fragment=[0|1]
IP フラグメントを検出するかどうか指定します。
0: 検出しません 1: 検出します
デフォルト値は 1 です。
-C, --color=[0|1] カラー表示をしたくない場合は 0 を指定してください。 デフォルトは 1 ですが、標準出力をファイルに落とす場合や、パイプで他のコマンドに渡す場合は 0 になります。 パイプで grep などに渡したいけど、カラー表示をしたいような時には明示的に 1 を指定してください
Details
漂亮打印 TCP 会话监视器/分析器
How to install miruo
- Open Terminal (press ⌘ + Space and type “Terminal”).
- If Homebrew is not installed yet, run the command below first.
- Run this command:
Latest 10 releases
Last updated 2016-01-26; current version 0.9.6b, with the latest 2 releases listed.
| Version | Released | Type | Size | macOS | Windows | Linux |
|---|---|---|---|---|---|---|
| 0.9.6b | 2016-01-26 | Stable | — | — | — | — |
| 0.9.6a | 2015-05-20 | Stable | — | — | — | — |
Data from GitHub Releases; stable releases first, each group sorted newest first.
Prebuilt bottle platforms
Official Homebrew bottles cover:
- Apple silicon · latest macOS
- Apple silicon · macOS 26 Tahoe
- Apple silicon · macOS 15 Sequoia
- Apple silicon · macOS 14 Sonoma
- Apple silicon · macOS 13 Ventura
- arm64_monterey
- arm64_big_sur
- Intel · macOS 14 Sonoma
- Intel · macOS 13 Ventura
- Intel · macOS 12 Monterey
- big_sur
- Linux · ARM64
- Linux · x86_64
Compared with similar apps
Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.
| App | Version | License | Architecture | 30-day installs |
|---|---|---|---|---|
| miruo | 0.9.6b | GPL-3.0-only | CLI | 18 |
| libxp | 1.0.4 | MIT | CLI | 1 |
| hindent | v6.3.0 | BSD-3-Clause | CLI | 1 |
| tcptunnel | 0.8 | GPL-2.0-or-later | CLI | 0 |
Similar apps: Command-line Tools
libxp
libxp is a client library for the X printing system, intended mainly for programs that need to…hindent
$ hindent --help hindent - Reformat Haskell source codetcptunnel
Tcptunnel is a simple TCP port forwarder. Please see for details and binary downloads.rinetd
rinetd, by Thomas Boutell and Sam Hocevar. Released under the terms of the GNU General Public…rmate
If you wish to activate TextMate from an ssh session you can do so by copying the rmate (ruby)…openssl@4
Cryptography and SSL/TLS ToolkitCategories: Command-line Tools