Taille JVM
for PID in `ps
-ef | grep java | grep -v grep | grep -v LaunchLWI | awk {' print $2 '}`
do
XMX=$( ps -ef | grep -v grep | grep ${PID} | sed -e
's/^.*Xmx//' | awk {' print $1 '} )
if [ "${XMX}" == " " ]
then XMX="NA"
fi
XMS=$( ps -ef | grep -v grep | grep ${PID} | sed -e
's/^.*Xms//' | awk {' print $1 '} )
if [ "${XMS}" == " " ]
then XMS="NA"
fi
MEM_USED=$( ps auxwww | grep -v grep | grep ${PID} | awk
{' print $5 '} )
MEM_USED_MO=$(( ${MEM_USED} / 1024 ))
MEM_RES=$( ps auxwww | grep -v grep | grep ${PID} | awk
{' print $6 '} )
MEM_RES_MO=$(( ${MEM_USED} / 1024 ))
AS=$( ps -ef | grep -v grep | grep ${PID} | awk {' print $NF '} )
printf "Application Server: %-20s Xms : %-5s Xmx : %-5s Mem_Used : %-10s Mo Mem_Res : %-10s Mo \n" ${AS} ${XMS}
${XMX} ${MEM_USED_MO} ${MEM_RES_MO}
done
Aucun commentaire:
Enregistrer un commentaire