schernic
2/3/2017 - 3:53 PM

get process run time

get process run time

if [ $(ps aux | grep tomcat-juli.jar | grep -v grep | awk {'print $2'} | xargs -I $ ps -p "$" -o etimes=) -gt 120 ]; then echo "yes"; fi