J-series™ Services Router Administration Guide

Rotates log files—All information in the current log files is archived, old archives are deleted, and fresh log files are created.

Deletes log files in /var/log—Any files that are not currently being written to are deleted.

Deletes temporary files in /var/tmp—Any files that have not been accessed within two days are deleted.

Deletes all crash files in /var/crash—Any core files that the router has written during an error are deleted.

Deletes all software images (*.tgz files) in /var/sw/pkg—Any software images copied to this directory during software upgrades are deleted.

To rotate log files and delete unnecessary files with the CLI:

1.Enter operational mode in the CLI.

2.To rotate log files and identify the files that can be safely deleted, enter the following command:

user@host> request system storage cleanup

The router rotates log files and displays the files that you can delete.

3.Enter yes at the prompt to delete the files.

NOTE: You can issue the request system storage cleanup dry-runcommand to review the list of files that can be deleted with the request system storage cleanup command, without actually deleting the files.

Managing Accounting Files

If you configure your system to capture accounting data in log files, set the location for accounting files to the DRAM.

The default location for accounting files is the cfs/var/log directory on the compact flash. The nonpersistent option minimizes the read/write traffic to your compact flash. We recommend that you use the nonpersistent option for all accounting files configured on your system.

To store accounting log files in DRAM instead of the compact flash:

1.Enter the configuration mode in the CLI.

2.To create an accounting data log file in DRAM, enter the following command, replacing filename with the name of the file:

user@host> edit accounting-options file filename

3.To store accounting log files in the DRAM file, enter the following command:

202Managing Accounting Files

Page 224
Image 224
Juniper Networks J-Series manual Managing Accounting Files