Hey first try taking out everything you can and get to bare bones. Pull all but one stick of ram, any extra drives/DVDROMs/vid cards... anything beyond barebones. If a system boots up and then shortly after turns off, it's usually due to heat (which you've monitored) or not enough power from the PSU. As the devices power up, anything putting it over the max wattage and lights out. It may appear to be random as some parts can have different draws depending on workload.