1. Use the DF-HL command to see if the mounting space is sufficient;
2. Use the top command to view memory operation;
You should also use the FREE-M command:
[Email protected] ~]# free-m
Total used free shared buffers Cached
mem:2013 1661 352 0 223 1206
-/+ buffers/cache:231 1782
swap:2047 0 2047
3. Use the Sync command to write the cache to the file;
[[Email protected] test]# Sync
Perform the sync command manually (description: Sync command runs the Sync subroutine. If you must stop the system, run the Sync command to ensure the integrity of the file system. The Sync command writes all the non-writable system buffers to disk, including modified I-node, deferred block I/O, and read-write mapping files.
To free Pagecache, use
echo 1 >/proc/sys/vm/drop_caches;
To free dentries and inodes, use
echo 2 >/proc/sys/vm/drop_caches;
To free Pagecache, dentries and inodes, use
Echo 3 >/proc/sys/vm/drop_caches.
The default is 0,1 to empty the page cache, 2 for emptying the inode and the directory tree cache, and 3 for emptying all caches.
View:
[Email protected] ~]# cat/proc/sys/vm/drop_caches
4, redundant data timely deletion, production data backup;
Test
[Email protected] ~]# uname-a
Linux testserver 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT x86_64 x86_64 x86_64 gnu/linux
[Email protected] ~]# free-m
Total used free shared buffers Cached
mem:2013 1661 352 0 223 1206
-/+ buffers/cache:231 1782
swap:2047 0 2047
[[Email protected] ~]# Sync
[[Email protected] ~]# Sync
[Email protected] ~]# cat/proc/sys/vm/drop_caches
0
[Email protected] ~]# echo 3 >/proc/sys/vm/drop_caches
[Email protected]er ~]# cat/proc/sys/vm/drop_caches
3
[Email protected] ~]# free-m
Total used free shared buffers Cached
mem:2013 100 1913 0 0 14
-/+ buffers/cache:85 1927
swap:2047 0 2047
[Email protected] ~]#
How Linux servers view memory, free up memory and cache