Cisco IOS Configuration Fundamentals Command Reference, Release 12.2T
Router Memory Commands

Table Of Contents

Router Memory Commands

Flash Memory File System Types

fsck

memory sanity

memory scan

memory-size iomem

partition

scheduler heapcheck process

show (Flash file system)

show memory scan

write core

write memory

write network


Router Memory Commands


This chapter provides detailed descriptions of the commands used to maintain router memory.

For configuration information and examples, refer to the "Maintaining Router Memory" chapter in the Cisco IOS Configuration Fundamentals Configuration Guide, Release 12.2.

Flash Memory File System Types

Cisco platforms generally use one of three different Flash memory file system type. Some commands are supported on only one or two file system types.

Use Table 35 to determine which Flash memory file system type your platform uses.

Table 35 Flash Memory File System Types

Type
Platforms

Class A

Cisco 7000 family, Cisco 12000 series, LightStream LS1010 series

Class B

Cisco 1003, Cisco 1004, Cisco 1005, Cisco 2500 series, Cisco 3600 series, Cisco 4000 series, Cisco AS5200 access servers

Class C

Cisco MC3810 multiservice concentrators; disk0 and disk1 of Cisco SC3640 system controllers


fsck

To check a File Allocation Table (FAT)-based disk or Class C filesystem for damage and to repair any problems, use the fsck command in privileged EXEC mode.

fsck [/nocrc] filesystem: [/automatic]

Syntax Description

/nocrc

(Optional. This keyword is available for Class C Flash file systems only.)
Omits cyclic redundancy checks (CRCs).

filesystem:

The filesystem prefix indicating the disk to be checked. The colon (:) is required. Typically, the filesystem prefix will be disk0: or disk1:.

/automatic

(Optional. This keyword is available for ATA FAT-based disks only.) Specifies that the check and repair actions should proceed automatically. This option can be used to skip the prompts for each check and repair action.


Defaults

If the /automatic keyword is not used, CLI prompts for actions are issued.

Command Modes

Privileged EXEC

Command History

Release
Modification

11.3 AA

This command was introduced.

12.2(13)T, 12.0(22)S

This command was introduced for ATA disks on the Cisco 7000 family of routers and on the Cisco 10000 and 12000 series.


Usage Guidelines

This command will perform all of the steps necessary to remove corrupted files and reclaim unused disk space. Changes include checking for incorrect file sizes, cluster loops, and so on. The default form of this command will issue multiple prompts to confirm each of the changes. However, you can skip these prompts by using the /automatic keyword when issuing the command.

When the /automatic keyword is used you will prompted to confirm that you want the automatic option. Prompts for actions will be skipped, but all actions performed will be displayed to the terminal (see the example below).

This command works with ATA PCMCIA cards formatted in DOS, or for Class C Flash file systems.


Note Only one partition (the active partition) will be checked in the ATA disk.


Examples

The following example shows sample output from using the fsck commmand in automatic mode:

Router# fsck /automatic disk1:
Proceed with the automatic mode? [yes] y
Checking the boot sector and partition table...
Checking FAT, Files and Directories...
Start cluster of file disk1:/file1 is invalid, removing file
File disk1:/file2 has a free/bad cluster, truncating...
File disk1:/file2 truncated.
File disk1:/file3 has a free/bad cluster, truncating...
File disk1:/file3 truncated.
File disk1:/file4 has a invalid cluster, truncating...
File disk1:/file4 truncated.
File disk1:/file5 has a invalid cluster, truncating...
File disk1:/file5 truncated.
File disk1:/file6 has a invalid cluster, truncating...
File disk1:/file6 truncated.
File size of disk1:/file7 is not correct, correcting it
File disk1:/file8 cluster chain has a loop, truncating it
File disk1:/file8 truncated.
File disk1:/file9 cluster chain has a loop, truncating it
File disk1:/file9 truncated.
File disk1:/file16 has a free/bad cluster, truncating...
File disk1:/file16 truncated.
File disk1:/file20 has a free/bad cluster, truncating...
File disk1:/file20 truncated.
Reclaiming unused space...
Created file disk1:/fsck-4 for an unused cluster chain
Created file disk1:/fsck-41 for an unused cluster chain
Created file disk1:/fsck-73 for an unused cluster chain
Created file disk1:/fsck-106 for an unused cluster chain
Created file disk1:/fsck-121 for an unused cluster chain
Created file disk1:/fsck-132 for an unused cluster chain
Created file disk1:/fsck-140 for an unused cluster chain
Created file disk1:/fsck-156 for an unused cluster chain
Created file disk1:/fsck-171 for an unused cluster chain
Created file disk1:/fsck-186 for an unused cluster chain
Created file disk1:/fsck-196 for an unused cluster chain
Created file disk1:/fsck-235 for an unused cluster chain
Created file disk1:/fsck-239 for an unused cluster chain
Updating FAT...
fsck of disk1: complete


memory sanity

To perform a "sanity check" for corruption in buffers and queues, use the memory sanity command in global configuration mode. To disable this feature, use the no form of this command.

memory sanity [buffer | queue | all]

no memory sanity

Syntax Description

buffer

(Optional) Specifies checking all buffers.

queue

(Optional) Specifies checking all queues.

all

(Optional) Specifies checking all buffers and queues.


Defaults

This command is not enabled by default.
If the buffer or queue keyword is not specified, a sanity check will be performed on all buffers and queues.

Command Modes

Global configuration

Command History

Release
Modification

12.2(15)T

This command was introduced.


Usage Guidelines

When the memory sanity buffer command is enabled, a sanity check is performed on buffers when a packet buffer is allocated or when a packet buffer is returned to the buffer pool. This command also time-stamps the buffer, which may be useful when tracking the age of a buffer.

The memory sanity command can be saved in the startup configuration file and, therefore, it is not necessary to reconfigure this command each time the router is reloaded. Like the scheduler heapcheck process memory command, the memory sanity command can check for corruption in the I/O memory block.

Enabling the memory sanity command may result in slight router performance degradation.

Examples

The following example shows how to perform a sanity check for corruption in all buffers and queues:

memory sanity all

Related Commands

Command
Description

scheduler heapcheck process memory

Performs a "sanity check" for corruption in memory blocks when a process switch occurs.


memory scan

To enable the Memory Scan feature on a Cisco 7500 series router, use the memory scan command in global configuration mode. To restore the router configuration to the default, use the no form of this command.

memory scan

no memory scan

Syntax Description

This command has no arguments or keywords.

Defaults

This command is disabled by default.

Command Modes

Global configuration

Command History

Release
Modification

12.0(4)XE

This command was introduced.

12.0(7)T

This command was integrated in Cisco IOS Release 12.0 T.


Usage Guidelines

The Memory Scan feature adds a low-priority background process that searches all installed dynamic random-access memory (DRAM) for possible parity errors. If errors are found in memory areas that are not in use, this feature attempts to scrub (remove) the errors. The time to complete one memory scan and scrub cycle can range from 10 minutes to several hours, depending on the amount of installed memory. The impact of the Memory Scan feature on the central processing unit (CPU) is minimal. To view the status of the memory scan feature on your router, use the show memory scan command in EXEC mode.

Examples

The following example enables the Memory Scan feature on a Cisco 7500 series router:

Router(config)# memory scan

Related Commands

Command
Description

show memory scan

Displays the number and type of parity errors on your system (Cisco 7500 series only).


memory-size iomem

To reallocate the percentage of DRAM to use for I/O memory and processor memory on Cisco 3600 series routers, use the memory-size iomem command in global configuration mode. To revert to the default memory allocation, use the no form of this command.

memory-size iomem i/o-memory-percentage

no memory-size iomem i/o-memory-percentage

Syntax Description

i/o-memory-percentage

The percentage of DRAM allocated to I/O memory. The values permitted are 10, 15, 20, 25, 30, 40, and 50. A minimum of 4 MB of memory is required for I/O memory.


Defaults

The default memory allocation is 25 percent I/O memory and 75 percent processor memory.


Note If the smartinit process has been enabled, the default memory allocation of 25% to I/O does not apply. Instead, smartinit examines the network modules and then calculates the I/O memory required.


Command Modes

Global configuration

Command History

Release
Modification

11.2 P

This command was introduced.


Usage Guidelines

When you specify the percentage of I/O memory in the command line, processor memory automatically acquires the remaining percentage of DRAM memory.

Examples

The following example allocates 40 percent of the DRAM memory to I/O memory and the remaining 60 percent to processor memory:

Router# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)# memory-size iomem 40
Router(config)# exit
Router# copy system:running-config nvram:startup-config
Building configuration...
[OK]

Router# reload

rommon 1 > boot
program load complete, entry point: 0x80008000, size: 0x32ea24
Self decompressing the image : 
##########################################################################################
##########################################################################################
################################################################## [OK]

partition

To separate Flash memory into partitions on Class B file system platforms, use the partition command in global configuration mode. To undo partitioning and to restore Flash memory to one partition, use the no form of this command.

Cisco 1600 Series and Cisco 3600 Series Routers

partition flash-filesystem: [number-of-partitions][partition-size]

no partition flash-filesystem:

All Other Class B Platforms

partition flash partitions [size1 size2]

no partition flash

Syntax Description

flash-filesystem:

One of the following Flash file systems, which must be followed by a colon (:). The Cisco 1600 series can only use the flash: keyword.

flash:Internal Flash memory

slot0:Flash memory card in PCMCIA slot 0

slot1:Flash memory card in PCMCIA slot 1

number-of-partitions

(Optional) Number of partitions in Flash memory.

partition-size

(Optional) Size of each partition. The number of partition size entries must be equal to the number of specified partitions.

partitions

Number of partitions in Flash memory. Can be 1 or 2.

size1

(Optional) Size of the first partition (in megabytes).

size2

(Optional) Size of the second partition (in megabytes).


Defaults

Flash memory consists of one partition.

If the partition size is not specified, partitions of equal size are created.

Command Modes

Global configuration

Command History

Release
Modification

10.3

This command was introduced.


Usage Guidelines

For the Cisco 1600 series and Cisco 3600 series routers, to undo partitioning, use the partition flash-filesystem:1 or no partition flash-filesystem: command. For other Class B platforms, use either the partition flash 1 or no partition flash command. If there are files in a partition other than the first, you must use the erase flash-filesystem:partition-number command to erase the partition before reverting to a single partition.

When creating two partitions, you must not truncate a file or cause a file to spill over into the second partition.

Examples

The following example creates two partitions of 4 MB each in Flash memory:

Router(config)# partition flash 2 4 4

The following example divides the Flash memory card in slot 0 into two partitions, each 8 MB in size on a Cisco 3600 series router:

Router(config)# partition slot0: 2 8 8

The following example creates four partitions of equal size in the card on a Cisco 1600 series router:

Router(config)# partition flash: 4

scheduler heapcheck process

To perform a "sanity check" for corruption in memory blocks when a process switch occurs, use the scheduler heapcheck process command in global configuration mode. To disable this feature, use the no form of this command.

scheduler heapcheck process [memory [fast] [io] [multibus] [pci] [processor] [checktype {all | magic | pointer | refcount}]]

no scheduler heapcheck process

Syntax Description

memory

(Optional) Specifies checking all memory blocks and memory pools.

fast

(Optional) Specifies checking the fast memory block.

io

(Optional) Specifies checking the I/O memory block.

multibus

(Optional) Specifies checking the multibus memory block.

pci

(Optional) Specifies checking the process control information (PCI) memory block.

processor

(Optional) Specifies checking the processor memory block.

checktype

(Optional) Specifies checking specific memory pools.

all

(Optional) Specifies checking the value of the block magic, red zone, size, refcount, and pointers (next and previous).

magic

(Optional) Specifies checking the value of the block magic, red zone, and size.

pointer

(Optional) Specifies checking the value of the next and previous pointers.

refcount

(Optional) Specifies checking the value of the block magic and refcount.


Defaults

This command is not enabled by default. If no keywords are specified, a sanity check will be performed on all the memory blocks and memory pools.

Command Modes

Global configuration

Command History

Release
Modification

12.2(15)T

This command was introduced.


Usage Guidelines

When configuring this command, you can choose none or all memory block keywords (fast, io, multibus, pci, processor, and checktype).

Enabling this command has a significant impact on router performance.

Examples

The following example shows how to sanity check for corruption in the I/O memory block when a process switch occurs. In this example, the values of only the block magic, red zone, and size will be checked.

scheduler heapcheck process memory io checktype magic

The following example shows how to sanity check for corruption in the processor memory block when a process switch occurs. In this example, the values of only the next and previous pointers will be checked.

scheduler heapcheck process memory processor checktype pointer

Related Commands

Command
Description

memory sanity

Performs a "sanity check" for corruption in buffers and queues.


show (Flash file system)

To display the layout and contents of a Flash memory file system, use the show command in EXEC mode.

Class A Flash File Systems

show flash-filesystem: [all | chips | filesys]

Class B Flash File Systems

show flash-filesystem: [partition number] [all | chips | detailed | err | summary]

Class C Flash File Systems

show flash-filesystem:

Syntax Description

flash-filesystem:

Flash memory file system (bootflash:, flash:, slot0:, slot1:, slavebootflash:, slaveslot0:, or slaveslot1:), followed by a colon.

all

(Optional) On Class B Flash file systems, all keyword displays complete information about Flash memory, including information about the individual ROM devices in Flash memory and the names and sizes of all system image files stored in Flash memory, including those that are invalid.

On Class A Flash file systems, the all keyword displays the following information:

The information displayed when no keywords are used.

The information displayed by the filesys keyword.

The information displayed by the chips keyword.

chips

(Optional) Displays information per partition and per chip, including which bank the chip is in, plus its code, size, and name.

filesys

(Optional) Displays the Device Info Block, the Status Info, and the Usage Info.

partition number

(Optional) Displays output for the specified partition number. If you do not specify a partition in the command, the router displays output for all partitions. You can use this keyword only when Flash memory has multiple partitions.

detailed

(Optional) Displays detailed file directory information per partition, including file length, address, name, Flash memory checksum, computer checksum, bytes used, bytes available, total bytes, and bytes of system Flash memory.

err

(Optional) Displays write or erase failures in the form of number of retries.

summary

(Optional) Displays summary information per partition, including the partition size, bank size, state, and method by which files can be copied into a particular partition. You can use this keyword only when Flash memory has multiple partitions.


Command Modes

EXEC

Command History

Release
Modification

11.3 AA

This command was introduced.


Usage Guidelines

If Flash memory is partitioned, the command displays the requested output for each partition, unless you use the partition keyword.

The command also specifies the location of the current image.

To display the contents of boot Flash memory on Class A or B file systems, use the show bootflash: command as follows:

Class A Flash file systems

show bootflash: [all | chips | filesys]

Class B Flash file systems

show bootflash: [partition number] [all | chips | detailed | err]

To display the contents of internal Flash memory on Class A or B file systems, use the show flash: command as follows:

Class A Flash file systems

show flash: [all | chips | filesys]

Class B Flash file systems

show flash: [partition number][all | chips | detailed | err | summary]

The show (Flash file system) command replaces the show flash devices command.

Examples

The output of the show command depends on the type of Flash file system you select. Types include flash:, bootflash:, slot0:, slot1:, slavebootflash:, slaveslot0:, and slaveslot1:.

Examples of output from the show flash command are provided in the following sections:

Class A Flash File System

Class B Flash File Systems

Although the examples use flash: as the Flash file system, you may also use the other Flash file systems listed.

Class A Flash File System

The following three examples show sample output for Class A Flash file systems. Table 36 describes the significant fields shown in the display.

The following is sample output from the show flash: command.

Router# show flash:

-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1   .. unknown  317FBA1B  4A0694   24  4720148 Aug 29 1997 17:49:36 
hampton/nitro/c7200-j-mz
2   .. unknown  9237F3FF  92C574   11  4767328 Oct 01 1997 18:42:53 c7200-js-mz
3   .D unknown  71AB01F1 10C94E0   10  7982828 Oct 01 1997 18:48:14 rsp-jsv-mz
4   .D unknown  96DACD45 10C97E0    8      639 Oct 02 1997 12:09:17 the_time
5   .. unknown  96DACD45 10C9AE0    3      639 Oct 02 1997 12:09:32 the_time
6   .D unknown  96DACD45 10C9DE0    8      639 Oct 02 1997 12:37:01 the_time
7   .. unknown  96DACD45 10CA0E0    8      639 Oct 02 1997 12:37:13 the_time

3104544 bytes available (17473760 bytes used)

Table 36 show (Class A Flash File System) Field Descriptions 

Field
Description

#

Index number for the file.

ED

Whether the file contains an error (E) or is deleted (D).

type

File type (1 = configuration file, 2 = image file). The software displays these values only when the file type is certain. When the file type is unknown, the system displays "unknown" in this field.

crc

Cyclic redundant check for the file.

seek

Offset into the file system of the next file.

nlen

name length—Length of the filename.

length

Length of the file itself.

date/time

Date and time the file was created.

name

Name of the file.


The following is sample output from the show flash: chips command:

RouterA# show flash: chips

******** Intel Series 2+ Status/Register Dump ********

ATTRIBUTE MEMORY REGISTERS:
  Config Option Reg (4000): 2
  Config Status Reg (4002): 0
  Card Status   Reg (4100): 1
  Write Protect Reg (4104): 4
  Voltage Cntrl Reg (410C): 0
  Rdy/Busy Mode Reg (4140): 2

COMMON MEMORY REGISTERS: Bank 0
  Intelligent ID Code  : 8989A0A0
  Compatible Status Reg: 8080
  Global     Status Reg: B0B0
  Block Status Regs:
    0  :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    8  :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    16 :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    24 :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0

COMMON MEMORY REGISTERS: Bank 1
  Intelligent ID Code  : 8989A0A0
  Compatible Status Reg: 8080
  Global     Status Reg: B0B0
  Block Status Regs:
    0  :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    8  :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    16 :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    24 :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0

COMMON MEMORY REGISTERS: Bank 2
  Intelligent ID Code  : 8989A0A0
  Compatible Status Reg: 8080
  Global     Status Reg: B0B0
  Block Status Regs:
    0  :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    8  :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    16 :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    24 :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0

COMMON MEMORY REGISTERS: Bank 3
  Intelligent ID Code  : 8989A0A0
  Compatible Status Reg: 8080
  Global     Status Reg: B0B0
  Block Status Regs:
    0  :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    8  :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    16 :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    24 :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0

COMMON MEMORY REGISTERS: Bank 4
  Intelligent ID Code  : 8989A0A0
  Compatible Status Reg: 8080
  Global     Status Reg: B0B0
  Block Status Regs:
    0  :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    8  :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    16 :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0
    24 :  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0  B0B0

The following is sample output from the show flash: filesys command:

RouterA# show flash: filesys

-------- F I L E   S Y S T E M   S T A T U S --------
  Device Number = 0
DEVICE INFO BLOCK:
  Magic Number          = 6887635   File System Vers = 10000    (1.0)
  Length                = 1400000   Sector Size      = 20000
  Programming Algorithm = 4         Erased State     = FFFFFFFF
  File System Offset    = 20000     Length = 13A0000
  MONLIB Offset         = 100       Length = C730
  Bad Sector Map Offset = 1FFEC     Length = 14
  Squeeze Log Offset    = 13C0000   Length = 20000
  Squeeze Buffer Offset = 13E0000   Length = 20000
  Num Spare Sectors     = 0
    Spares:
STATUS INFO:
  Writable
  NO File Open for Write
  Complete Stats
  No Unrecovered Errors
  No Squeeze in progress
USAGE INFO:
  Bytes Used     = 10AA0E0  Bytes Available = 2F5F20
  Bad Sectors    = 0       Spared Sectors  = 0
  OK Files       = 4       Bytes = 90C974
  Deleted Files  = 3       Bytes = 79D3EC
  Files w/Errors = 0       Bytes = 0

The following is sample output from the show flash: command:

RouterB> show flash:
System flash directory:
File  Length   Name/status
  1   4137888  c3640-c2is-mz.Feb24
[4137952 bytes used, 12639264 available, 16777216 total]
16384K bytes of processor board System flash (Read/Write)\

The following example shows detailed information about the second partition in internal Flash memory:

RouterB# show flash: partition 2

System flash directory, partition 2:
File  Length   Name/status
  1   1711088  dirt/images/c3600-i-mz 
[1711152 bytes used, 15066064 available, 16777216 total]
16384K bytes of processor board System flash (Read/Write)

Class B Flash File Systems

Table 37 describes significant fields shown in the displays.

Table 37 show (Class B Flash File System) all Fields 

Field
Description

addr

Address of the file in Flash memory.

available

Total number of bytes available in Flash memory.

Bank

Bank number.

Bank-Size

Size of bank in bytes.

bytes used

Total number of bytes used in Flash memory.

ccksum

Computed checksum.

Chip

Chip number.

Code

Code number.

Copy-Mode

Method by which the partition can be copied to:

RXBOOT-MANUAL indicates a user can copy manually by reloading to the boot ROM image.

RXBOOT-FLH indicates user can copy via Flash load helper.

Direct indicates user can copy directly into Flash memory.

None indicates that it is not possible to copy into that partition.

fcksum

Checksum recorded in Flash memory.

File

Number of the system image file. If no filename is specified in the boot system flash command, the router boots the system image file with the lowest file number.

Free

Number of bytes free in partition.

Length

Size of the system image file (in bytes).

Name

Name of chip manufacturer and chip type.

Name/status

Filename and status of a system image file. The status [invalidated] appears when a file has been rewritten (recopied) into Flash memory. The first (now invalidated) copy of the file is still present within Flash memory, but it is rendered unusable in favor of the newest version. The [invalidated] status can also indicate an incomplete file that results from the user abnormally terminating the copy process, a network timeout, or a Flash memory overflow.

Partition

Partition number in Flash memory.

Size

Size of partition (in bytes) or size of chip.

State

State of the partition. It can be one of the following values:

Read-Only indicates the partition that is being executed from.

Read/Write is a partition that can be copied to.

System flash directory

Flash directory and its contents.

total

Total size of Flash memory (in bytes).

Used

Number of bytes used in partition.


The following is sample output from the show flash: all command:

RouterB> show flash: all
Partition   Size    Used      Free      Bank-Size  State          Copy Mode
  1        16384K   4040K    12343K     4096K      Read/Write     Direct
System flash directory:
File  Length   Name/status
        addr      fcksum  ccksum
  1   4137888  c3640-c2is-mz.Feb24
        0x40      0xED65  0xED65
[4137952 bytes used, 12639264 available, 16777216 total]
16384K bytes of processor board System flash (Read/Write)
   Chip    Bank    Code      Size      Name
    1      1       01D5      1024KB    AMD   29F080
    2      1       01D5      1024KB    AMD   29F080
    3      1       01D5      1024KB    AMD   29F080
    4      1       01D5      1024KB    AMD   29F080
    1      2       01D5      1024KB    AMD   29F080
    2      2       01D5      1024KB    AMD   29F080
    3      2       01D5      1024KB    AMD   29F080
    4      2       01D5      1024KB    AMD   29F080
    1      3       01D5      1024KB    AMD   29F080
    2      3       01D5      1024KB    AMD   29F080
    3      3       01D5      1024KB    AMD   29F080
    4      3       01D5      1024KB    AMD   29F080
    1      4       01D5      1024KB    AMD   29F080
    2      4       01D5      1024KB    AMD   29F080
    3      4       01D5      1024KB    AMD   29F080
    4      4       01D5      1024KB    AMD   29F080

The following is sample output from the show flash: all command on a router with Flash memory partitioned:

Router# show flash: all

System flash partition information:
Partition   Size    Used       Free     Bank-Size     State         Copy-Mode
    1       4096K    3459K     637K     4096K         Read Only     RXBOOT-FLH
    2       4096K    3224K     872K     4096K         Read/Write    Direct

System flash directory, partition 1:
File     Length     Name/status
        addr     fcksum     ccksum
  1     3459720     master/igs-bfpx.100-4.3
        0x40     0x3DE1     0x3DE1
[3459784 bytes used, 734520 available, 4194304 total]
4096K bytes of processor board System flash (Read ONLY)

   Chip    Bank     Code      Size      Name
    1      1        89A2      1024KB    INTEL 28F008SA
    2      1        89A2      1024KB    INTEL 28F008SA
    3      1        89A2      1024KB    INTEL 28F008SA
    4      1        89A2      1024KB    INTEL 28F008SA
Executing current image from System flash [partition 1]
 System flash directory, partition2:
File     Length     Name/status
        addr     fcksum     ccksum
  1     3224008     igs-kf.100
        0x40     0xEE91     0xEE91
[3224072 bytes used, 970232 available, 4194304 total]
4096K bytes of processor board System flash (Read/Write)

   Chip    Bank     Code      Size      Name
    1      2        89A2      1024KB    INTEL 28F008SA
    2      2        89A2      1024KB    INTEL 28F008SA
    3      2        89A2      1024KB    INTEL 28F008SA
    4      2        89A2      1024KB    INTEL 28F008SA

The following is sample output from the show flash: chips command:

RouterB> show flash: chips

16384K bytes of processor board System flash (Read/Write)
   Chip    Bank    Code      Size      Name
    1      1       01D5      1024KB    AMD   29F080
    2      1       01D5      1024KB    AMD   29F080
    3      1       01D5      1024KB    AMD   29F080
    4      1       01D5      1024KB    AMD   29F080
    1      2       01D5      1024KB    AMD   29F080
    2      2       01D5      1024KB    AMD   29F080
    3      2       01D5      1024KB    AMD   29F080
    4      2       01D5      1024KB    AMD   29F080
    1      3       01D5      1024KB    AMD   29F080
    2      3       01D5      1024KB    AMD   29F080
    3      3       01D5      1024KB    AMD   29F080
    4      3       01D5      1024KB    AMD   29F080
    1      4       01D5      1024KB    AMD   29F080
    2      4       01D5      1024KB    AMD   29F080
    3      4       01D5      1024KB    AMD   29F080
    4      4       01D5      1024KB    AMD   29F080

The following is sample output from the show flash: detailed command:

RouterB> show flash: detailed
System flash directory:
File  Length   Name/status
        addr      fcksum  ccksum
  1   4137888  c3640-c2is-mz.Feb24
        0x40      0xED65  0xED65
[4137952 bytes used, 12639264 available, 16777216 total]
16384K bytes of processor board System flash (Read/Write)

The following is sample output from the show flash: err command:

RouterB> show flash: err
System flash directory:
File  Length   Name/status
  1   4137888  c3640-c2is-mz.Feb24
[4137952 bytes used, 12639264 available, 16777216 total]
16384K bytes of processor board System flash (Read/Write)
   Chip    Bank    Code      Size      Name                erase  write
    1      1       01D5      1024KB    AMD   29F080      0      0
    2      1       01D5      1024KB    AMD   29F080      0      0
    3      1       01D5      1024KB    AMD   29F080      0      0
    4      1       01D5      1024KB    AMD   29F080      0      0
    1      2       01D5      1024KB    AMD   29F080      0      0
    2      2       01D5      1024KB    AMD   29F080      0      0
    3      2       01D5      1024KB    AMD   29F080      0      0
    4      2       01D5      1024KB    AMD   29F080      0      0
    1      3       01D5      1024KB    AMD   29F080      0      0
    2      3       01D5      1024KB    AMD   29F080      0      0
    3      3       01D5      1024KB    AMD   29F080      0      0
    4      3       01D5      1024KB    AMD   29F080      0      0
    1      4       01D5      1024KB    AMD   29F080      0      0
    2      4       01D5      1024KB    AMD   29F080      0      0
    3      4       01D5      1024KB    AMD   29F080      0      0
    4      4       01D5      1024KB    AMD   29F080      0      0

See Table 37 for a description of the fields. The show flash: err command also displays two extra fields: erase and write. The erase field indications the number of erase errors. The write field indicates the number of write errors.

The following is sample output from the show flash summary command on a router with Flash memory partitioned. The partition in the Read Only state is the partition from which the Cisco IOS image is being executed.

Router# show flash summary

System flash partition information:
Partition   Size     Used      Free    Bank-Size   State       Copy-Mode
    1       4096K    2048K     2048K   2048K       Read Only   RXBOOT-FLH
    2       4096K    2048K     2048K   2048K       Read/Write  Direct

Related Commands

Command
Description

more

Displays the contents of any file in the Cisco IOS File System.


show memory scan

To monitor the number and type of parity (memory) errors on your system, use the show memory scan command in EXEC mode.

show memory scan

Syntax Description

This command has no arguments or keywords.

Defaults

No default behavior or values

Command Modes

EXEC

Command History

Release
Modification

12.0(4)XE

This command was introduced.

12.0(7)T

This command was implemented in Cisco IOS Release 12.0(7) T.


Examples

The following example shows a result with no memory errors:

Router# show memory scan

Memory scan is on.
No parity error has been detected.

If errors are detected in the system, the show memory scan command generates an error report. In the following example, memory scan detected a parity error:

Router# show memory scan

Memory scan is on.
Total Parity Errors 1.
Address	BlockPtr	BlckSize	Disposit	Region Timestamp
6115ABCD	60D5D090	9517A4	Scrubed	Local 16:57:09 UTC Thu  Mar 18

Table 38 describes the fields contained in the error report.

Table 38 show memory scan Field Descriptions 

Field
Description

Address

The byte address where the error occurred.

BlockPtr

The pointer to the block that contains the error.

BlckSize

The size of the memory block

Disposit

The action taken in response to the error:

BlockInUse—An error was detected in a busy block.

InFieldPrev—An error was detected in the previous field of a block header.

InHeader—An error was detected in a block header.

Linked—A block was linked to a bad list.

MScrubed—The same address was "scrubbed" more than once, and the block was linked to a bad list.

MultiError—Multiple errors have been found in one block.

NoBlkHdr—No block header was found.

NotYet—An error was found; no action has been taken at this time.

Scrubed—An error was "scrubbed."

SplitLinked—A block was split, and only a small portion was linked to a bad list.

Region

The memory region in which the error was found:

IBSS—image BSS

IData—imagedata

IText—imagetext

local—heap

Timestamp

The time the error occurred.


write core

To test the configuration of a core dump setup, use the write core command in privileged EXEC mode.

write core [hostname [LINE] | destination-address [LINE]]

Syntax Description

hostname

(Optional) Host name of the remote server where the core dump file is to be written.

destination-address

(Optional) IP address of the remote server where the core dump file is to be written.

LINE

(Optional) Assigns the name "LINE" to the core dump file.


Defaults

If the hostname or destination arguments are not specified, the core dump file is written to the IP address or hostname specified by the exception dump command.

If the LINE keyword is not specified, the name of the core dump file is assigned as the host name of the remote server followed by the word "-core."

Command Modes

Privileged EXEC

Command History

Release
Modification

12.2(11)T

This command was introduced.


Usage Guidelines

When a router reloads, it is sometimes useful to obtain a full copy of the memory image (called a core dump) to identify the cause of the reload. Core dumps are generally useful to your technical support representative. Not all types of router reloads will produce a core dump.

The write core command causes the router to generate a core dump without reloading, which may be useful if the router is malfunctioning but has not reloaded. The core dump files will be the size of the respective memory regions. It is important to remember that the entire memory region is dumped, not just the memory that is in use.


Caution Use the write core command only under the direction of a technical support representative. Creating a core dump while the router is functioning in a network can disrupt network operation. When using this command, the router will not reload until the content of its memory is dumped. This event might take some time, depending on the amount of DRAM present on the router. Also, the resulting binary file, which is very large, must be transferred to a Trivial File Transfer Protocol (TFTP), File Transfer Protocol (FTP), or remote copy protocol (rcp) server and subsequently interpreted by technical personnel who have access to source code and detailed memory maps.

Depending on your TFTP server, you might need to create an empty target file to which the router can write the core dump.

Examples

The following example shows how to test the configuration of a core dump setup. In this example, the core dump file is written to the remote server with the host name test.

write core test

write memory

The write memory command has been replaced by the copy system:running-config nvram: startup-config command. See the description of the copy command in this "Cisco IOS File System Commands" chapter for more information.

write network

The write network command is replaced by the copy system:running-config destination-url. See the description of the copy command in this "Cisco IOS File System Commands" chapter for more information.