Last active
August 29, 2015 14:06
-
-
Save amuraru/7496a1ea5d70758140eb to your computer and use it in GitHub Desktop.
tomcat stacktrace dumper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| */5 * * * * tomcat bash -c "/usr/java/latest/bin/jstack -l `ps aux | grep org.apache.catalina.startup.Bootstrap | grep -v grep | tr -s ' ' | cut -f2 -d' '` >> `ls -d /var/log/tomcat[6-9] | head -1`/stacktrace.log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /var/log/tomcat7/stacktrace.log { | |
| missingok | |
| daily | |
| minsize 1M | |
| compress | |
| create 640 tomcat tomcat | |
| rotate 4 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment