Created
February 13, 2015 14:13
-
-
Save rangalo/5043c2ceac3c62f21957 to your computer and use it in GitHub Desktop.
This file contains 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
# tomcat alias and functions | |
alias tstart="${CATALINA_HOME}/bin/startup.sh" | |
alias tstop="${CATALINA_HOME}/bin/shutdown.sh" | |
function tkill () { | |
ps -eaf | grep 'java' | grep 'catalina' | grep -v 'grep' | grep -v 'tail' | awk '{ print $2; }' | xargs kill -9 | |
} | |
function logf () | |
{ | |
tail -100f $1 | perl -ple 's/^.*SEVERE.*$/\e[1;37;45m$&\e[0m/ || s/^.*ERROR.*$/\e[1;37;41m$&\e[0m/ || s/^.*WARN.*$/\e[1;33;40m$&\e[0m/' | |
} | |
function catalog () | |
{ | |
logf $CATALINA_HOME/logs/catalina.out | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment