|Start with the power supply? Is it working properly - delivering the correct voltages; is the actual power cord solid - no breaks in it (usually near to the plug ends)?|
Test/check the power supply voltages with a volt meter. Check the power cord similarly with a meter (ohms setting) wiggling the cord appropriately. Also check the cable by substitution if possible
The psu may have overheated in the recent past; usually there is a dust accumulation in the air/cooling vents. With this on mind blow out all cooling vents, fans etc. also verify the cooling fans on the cpu are ok as well as on the psu.