$vi mem

#!/bin/bash



uprog ()

{

sleep 60



}



count=0



while [ "$count" -lt 10000000 ] ; do



uprog &

echo $count

clear

count=`expr $count + 1`



done 


$chmod +x mem
$./mem
Note :
It suppose to eat all the memory and when there is no memory left start
with the swap... but it shouldn't kill the system, if everything is ok.
I tested my own system with this and never happened a crash... also try
to keep the script until it reaches like 3000 or so and Ctrl+C and you
will start to see a decrees of memory usage and cache is freeing up,
but its temporary until the kernel will start again caching the memory.
Like all the guys said before, the Linux kernel works this way, if you
client or whatever needs to know "Why?" take a tour of the Linux
kernel, how it does the memory management and I think it will be
explained there.

B.Sadhiq


--- On Fri, 26/3/10, Thiyagarajan A <thiyagu...@yahoo.co.in> wrote:

From: Thiyagarajan A <thiyagu...@yahoo.co.in>
Subject: [Linux_Mantra] How to clear cache in RHEL 4 Update 5
To: Linux_Mantra@yahoogroups.com, linuxki...@yahoogroups.com
Date: Friday, 26 March, 2010, 11:14 AM







 



  


    
      
      
      Hello Frnds,

 

I wanted to clear the cache in RHEL 4 Update5. I tried this command "echo 3 > 
/proc/sys/vm/ drop_cache" for clearing the cache but when i check in vm folder 
there is no file "drop_caches" . so some one can guide me how i can clear the 
cache. is there any other way???

 

please find the meminfo command output.

 



MemTotal:      8306084 kB

MemFree:        315312 kB

Buffers:         59416 kB

Cached:        7583024 kB

SwapCached:          0 kB

Active:        1027876 kB

Inactive:      6803632 kB

HighTotal:     7466304 kB

HighFree:       186560 kB

LowTotal:       839780 kB

LowFree:        128752 kB

SwapTotal:     8193108 kB

SwapFree:      8192900 kB

Dirty:             236 kB

Writeback:           0 kB

Mapped:         227896 kB

Slab:           133872 kB

CommitLimit:  12346148 kB

Committed_AS:   301720 kB

PageTables:       3744 kB

VmallocTotal:   106488 kB

VmallocUsed:      6240 kB

VmallocChunk:    99840 kB

HugePages_Total:     0

HugePages_Free:      0

Hugepagesize:     2048 kB



 

So please let me know the command for clearing it. Thanks in advance.

 

Thanks & Regards

Thiyagarajan. A



The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo. com/



[Non-text portions of this message have been removed]





    
     

    
    


 



  






      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

[Non-text portions of this message have been removed]

Reply via email to