k_suchdeva
asked on
Scripting for monitoring the memory usage of some processes
Hi All
I need a script which monitors the memory usage of the machine for some specific processes.
Something like
./CheckUtilisation.sh <process handle> <threshold>
and it outputs let's say "Yes" if threshold exceeeds.
Regards
Khem
I need a script which monitors the memory usage of the machine for some specific processes.
Something like
./CheckUtilisation.sh <process handle> <threshold>
and it outputs let's say "Yes" if threshold exceeeds.
Regards
Khem
ASKER
I only want a simple script.
Can not install third party packages.
Can not install third party packages.
what is your Solaris ???
2.6, or 2.7 or 2.8 or 2.9
2.6, or 2.7 or 2.8 or 2.9
ASKER
uname -a
SunOS XXXXXXX 5.7 Generic_106541-16 sun4u sparc SUNW,Ultra-80
SunOS XXXXXXX 5.7 Generic_106541-16 sun4u sparc SUNW,Ultra-80
not for a specified process, but probably worth looking at it:
man sar
man sar
Improve the following script. It should help you.
frequency=3
while (true); do
STATUS=`vmstat $frequency 3| awk -e '{print $5}'`
LASTSTATUS=`echo $STATUS| awk -e '{print $5}'`
if [ $LASTSTATUS -lt <put your trshhold>]; then
echo "TreshHold Exceeds"
<write want to want to do in here(i.e. send mail to
someone)>
fi
done
frequency=3
while (true); do
STATUS=`vmstat $frequency 3| awk -e '{print $5}'`
LASTSTATUS=`echo $STATUS| awk -e '{print $5}'`
if [ $LASTSTATUS -lt <put your trshhold>]; then
echo "TreshHold Exceeds"
<write want to want to do in here(i.e. send mail to
someone)>
fi
done
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:
- Answered by blowfish
Please leave any comments here within the next 7 days
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !
tfewster
Cleanup Volunteer
I will leave a recommendation for this question in the Cleanup topic area as follows:
- Answered by blowfish
Please leave any comments here within the next 7 days
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !
tfewster
Cleanup Volunteer
per recommendation
SpideyMod
Community Support Moderator @Experts Exchange
SpideyMod
Community Support Moderator @Experts Exchange
application RMCmem The MemTool Package
and you have all for memory.
Example:
memps ang gui programms.