oom

Command Function

This command is used to query and set the low memory threshold and the page cache reclaim threshold.

Syntax

oom

oom -i [interval]

oom -m [mem byte]

oom -r [mem byte]

oom -h | --help

Parameters

Table 1 Parameter description

Parameter

Description

Value Range

-i [interval]

Sets the interval (in ms) for checking the Out Of Memory (OOM) thread task.

100 to 10000

-m [mem byte]

Sets the low memory threshold (in MB).

0 (disables the low memory check) to 1

-r [mem byte]

Sets the page cache reclaim threshold.

Ranging from the low memory threshold to the maximum available system memory

-h | --help

Displays help information.

N/A

Usage

  • If no parameter is specified, the current OOM configurations are displayed.

    NOTE: When the system memory is insufficient, the system displays a message indicating the insufficiency.

Output

Table 2 Output

Output

Description

[oom] OS is in low memory state

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

The memory usage of the OS is low.

The available physical memory in the entire OS is 0x1bcf000 bytes, 0x1b50000 bytes have been used, and 0x7f000 bytes are available. The current low memory threshold is 0x80000 bytes.

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

The memory usage of each process is printed. The init process uses 82602 bytes, and the shared memory is calculated based on the proportion.

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

The actual memory used by the UserProcess12 process is 25951558 bytes.

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

The process that uses the most memory currently is UserProcess12.

excFrom: User!

The system memory is low, and the UserProcess12 process fails to apply for memory and exits.