Well, what is your definition of 'crashed'? If crashed is a hard lockup during use of the OS, then you just reboot and try again (but in an ideal world you would find and solve the problem, then post the solution on LQ

). But if your definition of crashed is a OS/hardware failure which requires an OS format or new hardware, then it could be harder to fix. If either one happens, you should be able to know if it happened or not

. Anyhoo, you can use e2fsck to check your hard drive for corruption, bad blocks/superblocks/etc., and you can use Memtest86:
http://memtest86.org
to check your RAM. The longer it runs without crashing, the better your RAM is. A day or two without crashing means you have no problems with RAM. For the CPU, I think Prime95 can do that (don't know the link, sorry). Be careful about overclocking, that can start system crashes (freezes when it gets too hot, how ironic

).