• IOS XE-show memory


    有些时候,我们可能会遇到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
    好好学习,天天向上!
  • 相关阅读:
    Selenium系列(十五)
    Selenium系列(十四)
    Selenium系列(十三)
    Selenium系列(十二)
    Linux常用命令
    Linux
    Linux常用命令
    Linux常用命令
    Mysql常用sql语句(2)- 操作数据表
    Linux常用命令
  • 原文地址:https://www.cnblogs.com/MomentsLee/p/10385167.html
Copyright © 2020-2023  润新知