« | »

前回は Q でしたが、今回は T です。

パッケージ名 tcptraceroute
バージョン tcptraceroute-1.5.beta7-lp152.48.5
動作 ○
詳細
tcp を使った traceroute と同等の機能を実行するツールです。ICMP ではなくて、TCPで特定のポートを叩く形で traceroute 相当の出力を表示します。インストール時にはlibnet9-1.2~rc3-lp152.3.4 も必要となります(自動でインストールされます)。また、Thumbleweed には入っていません。LEAP のみです。
とあるサーバにtraceroute をしてみてもうまく動かなかったのですが、ポート 22 を指定して tcptraceroute を実行したところ、うまく表示できました。

% traceroute -n 210.171.174.178
traceroute to 210.171.174.178 (210.171.174.178), 30 hops max, 60 byte packets
 1  172.31.255.254  0.875 ms  0.529 ms  0.612 ms
 2  124.155.82.121  26.090 ms  25.900 ms  25.712 ms
 3  124.155.82.69  25.762 ms  25.571 ms  25.651 ms
 4  124.155.82.2  25.465 ms  25.627 ms  25.441 ms
 5  202.224.52.170  62.408 ms  62.183 ms  61.993 ms
 6  202.224.52.5  24.652 ms  27.474 ms  27.147 ms
 7  202.224.52.13  27.300 ms  16.913 ms  16.556 ms
 8  203.190.230.13  16.553 ms  16.760 ms  16.508 ms
 9  61.211.190.90  16.626 ms  16.458 ms 61.211.190.98  16.564 ms
10  219.124.151.210  16.147 ms  20.514 ms  19.783 ms
11  210.171.170.10  19.491 ms  19.283 ms  8.395 ms
12  210.171.170.34  7.396 ms  18.154 ms  17.967 ms
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

% tcptraceroute -n 210.171.174.178 22
Selected device eth0, address 172.31.255.189, port 57123 for outgoing packets
Tracing the path to 210.171.174.178 on TCP port 22 (ssh), 30 hops max
 1  172.31.255.254  0.614 ms  0.723 ms  0.702 ms
 2  124.155.82.121  4.183 ms  3.435 ms  3.461 ms
 3  124.155.82.69  4.362 ms  4.036 ms  3.909 ms
 4  124.155.82.2  3.690 ms  3.572 ms  4.257 ms
 5  202.224.52.170  6.843 ms  6.607 ms  10.887 ms
 6  202.224.52.5  6.634 ms  6.954 ms  6.597 ms
 7  202.224.52.13  5.601 ms  4.822 ms  5.065 ms
 8  203.190.230.13  5.674 ms  6.073 ms  7.402 ms
 9  61.211.190.90  6.423 ms  5.553 ms  6.690 ms
10  219.124.151.214  5.680 ms  6.735 ms  5.742 ms
11  210.171.170.10  6.646 ms  6.523 ms  7.012 ms
12  210.171.170.34  5.233 ms  7.322 ms  6.962 ms
13  192.168.3.252  10.616 ms  6.878 ms  10.268 ms
14  210.171.174.178 [open]  8.053 ms * *

ただ、万能ではないようです。Azure の中にある仮想マシンに、 tcptraceroute をポート 3389 や port 22 で実行してみたのですが、やはり繋がりませんでした。

パッケージ名 tdiff
バージョン tdiff-0.8.5-3.6.x86_64
動作 ◎
詳細
ディレクトリの比較をするコマンドです。diff とは違い、ファイルの差分を取るわけではありません。ディレクトリ中のファイルについて、日付や属性などを比較するためのツールです。たとえば、このような感じになります。

# tdiff . /home/ribbon
tdiff: (top-level): mode: 0700 0755
tdiff: (top-level): uid: root(0) ribbon(1000)
tdiff: (top-level): gid: root(0) users(100)
tdiff: (top-level): nlink: 9 21
tdiff: .bash_history: uid: root(0) ribbon(1000)
tdiff: .bash_history: gid: root(0) users(100)
tdiff: .bash_history: size: 1382 3546
tdiff: .bash_history: contents differ
tdiff: .bashrc: only present in /home/ribbon
tdiff: .cache: uid: root(0) ribbon(1000)

また、-v オプション( -vv,-vvv,-vvvv もあります)を指定すると統計情報を出力します。

tdiff: inode cache statistics:
 Hashing statistics for inode cache (@0x55916e3e4610):
    Table size              :      101
    Entry count             :       11
    Occupied buckets        :       10
    Distribution efficiency :    90.91%
    Average bucket length   :      1.1
    Max bucket length       :        2
tdiff: end

そのほかにもオプションが多数あります。数字の0 から 9 までのオプションを指定すると、チェックする項目が徐々に増えていくようになっています。

# tdiff -0 .local /home/ribbon/.local
# tdiff -1 .local /home/ribbon/.local
tdiff: share/RecentDocuments: only present in /home/ribbon/.local
tdiff: share/baloo: only present in /home/ribbon/.local
tdiff: share/flatpak/.changed: only present in .local
(略)
# tdiff -2 .local /home/ribbon/.local
tdiff: (top-level): mode: 0755 0700
tdiff: share/RecentDocuments: only present in /home/ribbon/.local
tdiff: share/baloo: only present in /home/ribbon/.local
tdiff: share/flatpak: mode: 0700 0755
tdiff: share/flatpak/.changed: only present in .local
(略)
# tdiff -3 .local /home/ribbon/.local
tdiff: (top-level): mode: 0755 0700
tdiff: (top-level): uid: root(0) ribbon(1000)
tdiff: (top-level): gid: root(0) users(100)
tdiff: share: uid: root(0) ribbon(1000)
tdiff: share: gid: root(0) users(100)
tdiff: share/RecentDocuments: only present in /home/ribbon/.local
tdiff: share/baloo: only present in /home/ribbon/.local
tdiff: share/flatpak: mode: 0700 0755
tdiff: share/flatpak: uid: root(0) ribbon(1000)
tdiff: share/flatpak: gid: root(0) users(100)
tdiff: share/flatpak/.changed: only present in .local
(略)

tdiff は、ファイルの有無や、属性の違いなどを一気に調べるときに便利に使えそうです。

コメント/トラックバック