If you call the top command, you get all the running processes. But how can I limit the output only to a certain process name like "java"?
I've tried this top -l 2 | grep java but in this way you get only snapshots and not a continuously updated list. And top -l 0 | grep java is not really clear.