Skip to content

Instantly share code, notes, and snippets.

@tmoreira2020
Created November 19, 2011 20:04
Show Gist options
  • Save tmoreira2020/1379288 to your computer and use it in GitHub Desktop.
Save tmoreira2020/1379288 to your computer and use it in GitHub Desktop.
Script para executar um teste de cargar e coletar logs
if [ -d $1 ] && [ -n "$1" ]; then
service tomcat stop
sleep 20
tar -czvf /opt/liferay-portal-tomcat-6.0-ee-sp1/tomcat-6.0.32/logs/tomcat_logs.tgz /opt/liferay-portal-tomcat-6.0-ee-sp1/tomcat-6.0.32/logs/*
cp /opt/liferay-portal-tomcat-6.0-ee-sp1/tomcat-6.0.32/logs/tomcat_logs.tgz $1
rm -rf /opt/liferay-portal-tomcat-6.0-ee-sp1/tomcat-6.0.32/logs/*
mv /opt/liferay-portal-tomcat-6.0-ee-sp1/dump* $1
service tomcat start
/opt/liferay-portal-tomcat-6.0-ee-sp1/get-java-thread-memory-dump.sh Bootstrap
else
echo "Você precisa passar o diretório para onde as métricas devem ser salvas."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment