Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux memory management -free learning experience     - Linux upgrade GCC 4.8.1 clear and concise tutorials (Ubuntu 12.04 64-bit version as an example) (Linux)

- String JavaScript type system (Programming)

- To configure Samba to share files with Windows under CentOS (Linux)

- Cobbler batch install Ubuntu / CentOS system (Linux)

- Summary Linux bond of multi-interface load balancing (Linux)

- Close Pycharm spell check (Programming)

- Ten linux version of the system (Linux)

- HomeKit Human Interface Guidelines (Linux)

- To learn linux security (Linux)

- CentOS 6.5 platform offline compile and install PHP5.6.6 (Server)

- To install and use the Doxygen under Linux (Linux)

- Docker Basic and Advanced (Linux)

- Oracle Character Set Summary (Database)

- Oracle 12c of the auto-increment Identity Columns (Database)

- Four IDS intrusion detection tool under Linux environment (Linux)

- Linux Shell Understanding and Learning (Linux)

- Linux with Windows Explorer as a security system (Linux)

- Why everybody ought to know LLVM (Linux)

- Why you should choose Python Programming (Programming)

- grep regular expression (Linux)

 
         
  Linux memory management -free learning experience
     
  Add Date : 2018-11-21      
         
       
         
  Free command to display the free Linux system, physical memory and swap memory is used, and the buffer is used by the kernel. In the Linux system monitoring tool in, free command is one of the most frequently used commands. Here's a free command examples:

1 [root @ linuxhost ~] # free
2 total used free shared buffers cached
3 Mem: 8062392 2092832 5969560 0 187132 1498832
4 - / + buffers / cache: 406868 7655524
5 Swap: 2097148 0 2097148
Here are some of the output from this command information:

The first line: shows the details of memory, such as total memory, used memory, free memory, multiple processes to share memory for buffer memory and a cache memory.

The second line: shows the total buffer memory / cache memory usage and idle conditions. Use the second row total memory used (2092832) -used buffer memory (187132) -used buffer memory (1,498,832) = 406,868. Idle is the total of (8062392) -used cache / buffer memory (406,868) = 7655524.

Third row: shows the total exchange of the total memory, used and free memory. Swap area is created on the HDD to increase the size of virtual memory to increase virtual memory. So the question is:

Buffer cache and what difference does it?

Buffer is the place for specific applications temporarily storing data, and these data can not be used by other applications. This concept is quite similar and bandwidth. When you try to transfer bursty data over the network, if your card can only send a small amount of data, it can turn large amounts of data in the buffer, so that it can accept the card at a lower speed to send the data. On the other hand, the cache is stored for faster access to something that goes by the frequently used data. The other difference is that the buffer cache can be used multiple times and can only be used once. But they provide a temporary storage for your data processing. The following give some Chestnuts for next use.

Chestnuts free to use the command

1. megabytes display memory (common)

This is easy to remember, that is, -m:

1 [root @ linuxhost ~] # free -m
2 total used free shared buffers cached
3 Mem: 7873 2043 5829 0 182 1463
4 - / + buffers / cache: 397 7476
5 Swap: 2047 0 2047
2. There are, in bytes, kilobytes, gigabytes of memory unit display (not used)

Use -b, -k, -g parameter, which can be bytes, kilobytes, gigabytes memory size:

1 [root @ linuxhost ~] # free -b
2 total used free shared buffers cached
3 Mem: 8255889408 2142736384 6113153024 0 191623168 1534803968
4 - / + buffers / cache: 416309248 7839580160
5 Swap: 2147479552 0 2147479552
3. The total usage

Use the -t parameter, it will total more than one line for total usage display:

1 [root @ linuxhost ~] # free -t
2 total used free shared buffers cached
3 Mem: 8062392 2092516 5969876 0 187132 1498832
4 - / + buffers / cache: 406552 7655840
5 Swap: 2097148 0 2097148
6 Total: 10159540 2092516 8067024
4. Close the display buffer row

Use the -o parameter, you can turn off the display of the second line:

1 [root @ linuxhost ~] # free -o
2 total used free shared buffers cached
3 Mem: 8062392 2092764 5969628 0 187132 1498832
4 Swap: 2097148 0 2097148
5. In a fixed time interval to update the current memory usage

Add -s parameter, and then added to an integer will be updated memory usage in regular time intervals after the -s parameter, below I will give an chestnuts, Minato integers bar, updated in the 1024s:

1 [root @ linuxhost ~] # free -o
2 total used free shared buffers cached
3 Mem: 8062392 2092764 5969628 0 187132 1498832
4 Swap: 2097148 0 2097148
6. Additional shows a low and high memory statistics

Use the -l option to display additional low and high memory size statistics:

 
1 [root @ linuxhost ~] # free -l
2 total used free shared buffers cached
3 Mem: 8062392 2092516 5969876 0 187132 1498832
4 Low: 8062392 2092516 5969876
5 High: 0 0 0
6 - / + buffers / cache: 406552 7655840
7 Swap: 2097148 0 2097148
 
7. Review the free version command

The -V parameter display version information:

1 [root @ linuxhost ~] # free -V
2 procps version 3.2.8
     
         
       
         
  More:      
 
- CentOS 6.5 installation and simple configuration Nginx (Server)
- MongoDB study notes - polymerization (Database)
- Linux firewall iptables beginner tutorial (Linux)
- Java to achieve local fileCopy (Programming)
- extundelete: the Linux-based open source data recovery tools (Linux)
- Use PDFBox parse PDF file (Linux)
- Fedora 21 setting boot script (Linux)
- How to install GIMP 2.8.16 in Ubuntu 16.04,15.10,14.04 (Linux)
- Learning how to teach safety system to prevent your own IP leakage (Linux)
- learning Linux ls command examples (Linux)
- Linux System Getting Started Learning: The Linux log (Linux)
- Install the system cleaning software under Linux: BleachBit 1.4 (Linux)
- Linux disk partition batch format mount script (Linux)
- DDOS Attacks and Prevention (Linux)
- Performance comparison Fibonacci recursive and non-recursive (Programming)
- Add a custom encryption algorithm in OpenSSL (Linux)
- Mac Docker deploy development environment (Server)
- RHEL7 system making use of OpenStack mirror (Linux)
- CentOS 7 Configure logging (VirtualBox) (Linux)
- VMware virtual machine Ubuntu install arm-linux-gcc cross-compiler environment (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.