traffic_logcat

概要

traffic_logcat [-o output-file | -a] [-CEHhjSVw2] [input-file ...]

解説

To analyze a binary log file using standard tools, you must first convert it to ASCII. traffic_logcat does exactly that.

traffic_logcat reads both version 2 and version 3 binary log segments. See Self-Describing Binary Log Format (v3) for the self-describing v3 format.

オプション

-o PATH, --output_file PATH

コマンドの出力先を記述します。

-a, --auto_filename

入力ファイル名に基づいて自動的に出力ファイル名を生成します。入力が標準入力である場合、このオプションは無視されます。例えば:

traffic_logcat -a squid-1.blog squid-2.blog squid-3.blog

次のファイルを生成します。

squid-1.log squid-2.log squid-3.log
-f, --follow

tail(1) -f のようにファイルを追跡します。

-C, --clf

可能な場合、入力を Netscape Common フォーマットに変換しようとします。

-E, --elf

可能な場合、入力を Netscape Extended フォーマットに変換しようとします。

-S, --squid

可能な場合、入力を Squid フォーマットに変換しようとします。

-2, --elf2

可能な場合、入力を Netscape Extended-2 フォーマットに変換しようとします。

-j, --json

Emits each entry as a JSON object, decoded directly from the self-describing v3 field-type schema (see Self-Describing Binary Log Format (v3)). Requires version 3 binary logs; version 2 segments lack the schema and are skipped with a note.

-H, --header

Prints the header of each binary log segment (version, format type, byte and entry counts, timestamps, log object signature, the format name/fieldlist/printf strings, source hostname, and log filename) instead of decoding entries. For version 3 segments the self-describing field-type schema is printed as well, pairing each field symbol with its framing type. Works for both version 2 and version 3 segments.

-T, --debug_tags
-w, --overwrite_output
-h, --help

使い方の情報を表示して終了します。

-V, --version

バージョン情報を表示して終了します。

注釈

-S-C-E-2 はいかなるときでもいずれか 1 つしか使用できません。

入力ファイルが指定されなかった場合、traffic_logcat は標準入力 ( stdin ) から読み込みます。出力ファイルを指定しなかった場合、 traffic_logcat は標準出力 ( stdout ) に書き込みます。

例えば、バイナリログファイルを ASCII に変換するために traffic_logcat コマンドと共に次のオプションのいずれかを使用することができます。

traffic_logcat binary_file > ascii_file
traffic_logcat -o ascii_file binary_file

バイナリログファイルはこのコマンドによって変更されません。

参照

tail(1)