request system storage cleanup (Junos OS Evolved)
Syntax
request system storage cleanup (dry-run | force-deep | no-confirm)
Description
Use this command to free storage space on the router or switch by rotating log files and proposing a list of files for deletion.
The Junos OS Evolved implementation
of the request system storage cleanup command is slightly different from
the implementation on Junos OS:
-
The system prompts you to specify the
dry-runoption:Please check the list of files to be deleted using the dry-run option. Continue anyway without checking? [yes,no] (yes)
-
When you issue the
request system storage cleanupcommand, Junos OS Evolved displays the types of files to be deleted. See the Sample Output section below for an example. -
Prior to Junos OS Evolved Release 20.1R1, the command cleans up any ISO files on the system, rotates system log files, and clears trace files. It does not remove user-created files. Starting in Junos OS Evolved Release 20.1R1, this command does not remove ISO images from the system. It removes all core files, log files from /var/log/, and all /var/log/* files. To remove old images from the device, use the
request system software deletecommand. -
In Junos OS Evolved, the system computes the available space and emits o/p on console for reference.
In Junos OS Evolved, the request system storage cleanup | display xml rpc
command displays different XML tags for different file types. In Junos OS, the command
displays only the file tag for all types of files. For more information
about the differences between Junos OS and Junos OS Evolved, see How Junos OS Evolved Differs from Junos OS.
Options
| dry-run |
(Prompted if not specified) List the files proposed for deletion (without deleting the files). |
| force-deep |
(Optional) Deep clean all temporary files and rotate logs. This option cleans up all the user-created files under the /tmp and /var/tmp directories. |
| no-confirm |
(Optional) Do not ask for confirmation before doing the cleanup. |
Additional Information
If logging is configured and being used, the dry-run option rotates the
log files. In that case, the output displays the message “Currently rotating log files,
please wait”. If no logging is currently under way, the output displays only a list of files
to delete.
Required Privilege Level
maintenance
Sample Output
- request system storage cleanup (Junos OS Evolved)
- request system storage cleanup dry-run (Junos OS Evolved)
- request system storage cleanup force-deep (Junos OS Evolved)
request system storage cleanup (Junos OS Evolved)
user@host-re0> request system storage cleanup
Please check the list of files to be deleted using the dry-run option.
Continue anyway without checking? [yes,no] (no) yes
-------------------------------
node: fpc0
-------------------------------
Clearing all core files
Clearing all local host core files and files from /var/log/watchdog
Clearing node specific core files
Clearing FPC log files
Clearing logical-systems log files
Clearing journal logs
Clearing all /var/log/* files
Size Date Name
4.0K Tue Feb 2 13:32 /var/log/beacon_getconfid.log
4.0K Tue Feb 2 13:32 /var/log/beacon_set_dhcpd.log
4.0K Tue Feb 2 13:31 /var/log/boot_init.log
556K Tue Feb 2 13:37 /var/log/evo-cda-bt.log
8.0K Tue Feb 2 13:32 /var/log/evoinit.log
0 Tue Feb 2 13:31 /var/log/ftp_fail
4.0K Tue Feb 2 13:32 /var/log/imgd.log
0 Tue Feb 2 13:31 /var/log/interactive-commands
0 Tue Feb 2 13:33 /var/log/mcelog.log
4.0K Tue Feb 2 13:33 /var/log/mem_mgmt.log
0 Tue Feb 2 13:32 /var/log/mem_monitor.dat
0 Tue Feb 2 13:31 /var/log/messages
4.0K Tue Feb 2 13:32 /var/log/mstr.log
4.0K Tue Feb 2 13:32 /var/log/mstr_change.log
292K Tue Feb 2 13:37 /var/log/ofp-packet.log
688K Tue Feb 2 13:37 /var/log/ofp.log
680K Tue Feb 2 13:37 /var/log/picd.log
40K Tue Feb 2 13:32 /var/log/sinet.log
4.0K Tue Feb 2 13:32 /var/log/ss.log
4.0K Tue Feb 2 13:37 /var/log/storageCleanup.log
4.0K Tue Feb 2 13:32 /var/log/sysconfig.log
60K Tue Feb 2 13:32 /var/log/sysepochman.log
4.0K Tue Feb 2 13:32 /var/log/sysstart.log
72K Tue Feb 2 13:32 /var/log/uswitch.log
68K Tue Feb 2 13:31 /var/log/uswitch.log.prev
4.0K Tue Feb 2 13:32 /var/log/wtmp
Clearing all JSON files in /var/log/objmon
busy with previous request.
Clearing SI traces
Removing any ISO files in /data
Current space available in /soft: 4233300 K and /data: 69765 K
-------------------------------
node: re0
-------------------------------
Clearing all core files
Clearing all local host core files and files from /var/log/watchdog
Clearing node specific core files
Clearing FPC log files
Clearing logical-systems log files
Clearing journal logs
Clearing all /var/log/* files
Size Date Name
4.0K Tue Feb 2 13:28 /var/log/__policy_names_rpdc__
4.0K Tue Feb 2 13:32 /var/log/__policy_names_rpdn__
8.0K Tue Feb 2 13:32 /var/log/alarm-mgmtd
4.0K Tue Feb 2 13:28 /var/log/beacon_getconfid.log
48K Tue Feb 2 13:27 /var/log/beacon_mountVersion.log
4.0K Tue Feb 2 13:29 /var/log/beacon_set_dhcpd.log
4.0K Tue Feb 2 13:28 /var/log/boot_init.log
4.0K Tue Feb 2 13:31 /var/log/charonctl_trace.log
4.0K Tue Feb 2 13:27 /var/log/check_restore_recovery_bios.log
4.0K Tue Feb 2 13:32 /var/log/clksynced.log
84K Tue Feb 2 13:32 /var/log/configd-streamer.log
4.0K Tue Feb 2 13:31 /var/log/copy_other_re_keys.log
4.0K Tue Feb 2 13:37 /var/log/core_mgr.log
0 Tue Feb 2 13:28 /var/log/cscript.log
4.0K Tue Feb 2 13:32 /var/log/ddosd.log
4.0K Tue Feb 2 13:31 /var/log/disk_mgmt
4.0K Tue Feb 2 13:31 /var/log/evo_dns_relay.log
8.0K Tue Feb 2 13:28 /var/log/evoinit.log
12K Tue Feb 2 13:36 /var/log/fibd-proxy.log
12K Tue Feb 2 13:31 /var/log/imgd.log
32K Tue Feb 2 13:33 /var/log/interactive-commands
28K Tue Feb 2 13:37 /var/log/kfirewall-agent.log
0 Tue Feb 2 13:32 /var/log/mcelog.log
8.0K Tue Feb 2 13:32 /var/log/mem_mgmt.log
0 Tue Feb 2 13:31 /var/log/mem_monitor.dat
128K Tue Feb 2 13:37 /var/log/messages
0 Tue Feb 2 13:31 /var/log/mgd-api
4.0K Tue Feb 2 13:28 /var/log/mgmt-ethd-helper.log
84K Tue Feb 2 13:33 /var/log/mib2d
12K Tue Feb 2 13:33 /var/log/mirrord.log
4.0K Tue Feb 2 13:28 /var/log/mstr.log
4.0K Tue Feb 2 13:28 /var/log/mstr_change.log
464K Tue Feb 2 13:37 /var/log/ofp-packet.log
984K Tue Feb 2 13:37 /var/log/ofp.log
48K Tue Feb 2 13:27 /var/log/postinstall.log
4.0K Tue Feb 2 13:37 /var/log/security
4.0K Tue Feb 2 13:28 /var/log/set_mgmt_mac.log
68K Tue Feb 2 13:28 /var/log/sinet.log
16K Tue Feb 2 13:33 /var/log/snmpd
4.0K Tue Feb 2 13:31 /var/log/ss.log
4.0K Tue Feb 2 13:31 /var/log/ssh-key-utils.log
4.0K Tue Feb 2 13:37 /var/log/storageCleanup.log
4.0K Tue Feb 2 13:31 /var/log/sync_other_re.log
4.0K Tue Feb 2 13:28 /var/log/sysconfig.log
552K Tue Feb 2 13:32 /var/log/sysepochman.log
4.0K Tue Feb 2 13:28 /var/log/sysstart.log
4.0K Tue Feb 2 13:33 /var/log/system-events
84K Tue Feb 2 13:28 /var/log/uswitch.log
88K Tue Feb 2 13:26 /var/log/uswitch.log.prev
8.0K Tue Feb 2 13:31 /var/log/validator_debug.log
4.0K Tue Feb 2 13:33 /var/log/vrf.log
8.0K Tue Feb 2 13:36 /var/log/wtmp
4.0K Tue Feb 2 13:32 /var/log/xferlog
364K Tue Feb 2 13:37 /var/log/zookeeper--server-host-re0.log
4.0K Tue Feb 2 13:29 /var/log/zookeeper--server-host-re0.out
4.0K Tue Feb 2 13:33 /var/log/ztp.log
Clearing all JSON files in /var/log/objmon
Cleared traces for application all node all pid all
Clearing SI traces
Removing any ISO files in /data
Current space available in /soft: 14158432 K and /data: 2857732 K
-------------------------------
node: re1
-------------------------------
Clearing all core files
Clearing all local host core files and files from /var/log/watchdog
Clearing node specific core files
Clearing FPC log files
Clearing logical-systems log files
Clearing journal logs
Clearing all /var/log/* files
Size Date Name
4.0K Tue Feb 2 13:32 /var/log/__policy_names_rpdc__
4.0K Tue Feb 2 13:31 /var/log/alarm-mgmtd
4.0K Tue Feb 2 13:29 /var/log/beacon_getconfid.log
48K Tue Feb 2 13:27 /var/log/beacon_mountVersion.log
4.0K Tue Feb 2 13:29 /var/log/beacon_set_dhcpd.log
4.0K Tue Feb 2 13:28 /var/log/boot_init.log
4.0K Tue Feb 2 13:31 /var/log/charonctl_trace.log
4.0K Tue Feb 2 13:28 /var/log/check_restore_recovery_bios.log
12K Tue Feb 2 13:32 /var/log/copy_other_re_keys.log
4.0K Tue Feb 2 13:32 /var/log/core_mgr.log
0 Tue Feb 2 13:28 /var/log/cscript.log
4.0K Tue Feb 2 13:31 /var/log/disk_mgmt
4.0K Tue Feb 2 13:31 /var/log/evo_dns_relay.log
8.0K Tue Feb 2 13:31 /var/log/evoinit.log
24K Tue Feb 2 13:37 /var/log/fibd-proxy.log
4.0K Tue Feb 2 13:29 /var/log/imgd.log
0 Tue Feb 2 13:28 /var/log/interactive-commands
24K Tue Feb 2 13:37 /var/log/kfirewall-agent.log
0 Tue Feb 2 13:32 /var/log/mcelog.log
4.0K Tue Feb 2 13:31 /var/log/mem_mgmt.log
0 Tue Feb 2 13:31 /var/log/mem_monitor.dat
0 Tue Feb 2 13:32 /var/log/messages
4.0K Tue Feb 2 13:31 /var/log/mgmt-ethd-helper.log
4.0K Tue Feb 2 13:31 /var/log/mib2d
4.0K Tue Feb 2 13:28 /var/log/mstr.log
4.0K Tue Feb 2 13:28 /var/log/mstr_change.log
444K Tue Feb 2 13:37 /var/log/ofp-packet.log
1016K Tue Feb 2 13:37 /var/log/ofp.log
48K Tue Feb 2 13:28 /var/log/postinstall.log
0 Tue Feb 2 13:32 /var/log/security
4.0K Tue Feb 2 13:28 /var/log/set_mgmt_mac.log
68K Tue Feb 2 13:28 /var/log/sinet.log
4.0K Tue Feb 2 13:31 /var/log/snmpd
4.0K Tue Feb 2 13:31 /var/log/ss.log
8.0K Tue Feb 2 13:32 /var/log/ssh-key-utils.log
4.0K Tue Feb 2 13:37 /var/log/storageCleanup.log
4.0K Tue Feb 2 13:32 /var/log/sync_other_re.log
4.0K Tue Feb 2 13:28 /var/log/sysconfig.log
204K Tue Feb 2 13:32 /var/log/sysepochman.log
4.0K Tue Feb 2 13:28 /var/log/sysstart.log
0 Tue Feb 2 13:32 /var/log/system-events
84K Tue Feb 2 13:29 /var/log/uswitch.log
88K Tue Feb 2 13:26 /var/log/uswitch.log.prev
12K Tue Feb 2 13:32 /var/log/validator_debug.log
4.0K Tue Feb 2 13:33 /var/log/vrf.log
8.0K Tue Feb 2 13:33 /var/log/wtmp
4.0K Tue Feb 2 13:31 /var/log/xferlog
88K Tue Feb 2 13:37 /var/log/zookeeper--server-host-re1.log
4.0K Tue Feb 2 13:29 /var/log/zookeeper--server-host-re1.out
Clearing all JSON files in /var/log/objmon
Cleared traces for application all node all pid all
Clearing SI traces
Removing any ISO files in /data
Current space available in /soft: 14158432 K and /data: 2775780 K
{master}
user@host-re0>
request system storage cleanup dry-run (Junos OS Evolved)
user@host> request system storage cleanup dry-run
-------------------------------
node: re0
-------------------------------
List of all core files to be cleared:
List of local_host core files to be cleared:
List of core sub directory files to be cleared:
List of log files from FPCs to be cleared:
List of log files from logical systems to be cleared:
Clears all App logs, App traces, App SI traces and App core files from /var/log/*, /var/log/traces/*, /var/log/si_traces/* and /var/core/*
Clears all JSON files in /var/log/objmon/ during cleanup
List of ISO files from /data partition to be cleared:
Current list of software versions installed
Removes older software versions - Minimum two versions would be left around
Active boot device is primary : /dev/vda
List of installed version(s) :
'-' running version
'>' next boot version after upgrade/downgrade
'<' rollback boot version
- junos-evo-install-ptx-fixed-x86-64-20.1-201911201458.0-EVO - [2019-11-21 11:23:21]request system storage cleanup force-deep (Junos OS Evolved)
user@host> request system storage cleanup force-deep Please check the list of files to be deleted using the dry-run option. Continue anyway without checking? [yes,no] (no) yes ------------------------------- node: re0 ------------------------------- ........ ========= Start cleanup now ========== === Start removing other logs, traces, core files === Clearing core files Clearing FPC logs Clearing logical-systems logs === Clearing journal logs === Clearing log: /var/log/RE_journal.log Clearing log: /var/log/RE_journal_boot.log Clearing log: /var/log/alarm-mgmtd Clearing log: /var/log/appDemo_stdout Clearing log: /var/log/charonctl_trace.log Clearing log: /var/log/configd-streamer.log Clearing log: /var/log/core_mgr.log Clearing log: /var/log/cscript.log Clearing log: /var/log/eth_linkmon.log Clearing log: /var/log/evo-cda-zx.log Clearing log: /var/log/evoinit.log Clearing log: /var/log/fibd-proxy.log Clearing log: /var/log/i2ctrace.log Clearing log: /var/log/i2ctrace_spmb0.log Clearing log: /var/log/i2ctrace_spmb1.log Clearing log: /var/log/icmpd.log Clearing log: /var/log/ifinfo.log Clearing log: /var/log/imgd_svr.log Clearing log: /var/log/install Clearing log: /var/log/interactive-commands Clearing log: /var/log/jsd Clearing log: /var/log/lastlog Clearing log: /var/log/mcelog.log Clearing log: /var/log/messages Clearing log: /var/log/mgd-api Clearing log: /var/log/mgmt-ethd-helper.log Clearing log: /var/log/mib2d Clearing log: /var/log/na-grpcd Clearing log: /var/log/objmon_sync.json Clearing log: /var/log/packetio-cout.log Clearing log: /var/log/picd.log Clearing log: /var/log/platform_mon.log Clearing log: /var/log/policerd.log Clearing log: /var/log/postinstall.log Clearing log: /var/log/ptp_fpga.log Clearing log: /var/log/reboot_node.log Clearing log: /var/log/rollback.log Clearing log: /var/log/security Clearing log: /var/log/semctl.log Clearing log: /var/log/set_mgmt_mac.log Clearing log: /var/log/shutdown_complete.log Clearing log: /var/log/sinet.log Clearing log: /var/log/smartd-attr-SFSA200GM3AA4TO_C_HC_636_JUN-000060139624B1000020.log Clearing log: /var/log/smartd-attr-SFSA200GM3AA4TO_C_HC_636_JUN-000060139624B1000022.log Clearing log: /var/log/snmpd Clearing log: /var/log/ss.log Clearing log: /var/log/ssh-key-utils.log Clearing log: /var/log/sshd_lua.log Clearing log: /var/log/sysconfig.log Clearing log: /var/log/sysman.conf Clearing log: /var/log/system-events Clearing log: /var/log/upgrade_master.log Clearing log: /var/log/uswitch.log Clearing log: /var/log/uswitch.log.prev Clearing log: /var/log/validator_debug.log Clearing log: /var/log/wtmp Clearing log: /var/log/zookeeper--server-re.log Clearing log: /var/log/zookeeper--server-re.out Clearing log: /var/log/ztp.log === Clearing all traces === === Clearing SI traces === === Removing other logs, traces, core files completed === === Started removing any ISO files in /data === Removing any ISO files in /data completed === Start Software versions cleanup === Removing older software versions except current and rollback === Software versions cleanup completed === ========= Cleanup done ========== Current space available in /soft: 12372572 K Current space available in /data: 2638752 K Cannot delete junos-evo-install-qfx-fixed-x86-64-18.3I20180906130134_mkamil - It is the rollback version Cannot delete junos-evo-install-qfx-fixed-x86-64-18.3-20180906.3 - It is the current version Removing version junos-evo-install-qfx-x86-64-16.2I20180516093649... Done.
Release Information
Command introduced in Junos OS Evolved Release 20.4R2.