LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-29-2016, 11:01 PM   #1
Qas313
LQ Newbie
 
Registered: Oct 2013
Posts: 5

Rep: Reputation: Disabled
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.
 
Old 11-29-2016, 11:54 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
Why did you do that ?.
And why would you want to ?.

What is your problem ?.
 
Old 11-30-2016, 02:03 AM   #3
Qas313
LQ Newbie
 
Registered: Oct 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Sir server showing Disk size is full due to this reason oracle do not establish connection with clients.
 
Old 11-30-2016, 03:28 AM   #4
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
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!

Last edited by Jjanel; 11-30-2016 at 03:30 AM.
 
Old 11-30-2016, 06:52 AM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
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.
 
Old 12-01-2016, 09:25 AM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
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.

Last edited by sundialsvcs; 12-01-2016 at 09:27 AM.
 
Old 01-23-2017, 05:14 AM   #7
yadheesh
LQ Newbie
 
Registered: May 2015
Location: Bangalore
Distribution: Cent-OS
Posts: 18

Rep: Reputation: Disabled
echo 3 > /proc/sys/vm/drop_caches THIS IS THE BEST WAY TO CLEAR THE CACHES IN SERVERS
 
Old 01-23-2017, 05:40 AM   #8
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
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.
 
Old 01-23-2017, 06:06 AM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
/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.
 
1 members found this post helpful.
Old 01-23-2017, 07:02 AM   #10
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
@yadheesh: please stop 'necroposting' on old inactive threads. Thank you.
 
1 members found this post helpful.
Old 01-23-2017, 07:13 AM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
hard core get rid of it
Quote:
#rm -r /path/to/whatever/it/is
 
Old 01-25-2017, 09:56 AM   #12
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
Quote:
Originally Posted by syg00 View Post
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. Explain. Discuss. Argue. Agree. Act. "

Last edited by sundialsvcs; 01-25-2017 at 09:59 AM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cache memory clear snjksh Linux - Server 5 03-10-2014 07:52 AM
how to clear apt-cache coyopil Debian 6 01-29-2014 12:15 AM
How to clear apache cache s_linux SUSE / openSUSE 5 02-04-2010 03:27 PM
how do you clear the cache? eagletalontim Linux - Newbie 11 01-11-2006 03:05 PM
Clear cache raysr Linux - Newbie 2 03-26-2004 01:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration