Question: I'm trying to diagnose a possible disk problem on my OSX machine: I heard some funny noises, so I decided to do a read test of the entire disk using dd. 

A few months ago this worked: dd would run for a couple of hours to read 750 GB, and then quit with a message saying 'N bytes transferred in M seconds'

Today, dd runs for a couple of minutes, then terminates with the message 'Killed'. I can't find what causes this. 

I'm using this command:
dd if=/dev/disk1s2 of=/dev/null bs=1024k 
which should keep going until it runs out of blocks to read. 

The system logs don't contain any information on this (no events recorded around the time that dd is killed).

What can I do to solve this?

Answer: 
Use [`ddrescue`](http://www.gnu.org/software/ddrescue/manual/ddrescue_manual.) (via [homebrew](http://brew.sh/) or [macports](https://www.macports.org/)) instead of `dd` which will try and recover from read errors and also log them 

```
ddrescue /dev/disk1s2 hdimage logfile

```
Running `dd` on a damaged drive is a very very bad idea. It will not help and is just further stressing the drive. Instead of `dd` make a backup of your data. If *that* fails, you know your drive is dead and if it doesn't at least you've backed up. If all you want to do is check, just use S.M.A.R.T as @Martin von Wittich suggested.

As to why it is being killed, the reason is probably the [OOM killer](http://en.wikipedia.org/wiki/Out_of_memory). The `dd` you are launching will use quite a bit of memory and if you run out of RAM it will be killed by the OOM killer with the message `killed`.