The logs are stored in /var/log, look for one called everything.0.log (or some variation - not everything.log, as that is the current boot session). It’ll be huge (especially if you’ve been running for a while), but you only need to look at the end.
Is it possible you had a power failure? The BIOS can be set to stay off when the power comes back, as opposed to powering up again (which would leave the machine on but not logged in)
How do you know that it was a crash? Does it also happen when you area around?
In my mind there could be two reasons for the unplanned shut down.
a) Loss of power. Could be related to hardware (imminent) failure
You would see nothing in the logs as power was removed before the logs were written.
b) or as chemicalfan pointed out:
Temporary glitch in the power supply causing the system to power off but will not restart as it is not set in the BIOS to do so on power failure
Again you would see nothing in the logs as power was removed before the logs were written.
System crash does not (in my experience) power down. It would just hang in whatever crash state it was.
This would be logged.
If it was a controlled power down then that would leave traces too.
You could try:
tail -f /var/log/syslog
or
cat /var/log/syslog | grep fail
Replace fail with other kewords like: shut halt
you could also try other log files too:
/var/log/dmesg
/var/log/kern.log
I’ll have a look at the logs in the way you describe SeZo.
It has done it while I have been using the PC, it just shut down as if the power button had been pressed…
It has done it while I have been using the PC, it just shut down as if the power button had been pressed..
That sounds suspiciously like a hardware issue to me, maybe a bad memory chip or worse a faulty motherboard, I had a similar issue once and it turned out to be the small capacitors on the motherboard which I’m told is a common fault with some Intel boards , if yours is that type of board have a look at the small capacitors around the cpu if any look like they’re bursting outwards then that is likely to be the problem
I’ve had that happen when the PSU is on it’s way out (normally aggrevated by load, or heat). Eventually, it’ll stop powering up completely (hitting the power button will do nothing).
What make & spec is your power supply? I’d get it replaced, even if just with a cheapo one to test - a dodgy PSU can fry motherboards and god knows what else.
Need to make sure your system isn’t overheating and shutting down because of that. Are all the fans working and all vents clear?
It’s a desktop (spec in sig)
I regularly clean the vents and every 2 months or so, open it up and clean the CPU heat-sink and dust the board down and de-clog the fans from collected dust.
The temp is in acceptable range, so that’s not a problem.
It can’t be the memory as it also did it even before I upgraded from 3Gb to 8Gb.
I have ordered a new CPU, a Phenom II X4 3.4Ghz (est arrival 28/4 - 15/5) so I hope it’s NOT the board.
I DON’T want to have to buy a new MoBo
I’ve just opened up my tower and discovered that the CPU heatsink housing is broken - One of the plastic clips . So I will have to go and buy yet another one. I might look on ebay for a new one to accommodate my new CPU.
It’s more about current than wattage - something that is highly annoying about PSUs. I’ve blown a no-name 650W power supply on my rig which is now happily running a Thermaltake 500W, all because of the maximum current on the “12V rails”.