Crash and Log File Maintenance

package-crashfiles

Users may want to transfer the crash files to a separate device for analysis or storage. To facilitate this removal, use the package-crashfiles command to compress multiple crash files into a single file while preserving the timestamps. The syntax for the package-crashfiles command is:

package-crashfiles [name <file>.tar.gz] [newer-than <days>]

The package-crashfiles command takes two arguments:

  • name—Specify the path and name of the saved file. Generally, the files should be saved to /opt. If the system’s hard drive has been formatted with partitions, /mnt may be used instead. For example:
    ORACLE# package-crashfiles name /opt/crash/recentcrashes.tar.gz
    Tar/gzip file /opt/crash/recentcrashes.tar.gz to include 6 files of 1 MiB (uncompressed)
    Proceed? [y/n]?: y
    Tar/gzip file created /opt/crash/recentcrashes.tar.gz with 6 files with final size 169 kiB
    ORACLE#

    If the name argument is omitted, the Oracle Communications Session Border Controller saves the compressed crash files to a file named crash-<date>.tar.gz, where <date> is the current date.

    ORACLE# package-crashfiles
    Tar/gzip file /code/crash/crash-130529.tar.gz to include 6 files of 1 MiB (uncompressed)
    Proceed? [y/n]?: y
    Tar/gzip file created /code/crash/crash-130529.tar.gz with 6 files with final size 169 kiB
    ORACLE#
  • newer-than—Specify a time limit, in days, on the crash files to be compressed and saved. This option counts backwards, starting with the current day. Thus the option newer-than 5 would compress and save crash files for the past 5 days only.
    ORACLE# package-crashfiles name /opt/crash/recentcrashes.tar.gz newer-than 5
    Tar/gzip file /opt/crash/recentcrashes.tar.gz to include 6 files of 1 MiB (uncompressed)
    Proceed? [y/n]?: y
    Tar/gzip file created /opt/crash/recentcrashes.tar.gz with 6 files with final size 169 kiB
    ORACLE#

    If the newer-than argument is omitted, the Oracle Communications Session Border Controller compresses and saves all crash files.

To preserve system resources, users should remove the compressed file as soon as possible.

delete-crashfiles

The delete-crashfiles command deletes all closed crash-files located in the /opt/crash directory. You may specify the age of the crash-files to delete. The command is entered as

delete-crashfile all

or

delete-crashfile older-than <days>

package-logfiles

Users may want to transfer the log files to a separate device for analysis or storage. To facilitate this removal, use the package-logfiles command to compress multiple log files into a single file while preserving the timestamps. The syntax for the package-logfiles command is:

package-logfiles [name <file>.tar.gz] [newer-than <days>]

The package-logfiles command takes two arguments:

  • name—Specify the path and name of the saved file. Generally, the files should be saved to /opt. If the system’s hard drive has been formatted with partitions, /mnt may be used instead. For example:
    ORACLE# package-logfiles name /opt/logs/recentlogs.tar.gz
    Tar/gzip file /opt/logs/recentlogs.tar.gz to include 61 files of 447 kiB (uncompressed)
    Proceed? [y/n]?: y
    Tar/gzip file created /opt/logs/recentlogs.tar.gz with 61 files with final size 62 kiB
    ORACLE#

    If the name argument is omitted, the Oracle Communications Session Border Controller saves the compressed log files to a file named logs-<date>.tar.gz, where <date> is the current date.

    ORACLE# package-logfiles
    Tar/gzip file /opt/logs/logs-130528.tar.gz to include 61 files of 447 kiB (uncompressed)
    Proceed? [y/n]?: y
    Tar/gzip file created /opt/logs/logs-130528.tar.gz with 61 files with final size 62 kiB
    ORACLE#
  • newer-than—Specify a time limit, in days, on log files to be compressed and saved. This option counts backwards, starting with the current day. Thus the option newer-than 5 would compress and save log files for the past 5 days only.
    ORACLE# package-logfiles name /opt/logs/5dlogs.tar.gz newer-than 5
    Tar/gzip file /opt/logs/5dlogs.tar.gz to include 61 files of 271 kiB (uncompressed)
    Proceed? [y/n]?: y
    Tar/gzip file created /opt/logs/5dlogs.tar.gz with 61 files with final size 45 kiB
    ORACLE#

    If the newer-than argument is omitted, the Oracle Communications Session Border Controller compresses and saves all log files.

To preserve system resources, users should remove the compressed file as soon as possible.

delete-logfiles

The delete-logfiles command deletes all closed log-files located in the /opt/logs directory. Files currently being written to remain untouched. You may specify the age of the log-files to delete. The command is entered as

delete-logfile all

or

delete-logfile older-than <days>