Raspberry Pi - How to Check Your Power Supply and USB Cable

I own a Raspberry Pi and use it as a media center and NAS. I stumbled upon this very good post today: What’s wrong with the Raspberry Pi. And I finally tried to find a good power supply and USB cable to power my Raspberry Pi.

I found a script to help me doing this and I modified it to make it a bit more automated and readable (it spits text instead of a bitfield). Here is the script, you can run it to check if your power supply and cable are good enough to power your pi:

Make sure to install sysbench before you run it:

$ sudo apt-get install sysbench