Command:

show memory

Mode:

Router>

Syntax:

show memory [memory-type] [free] [summary]


Syntax Description:

memory-type

(Optional) Memory type to display (processor, multibus, io,sram). If type is not specified, statistics for all memory types present are displayed.

free

(Optional) Displays free memory statistics.

summary

(Optional) Displays a summary of memory usage including the size and number of blocks allocated for each address of the system call that allocated the block.


Command Description:

Use the show memory EXEC command to show statistics about memory, including memory-free pool statistics.

The show memory command displays information about memory available after the system image decompresses and loads.

 


Examples:

The following is a sample of output from the show memory command:

Router#show memory


               Head   Total(b)    Used(b)    Free(b)  Lowest(b) Largest(b)
Processor    B0EE38    5181896    2210036    2971860    2692456    2845368

          Processor memory
Address   Bytes Prev.    Next     Ref  PrevF   NextF   Alloc PC  What
B0EE38     1056 0        B0F280     1                  18F132    List Elements
B0F280     2656 B0EE38   B0FD08     1                  18F132    List Headers
B0FD08     2520 B0F280   B10708     1                  141384    TTY data
B10708     2000 B0FD08   B10F00     1                  14353C    TTY Input Buf
B10F00      512 B10708   B11128     1                  14356C    TTY Output Buf
B11128     2000 B10F00   B11920     1                  1A110E    Interrupt Stack
B11920       44 B11128   B11974     1                  970DE8    *Init*
B11974     1056 B11920   B11DBC     1                  18F132    messages
B11DBC       84 B11974   B11E38     1                  19ABCE    Watched Boolean
B11E38       84 B11DBC   B11EB4     1                  19ABCE    Watched Boolean
B11EB4       84 B11E38   B11F30     1                  19ABCE    Watched Boolean
B11F30       84 B11EB4   B11FAC     1                  19ABCE    Watched Boolean
Router#
 

The following is a sample of output from the show memory free command:

Router#show memory free


               Head   Total(b)    Used(b)    Free(b)  Lowest(b) Largest(b)
Processor    B0EE38    5181896    2210076    2971820    2692456    2845368

          Processor memory
Address  Bytes Prev.    Next     Ref  PrevF   NextF   Alloc PC  What
             24    Free list 1
CEB844       32 CEB7A4   CEB88C     0  0       0       96B894    SSE Manager
             52    Free list 2
             72    Free list 3
             76    Free list 4
             80    Free list 5
D35ED4       80 D35E30   D35F4C     0  0       D27AE8  96B894    SSE Manager
D27AE8       80 D27A48   D27B60     0  D35ED4  0       22585E    SSE Manager
             88    Free list 6
            100    Free list 7
D0A8F4      100 D0A8B0   D0A980     0  0       0       2258DA    SSE Manager
            104    Free list 8
B59EF0      108 B59E8C   B59F84     0  0       0       2258DA    (fragment)
 

The display of show memory free contains the same types of information as the show memory display, except that only free memory is displayed, and the information is displayed in order for each free list.

The first section of the display includes summary statistics about the activities of the system memory allocator. The table below describes significant fields shown in the first section of the display.

Table: show memory Field Descriptions�First Section

Field Description

Head

Hexadecimal address of the head of the memory allocation chain

Total(b)

Sum of used bytes plus free bytes

Used(b)

Amount of memory in use

Free(b)

Amount of memory not in use

Lowest(b)

Smallest amount of free memory since last boot

Largest(b)

Size of largest available free block

The second section of the display is a block-by-block listing of memory use.
Table below describes significant fields shown in the second section of the display.

Table: Characteristicsof Each Block of Memory�Second Section

Field Description

Address

Hexadecimal block of addresses

Bytes

Size of block in bytes

Prev.

Address of previous block (should match Address on previous line)

Next

Address of next block (should match address on next line)

Ref

Reference count for that memory block, indicating how many different processes are using that block of memory

PrevF

Address of previous free block (if free)

NextF

Address of next free block (if free)

Alloc PC

Address of the system call that allocated the block

What

Name of process that owns the block, or "(fragment)" if the block
is a fragment, or "(coalesced)" if the block was coalesced from
adjacent free blocks

The show memory io command displays the free I/O memory blocks. On the Cisco 4000, this command quickly shows how much unused I/O memory is available.

The following is a sample of output from the show memory io command:

Router#show memory io


Address   Bytes Prev.   Next     Ref  PrevF   NextF   Alloc PC  What
6132DA0   59264 6132664 6141520  0    0      600DDEC  3FCF0     *Packet Buffer*
600DDEC     500 600DA4C 600DFE0  0   6132DA0 600FE68  0
600FE68     376 600FAC8 600FFE0  0   600DDEC 6011D54  0
6011D54     652 60119B4 6011FEO  0   600FE68 6013D54  0
614FCA0     832 614F564 614FFE0  0   601FD54 6177640  0
6177640 2657056 6172E90 0        0   614FCA0 0        0
Total: 2723244
 

The show memory sram command displays the free SRAM memory blocks. For the Cisco 4000, this command supports the high-speed static RAM memory pool to make it easier to debug or diagnose problems with allocation or freeing of such memory.

The following is a sample of output from the show memory sram command:

Router#show memory sram


Address   Bytes Prev.   Next     Ref  PrevF   NextF   Alloc PC  What
7AE0      38178 72F0    0        0    0       0       0
Total     38178
 

The show memory command on the Cisco 4000 includes information about SRAM memory and I/O memory, and appears as follows:

Router#show memory


               Head   Total(b)    Used(b)    Free(b)  Lowest(b) Largest(b)
Processor    49C724   28719324    1510864   27208460   26511644   15513908
      I/O   6000000    4194304    1297088    2897216    2869248    2896812
     SRAM      1000      65536      63400       2136       2136       2136

Address   Bytes Prev.   Next     Ref  PrevF   NextF   Alloc PC  What
1000       2032 0       17F0       1                  3E73E     *Init*
17F0       2032 1000    1FE0       1                  3E73E     *Init*
1FE0        544 17F0    2200       1                  3276A     *Init*
2200         52 1FE0    2234       1                  31D68     *Init*
2234         52 2200    2268       1                  31DAA     *Init*
2268         52 2234    229C       1                  31DF2     *Init*
72F0       2032 6E5C    7AE0       1                  3E73E     Init
7AE0      38178 72F0    0          0    0      0      0         
 

The show memory summary command displays a summary of all memory pools as well as memory usage per Alloc PC (address of the system call that allocated the block).

The following is a partial sample output from the show memory summary command. This command shows the size, blocks, and bytes allocated. Bytes equal the size multiplied by the blocks. For a description of the other fields, see Table 20 and Table 21.

Router#show memory summary


Head   Total(b)    Used(b)    Free(b)  Lowest(b) Largest(b)
Processor    B0EE38    5181896    2210216    2971680    2692456    2845368

          Processor memory
Alloc PC        Size     Blocks      Bytes    What
0x2AB2           192          1        192    IDB: Serial Info
0x70EC            92          2        184    Init
0xC916           128         50       6400    RIF Cache
0x76ADE         4500          1       4500    XDI data
0x76E84         4464          1       4464    XDI data
0x76EAC          692          1        692    XDI data
0x77764          408          1        408    Init
0x77776          116          1        116    Init
0x777A2          408          1        408    Init
0x777B2          116          1        116    Init
0xA4600           24          3         72    List
0xD9B5C           52          1         52    SSE Manager
.......................
0x0                0       3413    2072576    Pool Summary
0x0                0         28    2971680    Pool Summary (Free Blocks)
0x0               40       3441     137640    Pool Summary(All Block Headers)
0x0                0       3413    2072576    Memory Summary
0x0                0         28    2971680    Memory Summary (Free Blocks)

 

Misconceptions:

None

Related commands:
show processes

� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)