System Utilities

Use these M4500 CLI commands to manage files, erase configurations, reload the switch, set the hostname and CLI banner, and verify files.

This section describes the commands you use to help troubleshoot connectivity issues and to restore various configurations to their factory defaults.

delete

This command deletes the backup image file from the permanent storage or the core dump file from the local file system.

Format delete {backup | core-dump-file {<filename> | all}}
Mode Privileged EXEC

erase application

This command erases the application file from the permanent storage.

Format erase application <filename>
Mode Privileged EXEC

erase startup-config

This command erases the startup-config from the permanent storage.

Format erase startup-config
Mode Privileged EXEC

erase user public key

This command erases an assigned SSH user public key from the permanent storage, and it only allows user “admin” or public key owner to execute this command.

Format erase user-public-key <username>
Mode Privileged EXEC

dir

Use this command to list the files in the directory /mnt/fastpath in flash from the CLI.

Format dir
Mode Privileged EXEC

Example: The following shows an example of dir.

CODE
(M4500-32C) #dir

      2  drwx                       4096 Mar 13 2000 10:24:58 .
     12  drwx                       0 Mar 11 2000 06:26:20 ..
     11  drwx                       16384 Feb 13 2000 11:38:49 lost+found
     12  -rw-                       62284359 Feb 13 2000 11:39:26 image1
     13  -rw-                       62268250 Mar 13 2000 10:24:58 image2
     14  -rw-                       668 Feb 19 2000 05:07:47 ssh_host_dsa_key
     15  -rw-                       891 Feb 19 2000 05:07:39 ssh_host_rsa_key
     16  -rw-                       222 Feb 19 2000 05:07:39 ssh_host_rsa_key.pub
     17  -rw-                       525 Feb 19 2000 05:07:39 ssh_host_key
     18  -rw-                       330 Feb 19 2000 05:07:39 ssh_host_key.pub
     19  -rw-                       598 Feb 19 2000 05:07:47 ssh_host_dsa_key.pub
     20  -rw-                       5 Feb 13 2000 11:41:15 sshkey
  26241  drwx                       4096 Feb 13 2000 11:41:21 ruby
 371681  drwx                       4096 Feb 13 2000 11:41:23 bootstrap
 379761  drwx                       4096 Feb 13 2000 11:41:53 usr
 121201  drwx                       4096 Feb 13 2000 11:42:06 python
 428241  drwx                       4096 Feb 13 2000 11:42:06 dstat
     21  -rw-                       0 Mar 11 2000 06:26:39 fluent.conf
     22  -rwx                       10 Feb 13 2000 11:42:08 user.start
 436321  drwx                       4096 Feb 13 2000 11:42:08 crashlogs
     23  -rw-                       16328 Mar 11 2000 06:26:40 log2.bin
     36  -rw-                       5 Mar 11 2000 06:26:23 ologNdx0.txt
     25  -rw-                       0 Mar 05 2000 12:48:11 slog2.txt
     33  -rw-                       5 Mar 09 2000 06:05:18 ologNdx1.txt
     27  -rw-                       172 Feb 13 2000 11:42:25 hpc_port_broad.cfg
 395921  drwx                       4096 Mar 11 2000 08:45:59 user-apps
     28  -rw-                       413 Mar 11 2000 06:26:38 coredump_regular_config
     29  -rw-                       72 Mar 11 2000 06:26:38 coredump_regular_config.md5sum
     30  -rw-                       96 Mar 11 2000 06:26:40 snmpOprData.cfg
     31  -rw-                       156 Feb 13 2000 11:42:44 dh512.pem
     32  -rw-                       245 Feb 13 2000 11:42:44 dh1024.pem
     26  -rw-                       0 Mar 05 2000 12:48:11 olog2.txt
     34  -rw-                       0 Mar 09 2000 06:05:18 slog1.txt
     24  -rw-                       5 Mar 05 2000 12:48:11 ologNdx2.txt
     35  -rw-                       0 Mar 09 2000 06:05:18 olog1.txt
     37  -rw-                       0 Mar 11 2000 06:26:23 slog0.txt
     38  -rw-                       0 Mar 11 2000 06:26:23 olog0.txt
     39  -rw-                       64 Mar 11 2000 06:26:23 logNvmSave.bin
     40  -rw-                       2401 Mar 11 2000 06:24:45 fastpath.cfg
     41  -rw-                       678 Mar 11 2000 06:24:47 startup-config

Total Size: 3646722048
Bytes Free: 3354427392

show bootvar

This command is used to display which image was booted when the system powered up.

Format show bootvar
Mode Privileged EXEC

Example: The following shows an example of this command.

CODE
(M4500-32C) #show bootvar
Image Descriptions
 active :
 backup :
 Images currently available on Flash
 ------  ------------  ------------  ---------------------  -----------------
 unit       active        backup        current-active        next-active
 ------  ------------  ------------  ---------------------  -----------------
    1      7.0.0.11     <none>             7.0.0.11             7.0.0.11

reload

This command resets the switch without powering it off. Reset means that all network connections are terminated and the boot code executes. The switch uses the stored configuration to initialize the switch. You are prompted to confirm that the reset should proceed. The LEDs on the switch indicate a successful reset.

If ONIE is installed, the os parameter is added to the reload command. This parameter enables the user to boot back into ONIE.

Default None
Format reload [warm | configuration [scriptname] | os]
Mode Privileged Exec
Parameter Definition
warm When the Warm Reload feature is present, the reload command adds the warm option. This option reduces the time it takes to reboot a Linux switch, thereby reducing the traffic disruption in the network during a switch reboot. For a typical Linux Enterprise switch, the traffic disruption is reduced from about two minutes for a cold reboot to about 20 seconds for a warm reboot. Note: The Warm Reload starts only the application process. The Warm Reload does not restart the boot code, the Linux kernel and the root file system. Since the Warm Reload does not restart all components, some code upgrades require that customers perform a cold reboot. Note: Warm resets can only be initiated by the administrator and do not occur automatically.
configuration Gracefully reloads the configuration. If no configuration file is specified, the startup-config file is loaded.
scriptname The configuration file to load. The scriptname must include the extension.
os Caution! Resets the switch and starts ONIE. Prepare to reinstall the OS.

configure

This command is used to activate global configuration mode.

Default None
Format Configure
Mode Privileged Exec

disconnect

This command is used to close a remote console session.

Default None
Format disconnect {<0-30> | all}
Mode Privileged Exec
Parameter Definition
<0-30> Remote session ID.
all All remote sessions.

hostname

This command is used to set the system hostname. It also changes the prompt string. The length of name is up to 64 alphanumeric, case-sensitive characters.

Default M4500-32C or M4500-48XF8C
Format hostname <hostname>
Mode Global Config

quit

This command is used to exit a CLI session.

Default None
Format quit
Mode Privileged Exec

set clibanner

This command is used to set the pre-login CLI banner before displaying the login prompt.

Default None
Format set clibanner <line>
Mode Global Config
Parameter Description
line Banner text where “” (double quote) is a delimiting character. The banner message can be up to 2000 characters.

no set clibanner

This command unconfigures the pre-login CLI banner.

Format no set clibanner
Mode Global Config

show clibanner

Use this command to display the configured pre-login CLI banner. The pre-login banner is the text that displays before displaying the CLI prompt.

Default No contents to display before displaying the login prompt.
Format show clibanner
Mode Privileged Exec

file verify

This command enables digital signature verification while a configuration script file is downloaded to the switch.

Format file verify {script | none}

no file verify

Default None
Mode Global Config
Fields Definition
script Verify the digital signature of configuration script files.
none Disable digital signature verification for configuration script files.