Check out...
..for commands.
Once you are in top you can sort by using Shift-M for %MEM, and Shift-P for %CPU.
You can use top with a single PID..
..and cat the info as needed...
Also, check out the man pages for free(), and vmstat()... might have even more info that you could use as well...