Forms memory consumption

The Following query is to get the memory consuming forms sessions.

#!/bin/sh

ALLPROCS=`ps -ef|grep “f60webmx webfile=” | grep -v grep | tr -s ” ” | cut -f3 -d” “`

LOOPCTR=1

for EACHPROC in $ALLPROCS

do

if [ $LOOPCTR -eq 1 ]

then PROCLIST=”${EACHPROC}”

LOOPCTR=2

else PROCLIST=”${PROCLIST},${EACHPROC}”

fi

done

# echo $PROCLIST

# ps -lf -p $PROCLIST -o rss,vsz,osz > f60procinfo.out

TOTMEM=0

PROCCTR=0

PROCMEM=`ps -lf -p $PROCLIST -o rss,vsz,osz | tail +2 | cut -f1 -d” “`

for EACHMEM in $PROCMEM

do

TOTMEM=`expr $TOTMEM + $EACHMEM`

PROCCTR=`expr $PROCCTR + 1`

done

echo “The total memory for the ${PROCCTR} f60 forms processes is ${TOTMEM} KB”

Recent Posts