is there a CLI command you can pass to a linux system(specifically CentOS 3) that will force it to flush the memory file cache and/or swap file without rebooting?
On Mon, 27 Sep 2004, William Warren wrote:
is there a CLI command you can pass to a linux system(specifically CentOS 3) that will force it to flush the memory file cache and/or swap file without rebooting?
If you want to flush the filesystem buffers, try:
sync
If you want to get rid of your swap, you could try:
swapoff -a
But make sure you have sufficient physical memory to do that.
If this was not what you asked for, please rephrase :)
-- dag wieers, dag@wieers.com, http://dag.wieers.com/ -- [Any errors in spelling, tact or fact are transmission errors]
sync did not flush the buffers..also the file cache is at about 136 megs. Under top it is labled as 136587k cached that is what i am looking to clear out. Also how do i turn the swap back on? I am doing this as the various echo commands have still not completly fixed the kernel swapping bug..:(
Dag Wieers wrote:
On Mon, 27 Sep 2004, William Warren wrote:
is there a CLI command you can pass to a linux system(specifically CentOS 3) that will force it to flush the memory file cache and/or swap file without rebooting?
If you want to flush the filesystem buffers, try:
sync
If you want to get rid of your swap, you could try:
swapoff -a
But make sure you have sufficient physical memory to do that.
If this was not what you asked for, please rephrase :)
-- dag wieers, dag@wieers.com, http://dag.wieers.com/ -- [Any errors in spelling, tact or fact are transmission errors]
On Mon, 2004-09-27 at 20:56 -0400, William Warren wrote:
Also how do i turn the swap back on?
swapon /dev/hda3
(substitute your actual swap partition for /dev/hda3 ... you can verify which partition is swap in /etc/fstab or by using the command:
fdisk -l
----------------------- Johnny Hughes http://www.HughesJR.com/
On Mon, 27 Sep 2004, William Warren wrote:
sync did not flush the buffers..also the file cache is at about 136 megs. Under top it is labled as 136587k cached that is what i am looking to clear out. Also how do i turn the swap back on? I am doing this as the various echo commands have still not completly fixed the kernel swapping bug..:(
Ok, can you give me output with an explanation of what you want to do ? My guess is that you are misinterpreting the output of free and make the wrong conclusions.
Many people coming from windows (I was one of them too many years ago) only had the used/free concept and considered everything that is used, as being 'not free'.
Reality is a bit more complicated and Linux makes use of _all_ memory, although much of it can be considered free using the Windows terminalogy.
-- dag wieers, dag@wieers.com, http://dag.wieers.com/ -- [Any errors in spelling, tact or fact are transmission errors]
<sigh> i know about the differences between winders and linux. I know that linux uses memory diffrently. I am not using free..i am using top. Never mind..the swapping has stopped(as i killed the swap) and am waiting for a fixed kernel that is promised in RHEL3 U4.
Dag Wieers wrote:
On Mon, 27 Sep 2004, William Warren wrote:
sync did not flush the buffers..also the file cache is at about 136 megs. Under top it is labled as 136587k cached that is what i am looking to clear out. Also how do i turn the swap back on? I am doing this as the various echo commands have still not completly fixed the kernel swapping bug..:(
Ok, can you give me output with an explanation of what you want to do ? My guess is that you are misinterpreting the output of free and make the wrong conclusions.
Many people coming from windows (I was one of them too many years ago) only had the used/free concept and considered everything that is used, as being 'not free'.
Reality is a bit more complicated and Linux makes use of _all_ memory, although much of it can be considered free using the Windows terminalogy.
-- dag wieers, dag@wieers.com, http://dag.wieers.com/ -- [Any errors in spelling, tact or fact are transmission errors]
On Tue, 28 Sep 2004, William Warren wrote:
<sigh> i know about the differences between winders and linux. I know that linux uses memory diffrently. I am not using free..i am using top. Never mind..the swapping has stopped(as i killed the swap) and am waiting for a fixed kernel that is promised in RHEL3 U4.
Sorry, I probably misinterpreted the question. Don't feel offended.
The buffers value top reports are not only the filesystem buffers, but comprise of all kinds of memory temporarily claimed by the kernel (network buffers, raw disk blocks, ...).
The cache value is the pagecache without the swapped-in cache.
You cannot directly influence both of these values, but you can change the behaviour of the kernel by changing the entries in /proc/sys/vm/ or change the behaviour by stressing the system in various ways.
Also nice is the information you get from /proc/meminfo, which explains better how the kernel is behaving and what memory is actively being used.
More detailed information you can get in the kernel documentation (filesystem/proc.txt) and man proc.
Kind regards, -- dag wieers, dag@wieers.com, http://dag.wieers.com/ -- [Any errors in spelling, tact or fact are transmission errors]