IOS XE-show memory

有些時候,咱們可能會遇到IOS XE設備的high memory的狀況。咱們可使用的命令去查看相關信息。html

例如:linux

Router# show versionios

Router# show memory緩存

Router# show processes memoryapp

Router# show platform software status control-processor briefless

Router# show platform resourceside

Router# show processes memory platform sortedthis

接下來,對上述命令進行解釋。spa

show ver不用說明了,查看設備的軟件版本,運行時間、physical memory、flash memory等狀況。操作系統

一、show memory

Cisco IOS守護進程中的系統內存使用狀況。

Cisco IOSd runs as its own process and it allocates memory from the system. It uses its own memory manager for features running within Cisco IOSd. In general, Cisco IOSd is allowed to use a maximum of approximately ½ of the total system memory. However, it uses less system memory depending on the configuration. IOS will consume (消耗) system memory as needed to satisfy memory requests for features within Cisco IOSd. To do this, it uses a feature referred to as Cisco IOSd Dynamic Heap (dHeap). With dHeap, Cisoc IOS will request memory from the operating system based on demand as indicated by the dHeap output indicated in the show memory command.

要查找Cisco IOSd正在使用的系統內存總量,請使用Cisco IOS XE系統內存命令。

Router# show memory

Head Total(b) Used(b) Free(b) Lowest(b) Largest(b)
Address Bytes Prev Next Ref PrevF NextF Alloc PC what
Processor 7F4A5B545010 1728363504 284041616 1444321888 679710664 1048575908
lsmpi_io 7F4A5AE431A8 6295128 6294304 824 824 412
Dynamic heap limit(MB) 1000 Use(MB)
0
11728363504 is the maximum amount of memory IOSd has for its heap, this value includes the 1000MB memory from dHEAP.
 
要得到有關Cisco IOS進程內存使用的更多詳細信息,請使用show process memory命令。 請注意,如下命令僅顯示Cisco IOSd中的信息,並不表示Cisco IOS XE操做系統中的內存使用狀況。

show processes命令顯示有關活動進程的信息。 使用show processes memory命令顯示Cisco IOSd中使用的內存量
Router# show processes memory
rtp-overlord-81#show process memory
Processor Pool Total: 7990846432 Used: 305365544 Free: 7685480888
lsmpi_io Pool Total: 6295128 Used: 6294296 Free: 832
 
PID TTY Allocated Freed Holding Getbufs Retbufs Process
0 0 493378864 210687712 262655736 570 619186 *Init*
0 0 288 336064 288 0 0 *Sched*
0 0 860480 391632 482344 0 0 *Dead*
0 0 0 0 395520 0 0 *MallocLite*
1 0 1926560 16632 1939792 0 0 Chunk Manager
2 0 448 448 17864 0 0 Load Meter
3 0 37256 36832 30288 12 12 OVLD SPA Backgro
4 0 0 0 29864 0 0 Retransmission o
5 0 0 0 29864 0 0 IPC ISSU Dispatc
6 0 525744 21872 461392 0 0 RF Slave Main Th
7 0 65632 0 167496 0 0 EDDRI_MAIN
8 0 0 0 29864 0 0 RO Notify Timers
9 0 6240 448 35656 0 0 Check heaps
10 0 1391144832 1391186176 215016 51 0 Pool Manager
11 0 0 0 29864 0 0 DiscardQ Backgro
12 0 448 448 29864 0 0 Timers
13 0 0 0 17864 0 0 WATCH_AFS
14 0 0 0 29864 0 0 MEMLEAK PROCESS
15 0 63728520 63695656 62728 638371 638371 ARP Input
 
二、show platform software status control-processor brief
要查看Cisco IOS XE上的當前系統內存使用狀況,請使用show platform software status control-processor brief命令。IOS-XE依賴於提供系統內存管理的Linux內核。 有關Linux內存管理的更多信息,建議瞭解Linux內存管理的工做原理。
Router# show platform software status control-processor brief
Load Average
Slot Status 1-Min 5-Min 15-Min
RP0 Warning 10.29 8.00 7.66
 
Memory (kB)
Slot Status Total Used (Pct) Free (Pct) Committed (Pct)
RP0 Healthy 16339708 15612240 (96%) 727468 ( 4%) 1886792 (12%)
 
CPU Utilization
Slot CPU User System Nice Idle IRQ SIRQ IOwait
RP0 0 1.02 15.74 0.00 83.23 0.00 0.00 0.00
1 0.50 17.07 0.00 82.41 0.00 0.00 0.00
2 1.19 16.58 0.00 82.22 0.00 0.00 0.00
3 0.67 16.73 0.00 82.58 0.00 0.00 0.00
4 0.51 15.23 0.00 84.25 0.00 0.00 0.00
5 0.42 16.32 0.00 83.24 0.00 0.00 0.00
6 0.17 17.70 0.00 82.12 0.00 0.00 0.00
7 0.51 25.51 0.00 73.97 0.00 0.00 0.00
 
用於上述命令的內存包括文件系統緩存,其中大部分能夠在系統內存須要時使用。 一般,使用的內存不能反映新功能配置可使用多少內存; 此命令的更準確估計來自使用已提交的內存(在此示例中,大約有12%的系統內存正在使用中)。
 
三、show platform resources
如下命令顯示系統利用率的高級視圖(可從Cisco IOS XE版本3.14或更高版本得到)。
Router# show platform resources
**State Acronym: H - Healthy, W - Warning, C - Critical
 
Resource State Usage Max Warning Critical
------------------------------------------------------------------------------------------
RP0 (ok, active)
C
Control Processor 37.44% 100% 90% 9
5% H
DRAM 15250MB(95%) 15956MB 90% 9
5% C
ESP0(ok, active)
H
QFP
H
DRAM 1597821KB(76%) 2097152KB 80% 9
0% H
IRAM 0KB(0%) 0KB 80% 9
0% H
 
四、show processes memory platform sorted
顯示進程的內存使用狀況要顯示在Cisco IOS XE操做系統中運行的單個處理的系統內存利用率,請使用show processes memory platform sorted命令,該命令可從Cisco IOS XE版本3.14或更高版本得到。 對於之前的版本,show platform software process memory R0 all sorted命令也可用於獲取系統中的每進程內存使用狀況。
Router# show processes memory platform sorted
System memory: 16339708K total, 1888316K used, 14451392K free
Lowest: 726192K
Pid Text Data Stack Dynamic RSS Total Name
---------------------------------------------------------------------------
4702 11377 173556 204 20244 8696504 10256632 fman_fp_image
3415 78 159380 128 20344 8679096 9807832 cpp_cp_svr
4408 62 113332 84 2024 8633048 9211508 cpp_sp_svr
4190 323 93784 88 3204 8613500 9184072 cpp_ha_top...
3783 144 91532 152 2520 8611252 9170844 cpp_driver
3065 59 23584 84 988 8543300 9091828 cpp_cdm_svr
26530 377371 771772 216 56 772004 2426664 linux_iosd...
24860 6380 81496 188 1684 81496 1057452 fman_rp
2786 101 19724 84 3280 19732 398052 cman_fp
23458 241 76728 88 5584 85180 304192 bsm
31394 754 16536 88 960 16536 179756 vman
29446 385 120388 112 109644 120396 128716 smand
15721 29 10036 88 280 75588 79824 ngiolite
17264 409 26700 84 3504 26712 77668 iomd-0_4
16628 409 26628 84 3508 26640 77412 iomd-0_2
15557 409 27500 84 3508 27512 77412 iomd-0_0
24126 933 33428 88 3936 33460 53488 cmand
25722 303 31092 88 1084 31092 41584 hman
12409 303 29400 84 844 29400 39240 hman
例如,在上面的命令中,您能夠看到Cisco IOSd使用的系統內存量爲4979144kB,如linux_iosd進程的RSS(Resident Set Size,駐留集大小)所示。 總內存列是指每一個進程的VSZ(Virtual Set Size,虛擬集大小)。
 
五、show platform hardware qfp active infrastructure exmem statistics
要顯示有關數據平面或QFP的內存使用狀況的信息,請使用show platform hardware qfp active infrastructure exmem statistics命令。

對於Cisco 4400系列ISR平臺,數據平面DRAM位於2GB DIMM上,如上所述,它與系統DRAM內存物理分離。 大多數數據平面DRAM用於系統目的。 大約750 MB用於緩衝,另外750 MB用於存儲運行數據平面分組轉發過程的微代碼。 剩餘的512 MB用於EXMEM,它是容許實際數據包處理和功能擴展的動態內存。
注意:Cisco 4400系列ISR平臺上顯示的數據平面內存使用狀況信息因平臺上運行的IOS版本而異。
 
運行早於16.x的IOS版本的Cisco 4400系列ISR平臺的顯示信息反映了總共2GB的DRAM,以下所示。
Example: Cisco 4451 ISR with IOS version 3.16
Router# show platform hardware qfp active infrastructure exmem statistics
QFP exmem statistics
Type: Name: DRAM, QFP: 0
Total: 2147483648
InUse: 1648148480
Free: 499335168
Lowest free water mark: 432488448
 
對於運行IOS版本16.x及更高版本的Cisco 4400系列ISR平臺,此命令僅反映實際的EXMEM使用狀況。 這與Cisco 4300系列ISR相同,其中數據平面不在單獨的DIMM上。 可是,Cisco 4300系列ISR使用整個系統內存的一部分。
Example: Cisco 4451 ISR with IOS Version 16.5.1
Router# show platform hardware qfp active infrastructure exmem statistics
 
QFP exmem statistics
Type: Name: DRAM, QFP: 0
Total: 536870912
InUse: 21627904
Free: 515243008
Lowest free water mark: 515234816
 
Refer to:https://www.cisco.com/c/en/us/td/docs/routers/access/4400/troubleshooting/memorytroubleshooting/isr4000_mem.html#pgfId-1081554
相關文章
相關標籤/搜索