Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I check for bad blocks, bad memory, etc. using only software solutions? I'm using Ubuntu 11.04.

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

Check out badblocks if you want a utility that is specifically designed to write/read each LBA of a drive, testing for errors on the way. badblocks offers nondestructive and destructive tests (as noted below it's not overly useful on modern hard drives, though).

If you want to keep up with your drive's SMART parameters, check out smartctl.

There's no thorough memory test software that I know of that works while Linux is running, but you can boot into memtest86+ which is a well-respected utility that gives your RAM a good well-rounded test.

Compiling a Linux kernel stresses both the CPU and RAM to a high degree. If you get errors at random locations during the process (as opposed to reproducible errors) while compiling it could indicate a RAM or CPU problem.

There is also a utility called stress that can saturate your system with threads causing CPU usage to stay high if you want to test your CPU.

lm-sensors, when configured correctly, will let you look at things like temperatures, fan speeds, and any onboard voltage sensors.

share|improve this answer
1  
A note about badblocks: I don't see how it could work, since modern drives just redirect bad blocks to spare ones. –  Mehrdad Jun 9 '11 at 2:18
1  
Drives do redirect bad blocks, but these will be reported by SMART. Running badblocks will make sure the drive actually checks all the blocks. Normally, drives do not run self-validation checks. –  i_grok Jun 10 '11 at 2:01
add comment

Take note that you should watch the output of the dmesg utility while running memory/CPU stress tests. You'll see nasty error messages from the kernel if there are memory errors, especially if your hardware is equipped with ECC capability.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.