Command introduced in JUNOS Release 7.4.
dry-run option introduced in JUNOS Release 7.6.
Free storage space on the router by rotating log files and proposing a list of files for deletion. User input is required for file deletion.
dry-run — (Optional) List files proposed for deletion (without deleting them).
If logging is configured and being used, the dry-run option will rotate the log files. In that case, the output displays the message “Currently rotating log files, please wait.” If no logging is currently underway, the output displays only a list of files to delete.
maintenance
When you enter this command, you are provided feedback on the status of your request.
request system storage cleanup dry-run
user@host> request system storage cleanup dry-run Currently rotating log files, please wait.
This operation can take up to a minute.
List of files to delete:
Size Date Name
11.4K Mar 8 15:00 /var/log/messages.1.gz
7245B Feb 5 15:00 /var/log/messages.3.gz
11.8K Feb 22 13:00 /var/log/messages.2.gz
3926B Mar 16 13:57 /var/log/messages.0.gz
3962B Feb 22 12:47 /var/log/sampled.1.gz
4146B Mar 8 12:20 /var/log/sampled.0.gz
4708B Dec 21 11:39 /var/log/sampled.2.gz
7068B Jan 16 18:00 /var/log/messages.4.gz
13.7K Dec 27 22:00 /var/log/messages.5.gz
890B Feb 22 17:22 /var/tmp/sampled.pkts
65.8M Oct 26 09:10 /var/sw/pkg/jinstall-7.4R1.7-export-signed.tgz
63.1M Oct 26 09:13 /var/sw/pkg/jbundle-7.4R1.7.tgz
request system storage cleanup
user@host> request system storage cleanup Currently rotating log files, please wait.
This operation can take up to a minute.
List of files to delete:
Size Date Name
11.4K Mar 8 15:00 /var/log/messages.1.gz
7245B Feb 5 15:00 /var/log/messages.3.gz
11.8K Feb 22 13:00 /var/log/messages.2.gz
3926B Mar 16 13:57 /var/log/messages.0.gz
11.6K Mar 8 15:00 /var/log/messages.5.gz
7254B Feb 5 15:00 /var/log/messages.6.gz
12.9K Feb 22 13:00 /var/log/messages.8.gz
3726B Mar 16 13:57 /var/log/messages.7.gz
3962B Feb 22 12:47 /var/log/sampled.1.gz
4146B Mar 8 12:20 /var/log/sampled.0.gz
4708B Dec 21 11:39 /var/log/sampled.2.gz
7068B Jan 16 18:00 /var/log/messages.4.gz
13.7K Dec 27 22:00 /var/log/messages.5.gz
890B Feb 22 17:22 /var/tmp/sampled.pkts
65.8M Oct 26 09:10 /var/sw/pkg/jinstall-7.4R1.7-export-signed.tgz
63.1M Oct 26 09:13 /var/sw/pkg/jbundle-7.4R1.7.tgz
Delete these files ? [yes,no] (yes)