Troubleshooting
Problem
It is often useful to be able to monitor the size of the processes running on a machine, particularly in the cases of 100% CPU usage and/or performance problems.
Resolving The Problem
Monitoring the size of processes on AIX can be achieved using the ps utility, as carried out with the following command:
./ps.sh ps.log
which uses the following script:
#!/bin/ksh
PS_LOG=$1
# Adjust LIMIT & SLEEP_TIME to suite your purpose/need.
# There are 288 5 minute intervals in 1 day
LIMIT=288
#sleep for 5 minutes
SLEEP_TIME=300
while true
do
i=0
echo >$PS_LOG
while [ "$i" -le $LIMIT ]
do
date >>$PS_LOG
ps avwwwg >>$PS_LOG
echo >>$PS_LOG
i=`expr $i + 1`
sleep $SLEEP_TIME
done
done
where:
LIMIT is the number of log cycles before the log file rolls over
SLEEP_TIME is the amount of time before each log cycle
[{"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Debugging Tools","Platform":[{"code":"PF002","label":"AIX"}],"Version":"5.0","Edition":"J2SE","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21222448