How to monitor Memory and CPU usage of the single process by program/executable name(not PID);
Try this. if you want with program name
mypid=`pidof programname` ; top -p $mypid
top -p `pidof programname`
To monitor one or more instances matching the name:
top -p$(pgrep <program> | tr '\n' ',' | head -c -1)
pgrep -f to search the whole command lines for matches.