LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to clear cache (https://www.linuxquestions.org/questions/linux-server-73/how-to-clear-cache-4175594477/)

Qas313 11-29-2016 11:01 PM

How to clear cache
 
Hi All!
I run following commands to flush cache but it didnt work
# sync; echo 1 > /proc/sys/vm/drop_caches
# sync; echo 2 > /proc/sys/vm/drop_caches
# sync; echo 3 > /proc/sys/vm/drop_caches

need guidance as server is stuck since last night.

syg00 11-29-2016 11:54 PM

Why did you do that ?.
And why would you want to ?.

What is your problem ?.

Qas313 11-30-2016 02:03 AM

Sir server showing Disk size is full due to this reason oracle do not establish connection with clients.

Jjanel 11-30-2016 03:28 AM

More specific details would be needed. Do you mean `df`, like this?
Maybe this web-search would help: finding what intitle:cache has filled up linux disk
(I think your commands refer to RAM memory, not disk)
Is there a cache directory? Best wishes. Let us know!

Habitual 11-30-2016 06:52 AM

If your disk is "full", how are you going to write
Code:

sync; echo 1 > /proc/sys/vm/drop_caches
?

terminal>
Code:

sudo df -hT
output please.

sundialsvcs 12-01-2016 09:25 AM

Well, strictly speaking, he can do it because /proc is not a "real" file system. But I don't think that this is going to help his "disk full" problem in any way.

Let us hope that he had the foresight to install LVM = Logical Volume Management on his computer. If he did, all that must be done is to add another physical volume to the "physical storage pool," then assign that storage to the "logical volume" that supports the Oracle database. In a few minutes, and without rebooting the computer, the additional storage will magically appear at this mount-point.

I will flatly say that I think every Linux computer ... server, or personal ... should as a matter of course have LVM in place. "Running out of disk space" is extremely difficult to work-out-of if you don't have it; trivial, if you do.

yadheesh 01-23-2017 05:14 AM

echo 3 > /proc/sys/vm/drop_caches THIS IS THE BEST WAY TO CLEAR THE CACHES IN SERVERS

Habitual 01-23-2017 05:40 AM

Are you wanting to flush the cache to "make room" on the disk? Because that's only going to free up perhaps +/- 1\2 a gig.

Good luck.

syg00 01-23-2017 06:06 AM

/proc is not on-disk.

drop_caches does nothing for recovering disk space, and impedes disk performance.

Don't use what you don't understand. End of story.

Jjanel 01-23-2017 07:02 AM

@yadheesh: please stop 'necroposting' on old inactive threads. Thank you.

BW-userx 01-23-2017 07:13 AM

hard core get rid of it
Quote:

#rm -r /path/to/whatever/it/is

sundialsvcs 01-25-2017 09:56 AM

Quote:

Originally Posted by syg00 (Post 5658954)
Don't use what you don't understand. End of story.

"Truer words hath not been spoken!"

I see lots of people taking a "whack-a-mole" approach to problem-solving: they grab on to "the first thing that they Googled," and then just can't let go of it. They also don't think to ask their colleagues for guidance in understanding and resolving the problem: they just start whacking moles.

"Stop!! Consider. :confused: Explain. :study: Discuss. Argue. ;) Agree. :idea: Act. :cool:"


All times are GMT -5. The time now is 09:16 PM.