#!/bin/bash ### Variables APPNAME=Test-1 #APPNAME=Test-2 ### Execution while true; do PSOUTPUT=`ps -C "python3 ./${APPNAME}.py" -o pid=,%mem=,rss=` # Application is running if [ ! -z "${PSOUTPUT}" ]; then echo ${PSOUTPUT} >> ../Output/${APPNAME}.log fi sleep 1 done &