How to see what scripts are getting killed or maxing memory?

Greetings,

I’m trying to figure out why my sites are slowing down. Dreamhost support said many of my scripts are getting killed due to using too much memory.

How can I the specific PHP scripts on my sites are getting killed, or especially the ones that cause huge memory spikes? I see a general scripts like php54.cgi , but I don’t know how to get the specific things within my website that are causing problems.

I will also need a way to sort through these to find the ones that use the most memory, even if they aren’t getting killed off.

Thanks
Kind regards