Zend certified PHP/Magento developer

My computer often restarts randomly, how do I know what’s the issue?

It has been happening for long.

I have no idea why.

We changed GPU. We changed fans to make sure that CPU is cool. We changed power supply.

We really have no idea why.

It just restart.

I wonder if there is an app that can log things like temperature or anything that can enable us to see why the computer is restarting again and again?