I'd like to get current process CPU/memory usage% by process name/path and print it to the console. the command should output one number and not provide an ongoing data flow like 'ps'.
ps -p PID
doesn't work as:
- I don't have the process number (I do have process path)
- It doesn't print the current measurement once to the console
So for example it should look something like:
$command -getCPU | grep procesPath