]"."/> ]".">

Home >Operation and Maintenance >Linux Operation and Maintenance >How to query server memory in Linux

How to query server memory in Linux

WBOY
WBOYOriginal
2022-01-13 16:09:3113604browse

In Linux, you can use the free command to query the server's memory. This command can be used to display memory usage, including physical memory, virtual swap file memory, shared memory sections, and the system core. Buffer, etc., the syntax is "free [-bkmotV][-s ]".

How to query server memory in Linux

The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

How to query server memory in Linux

The Linux free command is used to display the memory status.

The free command will display memory usage, including physical memory, virtual swap file memory, shared memory segments, and buffers used by the system core.

Syntax

free [-bkmotV][-s <间隔秒数>]

Parameter description:

  • -b Displays the memory usage in Byte.

  • -k Displays memory usage in KB.

  • -m Displays memory usage in MB.

  • -h Display memory usage in appropriate units, up to three digits, and automatically calculate the corresponding unit value. The units are:

B = bytes

K = kilos

M = megas

G = gigas

T = teras

  • #-o Does not display the buffer adjustment column.

  • -s Continuously observe the memory usage.

  • -t Display the memory sum column.

  • -V Display version information.

Example

Display memory usage

How to query server memory in Linux

How to query server memory in Linux

free command default It is the display unit kb, which can be viewed using the free -m and free -g commands, which represent MB and GB respectively

In addition, free -h will automatically choose to display the capacity unit in a suitable understanding

How to query server memory in Linux

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of How to query server memory in Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn