キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 
cancel
2728
閲覧回数
10
いいね!
0
コメント
Kenichi Ogami
Cisco Employee
Cisco Employee

 

 

はじめに

本ドキュメントでは、CUCM (Cisco Unified Communications Manager) の utils network capture-rotate コマンドでパケットキャプチャを収集する方法を紹介します。

バージョン 10 以前は連続で 100000 パケットまでしかキャプチャできませんでしたが、バージョン 11.0(1) 以降はログローテーション機能が実装され、長期間のキャプチャが可能になりました。取得したパケットキャプチャは Wireshark ツールで確認することができます。

 

空き容量の確認

CUCM 上で取得されるパケットキャプチャは Common (Logging) パーティションに保存されます。事前に十分な空き容量があることを確認してください。

 

admin:show status

Host Name          : cucm110p
Date               : Mon Apr 25, 2016 22:54:09
Time Zone          : Japan Standard Time (Asia/Tokyo)
Locale             : en_US.UTF-8
Product Ver        : 11.0.1.10000-10
Unified OS Version : 6.0.0.0-2

Uptime:
 22:54:11 up 109 days, 11:44,  1 user,  load average: 1.63, 1.73, 1.70

CPU Idle:   44.44%  System:   24.24%    User:   30.81%
  IOWAIT:   00.51%     IRQ:   00.00%    Soft:   00.00%

Memory Total:        3925660K
        Free:         112196K
        Used:        3813464K
      Cached:         703684K
      Shared:         237188K
     Buffers:          60656K

                        Total            Free            Used
Disk/active         14154228K        1291616K       12717484K (91%)
Disk/inactive       14154228K       13393148K          35424K (1%)
Disk/logging        49573612K       27147136K       19901548K (43%)


 

utils network capture-rotate コマンド

コマンドの説明

SSH で CUCM にログインし、utils network capture-rotate コマンドによってパケットキャプチャを取得します。

 

引数の説明

<必須>

  • file:ファイル名(platform/cli/ 配下に保存されます)

<オプション>

  • sizePerFile:1ファイルあたりのファイルサイズ Mbyte(デフォルト 25 Mbyte)
  • maxFiles:最大ファイル数(デフォルト 10)
  • src:パケットの送信元アドレス
  • dest:パケットの宛先アドレス
  • port:ポート番号
  • host <ip/arp/rap/all>:ホスト IP Address

 

admin:utils network capture-rotate ?
Syntax:
utils network capture-rotate [options]
options  mandatory   file fname
options  optional    size bytes,sizePerFile megabytes, maxFiles num,src addr,dest addr,port num,host protocol addr

options are

file fname              - output the information to a file
    Note: The file will be saved in platform/cli/fname
          fname should not contain the "." character
size bytes              - the number of bytes of the packet to capture
    Note: Valid values include any number up to 65535 or ALL. The default will be ALL.
sizePerFile megabytes   - the sizePerFile sets the value for the size of the log files. ( Unit is millions of bytes )
    Note: The default value of sizePerFile is 25 MB.
maxFiles num            - the maxFiles indicates the maximum number of log files to be created.
    Note: The default value of maxFiles is 10.
src addr                - the source address of the packet as a host name or IPV4 address
dest addr               - the destination address of the packet as a host name or IPV4 address
port num                - the port number of the packet (either src or dest)
host protocol addr      - the protocol should be one of the following: ip/arp/rarp/all. The host address of the packet as a host name or IPV4 address. This option will display all packets to and fro that address.
    Note: If 'host' is provided, do not provide 'src' or 'dest'


 

コマンド実行例

 file 名に capture を指定した場合のコマンドの実行例は以下のとおりです。Ctrl-C でキャプチャを終了します。

 

1). ファイル名のみ指定

admin:utils network capture-rotate file capture

Available common partition disk space       26506M
Projected disk usage from capture           250M
Total common partition size                 48412M

Projected common partition utilization after capture is 40%.
The configured common partition low water mark is 90%.
For any given set of parameters, utilization must remain below 85%.

Note:
                Current disk utilization from packet captures is 248K.
                Packet captures will remain on disk until deleted.
                It is recommended to delete these captures periodically.
                    To list all captures, please run 'file list activelog platform/cli/*.cap*'
                    To download captures, please run 'file get activelog platform/cli/*.cap*'
                    To delete captures, please run   'file delete activelog platform/cli/*.cap*'

Executing command with options:
 size=65535              interface=eth0
 sizePerFile=25          maxFiles=10
 src=                    dest=
 port=                   ip=


Control-C pressed         <<< Ctrl-C で終了します。


 

2). ポート 5060、ホスト 192.168.99.1 以外を指定

(特定のホストを除外する場合は IP アドレスの前に ! を入力します)

admin:utils network capture-rotate file capture port 5060 host ip !192.168.99.1

Available common partition disk space       26496M
Projected disk usage from capture           250M
Total common partition size                 48412M

<省略>

Executing command with options:
 size=65535              interface=eth0
 sizePerFile=25          maxFiles=10
 src=                    dest=
 port=5060               ip=!192.168.99.1


 

3). ファイルサイズ 200 Mbyte、ファイル数 50

admin:utils network capture-rotate file capture sizePerFile 200 maxFiles 50

Available common partition disk space       26762M
Projected disk usage from capture           10000M
Total common partition size                 48412M

<省略>

Executing command with options:
 size=65535              interface=eth0
 sizePerFile=200         maxFiles=50
 src=                    dest=
 port=                   ip=


 

ファイルリスト表示

下記のコマンドでキャプチャファイルの一覧を表示できます。date detail オプションによって日付やサイズの情報を表示できます。

admin:file list activelog platform/cli/*.cap* date detail
25 Apr,2016 23:44:19           24  capture.cap0
dir count = 0, file count = 1
admin:

 

キャプチャファイル取得 (CLI)

下記のコマンドで CUCM から SFTP サーバにキャプチャファイルをダウンロードできます。

admin:file get activelog platform/cli/*.cap*
Please wait while the system is gathering files info ...done.
Sub-directories were not traversed.
Number of files affected: 1
Total size in Bytes: 406642
Total size in Kbytes: 397.11133
Would you like to proceed [y/n]? y
SFTP server IP: 192.168.99.1
SFTP server port [22]:
User ID: cisco
Password: *****
Download directory: /

The authenticity of host '192.168.99.1 (192.168.99.1)' can't be established.
RSA key fingerprint is fc:a8:a0:0f:85:c5:74:00:b8:4b:9d:33:02:e4:ce:ae.
Are you sure you want to continue connecting (yes/no)? yes
.
Transfer completed.
admin:

 

キャプチャファイル取得 (GUI)

RTMT (Real-Time Monitoring Tool) を起動します。System > Trace & Log Central で Collect Files 画面を開き、Packet Capture Logs にチェックをつけ、ログの期間を選択することによって、キャプチャファイルを取得することができます。

RTMT

 

RTMT2

 

キャプチャファイル削除

下記のコマンドでキャプチャファイルを削除できます。ファイルをダウンロードした後は削除しておくことを推奨します。

admin:file delete activelog platform/cli/*.cap*
Delete the File platform/cli/capture.cap0?
Enter "y" followed by return to continue: y
files: found = 1, deleted = 1
admin:

   

 

参考ドキュメント

 

 

 

 

 

 

Getting Started

検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう

シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします