Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

CPU and Memory

all star
Occasional Advisor

CPU and Memory

Hi All,

I would like to see my linux box CPU and Memroy utilization to be above 90%.

is there a simple script or program which does this for me?

thanks in advance
-chakri
4 REPLIES
Oviwan
Honored Contributor

Re: CPU and Memory

hy

here is an hpux example for memory:

#!/usr/bin/ksh
while true ; do
mem=$(swapinfo | grep memory | awk '{ print $5 }' | awk '{ gsub(/[%]/,""); print }')

if [ ${mem} -ge 90 ]
then
echo Memory Usage too high ${mem}%
fi
done

Regards
Vitaly Karasik_1
Honored Contributor

Re: CPU and Memory

First at all, 100% memory utilization is normal for linux because kernel uses RAM for caching/buffering.

Big Brother monitor and similar can alert (email, SMS) about certain events.
Ganglia and similar can graph CPU/memory usage.
all star
Occasional Advisor

Re: CPU and Memory

Thanks for the response. i think i did not put my question in correct way.

Actually, i want to make my machine CPU and Memory Utilization to cross 90% is there any tool or script for this?

-chakri
Vitaly Karasik_1
Honored Contributor

Re: CPU and Memory

you can use some of these tools http://ltp.sourceforge.net/tooltable.php or just write a short program for allocating big amount of RAM