1754016 Members
7624 Online
108811 Solutions
New Discussion юеВ

Re: 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 4
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