oom

    命令格式

    oom

    oom -i [interval]

    oom -m [mem byte]

    oom -r [mem byte]

    oom -h | —help

    表 1 参数说明

    使用指南

    • 参数缺省时,显示oom功能当前配置信息。

    当系统内存不足时,会打印出内存不足的提示信息。

    输出说明

    表 2 输出说明

    输出

    说明

    [oom] OS is in low memory state

    total physical memory: 0x1bcf000(byte), used: 0x1b50000(byte), free: 0x7f000(byte), low memory threshold: 0x80000(byte)

    操作系统处于低内存状态。

    整个系统可用物理内存为0x1bcf000 byte,已经使用了 0x1b50000 byte, 还剩0x7f000 byte,当前设置的低内存阈值为0x80000 byte。

    [oom] candidate victim process init pid: 1, actual phy mem byte: 82602

    打印当前各个进程的内存使用情况,init进程实际使用82602byte,其中共享内存按照比例算的。

    [oom] candidate victim process UserProcess12 pid: 12, actual phy mem byte: 25951558

    UserProcess12进程实际使用25951558byte内存。

    [oom] max phy mem used process UserProcess12 pid: 12, actual phy mem: 25951558

    当前使用内存最多的进程是UserProcess12。

    当系统处于低内存的情况下,UserProcess12进程再去申请内存时失败退出。