Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to clear the system cache by centos6.2

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article focuses on "how to clear the system cache by centos6.2". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "centos6.2 how to clear the system cache"!

1. Use the free-m command to check memory usage

The code is as follows:

Total used free shared buffers cached

Mem: 3832 2716 1115 0 95 1483

-/ + buffers/cache: 1137 2695

Swap: 6015 0 6015

From the above, we can see that there are as many as 1483m of cache in memory. Fortunately, my memory is 4G, so if it is 2G, I can't stand it.

2. Use sync command to force the data stored in buffer to be written to the hard disk

3. Use the following command to clear the cache and free up space.

The code is as follows:

Echo 3 > / proc/sys/vm/drop_caches

4. Use the free-m command to check the memory usage

The code is as follows:

Total used free shared buffers cached

Mem: 3832 1176 2655 0 0 169

-/ + buffers/cache: 1006 2825

Swap: 6015 0 6015

OK, the above steps are fine. In fact, the final step is the third step. Sometimes the cache is extremely high after watching a movie or downloading a file under linux, but now it is solved.

At this point, I believe you have a deeper understanding of "how to clear the system cache by centos6.2". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report