harumaki.net

インフラ屋の覚書や、ラーメン食べある記とか。

infra network 運用

trafshow

投稿日:2006年10月3日

Last Updated on 2012年6月21日 by かんりにん

[pukiwiki]

#topicpath

#contents

*trafshow [#u9455f3e]

トラフィック・モニターtrafshowのインストールと動作具合をテスト。
//ググっても情報少ないのできつめかも。

[本家ページ]※ロシア語
http://soft.risp.ru/trafshow/index.shtml

[英語ページ]
http://soft.risp.ru/trafshow/index_en.shtml

[ダウンロードページ]
http://soft.risp.ru/download.shtml

**ダウンロード/インストール [#s0eebeef]
よくわからないので、ヘルプを見つつオプションをつけずにビルドしてみる。
# pwd
/usr/local/src
# wget ftp://ftp.nsk.su/pub/RinetSoftware/trafshow-4.0.tgz
# tar -zxvf trafshow-4.0.tgz
# cd trafshow-5.2.3/ ←アーカイブのバージョン名と展開したバージ ョンが違う…
# ./configure
# make
# make install
./install-sh -c -s -m 555 -o bin -g bin trafshow /usr/local/bin/trafshow
./install-sh -c -m 444 -o bin -g bin trafshow.1 /usr/local/man/man1/trafshow.1
[ -f /etc/trafshow ] || ./install-sh -c -m 444 .trafshow /etc/trafshow
#
make installを見ると、設定ファイル、バイナリ、マニュアルをそれぞれに展開して完了。
割りとインストールでの手間はなかった。

**動作テスト [#a00b2dc3]
/usr/local/binにバイナリがおかれているので、シェルからパスなしで実行OK。
オプションを指定しない場合は最初にIFの選択画面が出る。

# trafshow →Enterキー

-インターフェースの選択
オプションなしで起動した場合の最初の画面。
インターフェースを選択してEnterキーを押すとnetstatと同じ情報が出力される。
Interface Address Description
===========================================================================================================
eth0 0:c:29:96:be:af 192.168.0.4 Ethernet
lo 127.0.0.1 Loopback

===========================================================================================================

-出力結果
インターフェースを選択してEnterキーを押すとnetstatと同じ情報が出力され、1秒ごとに更新される。
Source Destination Protocol Size CPS
===========================================================================================================
a123.example.com,ssh b456.example.com,1211 tcp 14K 445
nkabe.example.com,netbios-dg 192.168.0.255,netbios-dg udp 2422 178
dev613.example.com,netbios-dg 192.168.0.255,netbios-dg udp 1471 199
dell2.sms.example.com,netbios-dg 192.168.0.255,netbios-dg udp 1309 228
b456.example.com,1211 a123.example.com,ssh tcp 756 20
mail.example.com,domain a123.example.com,32792 udp 496 44
00:b0:d0:2d:**:** broadcast arp 480 59
192.168.0.137,netbios-dg 192.168.0.255,netbios-dg udp 432 229
mktg.example.com,netbios-dg 192.168.0.255,netbios-dg udp 430 165
00:0f:1f:3b:**:** 01:80:c2:00:00:00 stp 420 27
foo.a.host.example.com,netbios-ns 192.168.0.255,netbios-ns udp 312 105
0*:**:6*:3f:**:** broadcast arp 300 58
**:01:*3:**:**:** broadcast arp 240 234
**:01:8*:*7:**:** broadcast arp 240 58
foo.a.host.example.com,netbios-ns 192.168.0.255,netbios-ns udp 234 146
192.168.***.5,netbios-dg 192.168.0.255,netbios-dg udp 220
a123.example.com,32792 mail.example.com,domain udp 289 9
192.168.2.***,netbios-dg 192.168.0.255,netbios-dg udp 215
00:14:22:73:**:** broadcast arp 212 15
mail.example.com,domain a123.example.com,32791 udp 182
mail.example.com,domain a123.example.com,32790 udp 182
mail.example.com,domain a123.example.com,32786 udp 179
mail.example.com,domain a123.example.com,32785 udp 179
mail.example.com,domain a123.example.com,32787 udp 179
mail.example.com,domain a123.example.com,32789 udp 176
mail.example.com,domain a123.example.com,32788 udp 136
b456.example.com,2273 nkabe.example.com,netbios-ss tcp 133
===========================================================================================================
eth0 92 Flows Total: 31K 4155

**参考[コマンドラインオプション] [#we8f3347]
コマンドラインでのオプションは以下のような感じ(要訳)

# trafshow –help
Usage:
trafshow [-vpnb] [-a len] [-c conf] [-i ifname] [-s str] [-u port] [-R refresh] [-P purge] [-F file | expr]
Where:
-v Print version number, compile-time definitions, and exit
-p Don’t put the interface(s) into promiscuous mode
-n Don’t convert numeric values to names
-b To place a backflow near to the main stream
-a len To aggregate IP addresses using the prefix length
-c conf Color config file instead of default /etc/trafshow
-i ifname Network interface name; all by default
-s str To search & follow for string in the list show
-u port UDP port number to listen for Cisco Netflow; default 9995
-R refresh Set the refresh-period of data show to seconds; default 2 sec
-P purge Set the expired data purge-period to seconds; default 10 sec
-F file Use file as input for the filter expression
expr Filter expression; see tcpdump(1) for syntax
[/pukiwiki]

-infra, network, 運用
-,

執筆者:


comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA


関連記事

no image

オープンソースのWebロードバランサー(に使えるミドルウェア)をいろいろ調べてみる

  お客さんのWebシステムをハウジング環境からAWSへ移行するにあたり、一部のサイトにおいて仕様上ELBを使えない状況になってしまい、代替の方法を考える必要が出てきてしまった… ELB以外でロードバ …

no image

lsyncdのエラー修正(監視対象ファイル数の上限値変更)

lsyncdでのバックアップファイルの同期がうまくいってないな~、と思って調べたら、カーネルパラメータ”max_user_watches”の上限値を超えたためlsyncdのプロ …

no image

[Juniper]SRX アカウント設定いろいろ

SRXシリーズでのアカウントの各種設定をメモ書き。 コマンドラインから操作する場合は、原則configureモードで行う。 参考:お世話になっております! SRX Getting Started &# …

no image

USB接続HDDのマウント(Linux)

[pukiwiki] 久しぶりにパーティション切ってフォーマットしようとしたら やり方を忘れてしまっていた… たまにしかやらないので手順を忘れやすい為、メモしとく(自分用にw)。 :OS|CentOS …

no image

インフラ運用の心得:最低限やっておくこと

[pukiwiki] #contents *インフラ運用に最低限やっておくこと [#m5d8ab99] 以下の整備については、”呼吸するのと同じくらい当たり前のこと”としてやっ …