Common usage summary of free commands under Linux

  
                

Recently, Xiaobian of the System Home found that many Linux beginners don't know much about the free command. In fact, the free command under Linux is mainly used to check the current system memory usage. Let's take a look at it with Xiaobian.

free Linux command to display the idle system, used swap memory and physical memory, and is used by the kernel buffer. In the Linux system monitoring tool, the free command is one of the most frequently used commands

1. Command format:

free [parameters]

2. Command Function:

The free command displays system usage and free memory conditions, including physical memory, swap area memory, and kernel buffer memory. Shared memory will be ignored

3. Command parameters:

-b Displays memory usage in Bytes.

-k Displays memory usage in kilobytes.

-m Displays memory usage in megabytes.

-g Displays memory usage in GB.

-o Does not display the buffer adjustment column.

-s "Interval Seconds" Continuously observe memory usage.

-t Displays the memory sum column.

-V Displays version information.

4. Example:

Instance 1: Display memory usage

Command:

The code is as follows:

free

free -g< Br>

free -m

Output:

The code is as follows:

[root@SF1150 service]# free

total used free shared buffers Cached

Mem: 32940112 30841684 2098428 0 4545340 11363424

-/+ buffers/cache: 14932920 18007192

Swap: 32764556 1944984 30819572//p "p"

[root@SF1150 service]# free -g

total used free shared buffers cached

Mem: 31 29 2 0 4 10

-/+ buffers /cache: 14 17

Swap: 31 1 29"/p" "p"

[root@SF1150 service]# free -m

total used free shared buffers Cached

Mem: 32168 30119 2048 0 4438 11097

-/+ buffers/cache: 14583 17584

Swap: 31996 1899 30097

free command output Detailed content Ming:

The following is an explanation of these values:

total: Total physical memory size.

used: How old has been used.

free: How many are available.

Shared: Total memory shared by multiple processes.

Buffers/cached: The size of the disk cache.

Third line (-/+ buffers/cached):

used: How old it is.

free: How many are available.
Previous12Next Total 2 Pages

Copyright © Windows knowledge All Rights Reserved