Subscribe to aSkDba.org Forum Posts

Enter your email address:

Delivered by FeedBurner


Askoracledba's Weblog Tech@aSkDbA.org


AskDBA.org Forum » DBA - Wiki

Monitoring top 10 memory consuming process on AIX

(1 post)
Average Rating For This Topic:

Rate This Topic Yourself:
  • Started 11 months ago by Amit Bansal

Tags:


  1. Amit Bansal

    Oracle DBA
    Joined: Jun '08
    Posts: 44

    offline

    At times, you wish to find the processes with maximum memory consumption. This can be easily done using following command. Copy contents in file and run it like as vmstat command

    ### Usage mem_mon.sh (interval) (occurences) e.g sh mem_mon.sh 2 10 ###
    ### This will give top 10 memory consuming processes #####
    wt_time=$1
    lmt=$2
     let a=0
    while [[ $a -lt $lmt ]] ; do
    ps axwv |sort -nrk 7,7|grep -v "COMMAND" \
    |awk 'BEGIN {printf ("MemoryinKb \t ProcessId \t PerCPU \t PerMem \t Command \n")}{t=t+$7 - $10 ;printf("%13d \t %10d \t %6.2f \t %6.2f \t %s \n",$7 - $10,$1,$11,$12,$13)}END{print t}'|head -10
     let      a+=1
    sleep $wt_time
    done
    
    Posted 11 months ago #

RSS feed for this topic

Reply

You must log in to post.

151 posts in 54 topics over 26 months by 40 of 79 members. Latest: bertjacobs, karlwasser, orindaglance