有些时候,我们可能会遇到IOS XE设备的high memory的情况。我们可以使用的命令去查看相关信息。

例如:

Router# show version

Router# show memory

Router# show processes memory

Router# show platform software status control-processor brief

Router# show platform resources

Router# show processes memory platform sorted

接下来,对上述命令进行解释。

show ver不用说明了,查看设备的软件版本,运行时间、physical memory、flash memory等情况。

1、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
 
2、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%的系统内存正在使用中)。
 
3、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
 
4、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,虚拟集大小)。
 
5、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

IOS XE-show memory的更多相关文章

  1. Cisco IOS和IOS XE 新漏洞检测与修复

    Cisco IOS/IOS XE 新漏洞检测与修复 CVE-2018-0150 Cisco IOS XE 存在默认弱口令 漏洞影响: 默认弱口令可以导致攻击者直远程登录控制Cisco设备.受影响版本, ...

  2. iOS - Block产生Memory Leaks循环引用导致的内存泄漏以及解决方案

    在ARC(自动引用技术)前,Objective-c都是手动来分配释放 释放 计数内存,其过程非常复杂. ARC技术推出后,貌似世界和平了很多,但是其实ARC并不等同于Java或者C#中的垃圾回收,AR ...

  3. 【转】iphone - ios app maximum memory budget

    https://stackoverflow.com/questions/5887248/ios-app-maximum-memory-budget device: (crash amount/tota ...

  4. iOS中的交换空间(swap space)

    看来是没有交换空间,原因是闪存和SSD硬盘相比,速度很慢,也有电源管理的原因. the NAND flash is not designed to be used as swap. It is dam ...

  5. iOS Crash日志

    Understanding Crash Reports on iPhone OS https://developer.apple.com/videos/wwdc/2010/?id=317 http:/ ...

  6. iOS单个应用程序的最大可用内存是多少?

    iOS单个应用程序的最大可用内存是多少?   StackOverflow上有人做了一些简单的测试,有限设备下迄今为止测到的结果: iPad1: 127MB/256MB/49% (大致crash临界值 ...

  7. iOS CoreAnimate

    iOS CoreAnimate 东西比较多,这篇笔记是入门用的,主要讲述的是静态的图形绘画处理问题.(当然动画也只是一小部分)理解相关的概念问题:   参考资料 http://segmentfault ...

  8. iOS: Crash文件解析(一)

    iOS Crash文件的解析(一) 开发程序的过程中不管我们已经如何小心,总是会在不经意间遇到程序闪退.脑补一下当你在一群人面前自信的拿着你的App做功能预演的时候,流畅的操作被无情地Crash打断. ...

  9. 25个增强iOS应用程序性能的提示和技巧(高级篇)(2)

    25个增强iOS应用程序性能的提示和技巧(高级篇)(2) 2013-04-16 14:56 破船之家 beyondvincent 字号:T | T 在开发iOS应用程序时,让程序具有良好的性能是非常关 ...

随机推荐

  1. ffmpeg 音频常用命令

    ffmpeg的使用方式: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... Stream ...

  2. linux php 扩展安装

    phpize./configure --with-php-config=/usr/bin/php-config make && make install

  3. idea配置checkstyle/findbugs/pmd插件

    前提条件:工程已导入idea 一,Findbugs/PMD/CheckStyles插件安装 打开settings的plugins,点击查找FindBugs-IDEA/PMDPlugin/CheckSt ...

  4. SQLAlchemy -高级查询

    查询 # -*- coding: utf-8 -*-   from sqlalchemy.orm import sessionmaker   from SQLAlchemy.create import ...

  5. python正则元字符的含义

    练习的时候使用linux+ipython,ipython安装 python的元字符 # 元字符 :#  .   ^   $   *   +   ?   {}  []   \   |   () 注:\w ...

  6. QT+VS中使用qDebug()打印调试信息无法显示

    首先右键点击项目名称,找到最后一项属性 然后依次设置为如图所示即可 再次编译后,会弹出CMD窗口,出现qDebug的调试信息.

  7. const在C与C++中的区别

    在C中,const不是常量,只能说是一个不能改变的变量(注意是变量),C编译器不能把const看成看成一个编译期间的常量,因为他在内存中有分配,C编译器不知道他在编译期间的值.所以不能作为数组定义时的 ...

  8. FreeRTOS学习笔记3:内核控制及开启调度器

    内核控制函数API 应用层中不会用到taskYIELD() //任务切换.会自动切换当前就绪表里优先级最高的任务 临界区 //不能被打断的代码段任务中进入临界区任务中退出临界区中断服务进入临界区中断服 ...

  9. 概率 lightoj 1027

    题意 : 在n个门前选择一扇门出去, 然后如果第i扇门的 Xi值是正的话,你会花费Xi时间后出去 , 如果Xi是负数的话你会花费-Xi时间后回到老地方,并且忘记了刚才的选择, 选择一扇门的概率是等概的 ...

  10. 微信小程序UDP通信

    前言 UDP通信分为单播 广播 组播,基础库2.7.0之后,小程序开始支持UDP通信,目前小程序只支持单播. 小程序API 小程序UDP通信这一块可以说是很简单了就一个UDPSocket实例.然后bi ...