Solaris のシステム管理 (セキュリティサービス)

Procedurenot_terminated 監査ファイルを整理する方法

監査ファイルが開いている状態で監査デーモンが終了することがあります。また、サーバーがアクセス不能になって、強制的に別のサーバーに切り替わってしまうことがあります。このような場合、その監査ファイルは監査レコードとして使用されなくなりますが、監査ファイルの終了タイムスタンプとして文字列 not_terminated が付いたままになります。auditreduce -O コマンドを使用して、ファイルに正しいタイムスタンプを付けます。

  1. 監査ファイル上の not_terminated 文字列が付いたファイルを作成順に一覧表示します。


    # ls -R1t audit-directory*/files/* | grep not_terminated
    -R

    サブディレクトリ内のファイルを一覧表示します。

    -t

    最新のファイルからもっとも古いファイルの順で一覧表示します。

    -1

    1 列でファイルを一覧表示します。

  2. 古い not_terminated ファイルを整理します。

    古いファイルの名前を auditreduce -O コマンドに指定します。


    # auditreduce -O system-name old-not-terminated-file
    
  3. 古い not_terminated ファイルを削除します。


    # rm system-name old-not-terminated-file
    

例 30–38 閉じた not_terminated 監査ファイルを整理する

次の例では、not_terminated ファイルを検索し、名前を変更して、元のファイルを削除します。


ls -R1t */files/* | grep not_terminated
…/egret.1/20030908162220.not_terminated.egret
…/egret.1/20030827215359.not_terminated.egret
# cd */files/egret.1
# auditreduce -O egret 20030908162220.not_terminated.egret
# ls -1t
20030908162220.not_terminated.egret Current audit file
20030827230920.20030830000909.egret Input (old) audit file
20030827215359.not_terminated.egret
# rm 20030827215359.not_terminated.egret
# ls -1t
20030908162220.not_terminated.egret Current audit file
20030827230920.20030830000909.egret Cleaned up audit file

新しいファイルの開始タイムスタンプは、not_terminated ファイル内にある最初の監査イベントの時間を反映します。終了タイムスタンプは、そのファイル内にある最後の監査ファイルの時間を反映します。