Turns out, The answer was under my nose. I just looked through my notes and found out I had to use this command:
ps aux --sort -%mem | paste -d ' ' > running_processes.csv