The article below may be able to help you with this issue.
Click on the link below to see more details and screenshots.
I've quoted some helpful highlights for you:
Use Apple Hardware Test
- Open the Help Viewer’s Action pop-up menu (looks like a gear) and choose Print to print these instructions.
- Disconnect all external devices except the keyboard, mouse, display, and speakers. If you have an Ethernet cable or external DVD drive, disconnect them.
- Restart your computer, holding down the D key while the computer restarts.After your computer restarts, you should see the Apple Hardware Test chooser screen. If you don’t, Apple Hardware Test may not be available on your computer.
- You may be able to start Apple Hardware Test from the Internet. Reconnect your computer to the network, and then restart your computer while holding down both the Option and D keys.
- When the Apple Hardware Test chooser screen appears, select the language you want to use, and then press the Return key or click the right arrow button.
- When the Apple Hardware Test main screen appears (after about 45 seconds), follow the onscreen instructions.
Apple Hardware Test diagnoses and detects problems with your computer’s internal hardware components, such as the logic board, memory, and wireless components. It does not check external hardware components, such as USB or FireWire, or non-Apple devices, such as PCI cards from other vendors. Apple Hardware Test does not check for operating system (OS X) or software-related problems such as app or extension conflicts.
You may be able to start up your computer with Apple Hardware Test even if the computer does not start up using OS X.
If Apple Hardware Test detects a problem, it displays an error. Make a note of it before pursuing support options. If you are able to start up your computer using OS X, you can retrieve the error and send the information to Apple, using the System Information utility (Choose Apple menu > About This Mac, and then click More Info).
If Apple Hardware Test does not detect a hardware failure, the problem may be software related. To reinstall OS X, see this help topic:
I hope this information helps ....
Have a great day!