Diagnostics of the mac os system. TechTool Pro is a functional Mac diagnostic utility

Which allows you to diagnose problems with equipment in Mac computers released before June 2013. But if your device is younger, ANT will no longer run on it: instead, the computer will use the Apple Diagnostics program.

In fact, both programs are not much different from each other. Unless Apple Hardware Test has a simpler and older interface, while “ Apple Diagnostics» everything is done in a new "flat" stylish design. In addition, the latter is adapted to the latest Apple computers and diagnoses and recognizes problems with the computer's internal hardware components, such as the motherboard, memory, and devices wireless communication.

If you think that your mac problems with hardware, there is a convenient way to check this.

First, turn off the computer and turn it on while pressing the D key until the Apple Diagnostics loading screen appears.


After that, select the language - this will make it easier to work with the program.


The basic test takes two to three minutes. If no problems are found, you will see a corresponding message. But if there are problems, the system will not only find them, but also describe in detail what the problem might be, and for some problems it will offer solutions before contacting service center.


Under each error you will find its unique code - if the problem is serious, it is better not to self-medicate. For warranty computers, you must contact, tell her the error code, after which experts will tell you what to do next. Do not despair if the Mac is no longer under warranty - as a rule, they know all the error codes and will be able to immediately tell you how much the repair may cost.


To exit Apple Diagnostics, turn off your computer. If you want to immediately contact the company's support, click "Get started".

Given the fact that smart guys are increasingly offering to buy a brand new Macbook at a very good price, I decided to write this text. In it, I will tell you how to understand exactly what you are buying for your hard-earned money.

Quite often lately they called me and asked what they had with a brand new macbook. In some cases, there was a rather interesting, but no less sad precedent for the owner. Most often there was such a situation - the victim was looking for a cheaper place to buy a brand new MacBook. Of course, last but not least, the search went to flea markets like Avito. There was a vendor there offering a top-of-the-line laptop at a price far below our official retail. At the first inspection, everything was as it should be. The laptop is packed, in a film, when opened, the cloth lay on the keyboard as it should. Opening the “Ow this Mac” window also showed the maximum configuration. The happy buyer gave his money and went home reassured. But it was not there…
In fact, the configuration turned out to be far from the one that the unlucky comrade bought. In all cases, these were the cheapest Macs. The guys just cheated the system and wrote what is installed in the maximum configuration. I will not explain how this is done, I will only say that this is a matter of 10-15 minutes. And your dead macbook turns into an ultra-modern monster ... But fortunately, there is a way to make sure and see exactly what you are giving your money for. He is the only one whose result cannot be influenced in any way.


I think some have heard about such a thing as the Apple Hardware Test. It is needed by Apple service repairers to diagnose the problem. But it can also serve us very well. All that is required for this is to press the D button when loading (in some cases Cmd + D). Then we get into such a window. Russian is also available. We press next.


This is where all the information about the hardware of the laptop is available to us.
Moving through the tabs, we can see the section of interest to us: (interestingly, in my Macbook Pro Retina shows the screen resolution, which in this moment specified in the settings, not the actual 2800x1800 pixels.)




You can also click the "Test" button and check the filling of the computer in order. During the test, the coolers accelerate to maximum speed for a while, there is nothing to be afraid of.






After the end of the test, you will be given an answer whether it is worth transferring money to the seller.

That's all, I hope this little guide will save you from spending your hard-earned money for no one knows what.

The easiest way to avoid the help of service centers when looking for hardware problems (not all of them have a good reputation) is to use the built-in Mac diagnostics. In this article, we will tell you how to launch and use " " and " Apple Diagnostics».

With the help of standard diagnostic tools, you can effectively detect hardware malfunctions (problems with hard drive, solid state drive, RAM, GPU, motherboard and other nooks and crannies of iron). How to do it?

On which Macs which utility

Regardless of (MacBook, iMac, Mac mini or Mac Pro) and year of release, the operating system includes a hardware self-diagnosis utility. In computers that were released before June 2013, it is called " Apple hardware functional test" (Apple Hardware Test - AHT), and after - " Apple Diagnostics».

Before running any of the utilities, be sure to turn off all peripheral devices (including optical drives, if such antiquity still exists) except for the keyboard, mouse, display and Ethernet adapter. Some versions of OS X Lion and later may require Ethernet or Wi-Fi to run the internet version of AHT. It is no different from the offline counterpart.

To use AHT, be sure to connect your MacBook to a power source.

List of keyboard shortcuts

If there is no mouse, then the following shortcuts will come in handy:

  • Options (⌥) + D: start diagnostics with internet;
  • Command (⌘) + G: start operation;
  • Command (⌘) + L: display a list of languages;
  • Command (⌘) + R: start the test again;
  • S: off;

How to Run Diagnostics on Mac ("Apple Hardware Functional Test" or "Apple Diagnostics")

Note: " Apple hardware functional test" and " Apple Diagnostics' work in the same way. The only caveat is to run " Apple Diagnostics” requires an active Internet connection, and the interface will be much prettier.

1 . Turn on or restart your Mac if it is turned on.

2 . While powering on, press and hold the " D” until the language selection screen appears.

3 . Select the language (if a mouse is not connected to the computer, then select the language using the arrows, and enter using the "Enter" key).

4 . Mac diagnostics will start.

After the test is completed, the results will be displayed.

To exit the ANT utility, click the " Reload" or " Switch off» at the bottom of the window.

What do the results say?

If during the test, problems with the hardware are detected, then get ready to contemplate the error and some explanatory details.

You can decipher AHT errors on the Apple technical forum, and in general I recommend that you go there first of all when looking for solutions to problems with apple gadgets. True, you will need knowledge of English at least with a dictionary.

Apple Diagnostics error codes and their decoding can be found below:

ADP000- Problems on the computer are not found;

CNW001, CNW003, CNW004, CNW005, CNW006- There are problems with the Wi-Fi module on the computer;

CNW007, CNW008- Not detected WiFi networks. There are no Wi-Fi networks available, or the Wi-Fi module is defective;

NDC001, NDC003, NDC004, NDC005, NDC006- Faulty camera;

NDD001- There is a problem with the USB module. Disable everything external devices, except for the keyboard, mouse, and Ethernet adapter. Run the test again. If this code appears again, contact the service center;

NDK001, NDK003, NDK004- There is a problem with the keyboard;

NDL001- There is a problem with the Bluetooth module;

NDR001, NDR003, NDR004- There is a problem with the trackpad;

NDT001, NDT002, NDT003, NDT004, NDT005, NDT006- There may be a problem with the Thunderbolt module. Disconnect external Thunderbolt devices and run the test again. If this code appears for the second time, contact the service center;

NNN001- Could not be found serial number. The computer needs service, contact the service;

PFM001, PFM002, PFM003, PFM004, PFM005, PFM006, PFM007- There is a problem with the system management controller (SMC);

PFR001- There may be a problem with the computer's firmware;

PPF001, PPF003, PPF004- There may be a problem with the fan;

PPM001- There is probably a problem with the memory module;

PPM002, PPM003, PPM004, PPM005, PPM006, PPM007, PPM008, PPM009, PPM010, PPM011, PPM012, PPM013, PPM014, PPM015- There may be a problem with the built-in memory;

PPP001, PPP002, PPP003- There is probably a problem with the MagSafe power adapter. Try unplugging the power adapter from your Mac and from the wall outlet, then plug it back in. Run the test again. If this code appears for the second time, contact the service center;

PPP007- There may be a problem with the power adapter or it is not connected. To test the power adapter, reconnect it to your computer and a power outlet. Run the test again. If this code appears for the second time, contact the service center;

PPR001- There is probably a problem with the processor;

PPT001- Failed to detect the battery;

PPT002, PPT003- The battery will need to be replaced soon. It is serviceable, but its capacity has decreased.

PPT004, PPT006- The battery needs service. The battery is defective, although this may not affect its performance or capacity;

PPT005- The battery is installed incorrectly. Shut down and turn off your computer;

PPT007- The battery on your Mac needs to be replaced. The battery is good, but its capacity has decreased significantly. Until you replace the battery, you can continue to use it without harming your computer.

VDC001, VDC003, VDC004, VDC005, VDC006, VDC007- There is probably a problem with the SD card reader;

VDH002, VDH004- There is probably a problem with the storage device;

VDH005- Unable to start macOS recovery;

VFD001, VFD002, VFD003, VFD004, VFD005, VFD007- There is probably a problem with the display;

VFD006- There is probably a problem with the GPU;

VFF001- There is probably a problem with the audio hardware component.

In any case, if it was not possible to avoid repairs at the service center, we strongly recommend that you contact only certified specialists who specialize exclusively in Apple technology. It will cost a lot, but buying a new gadget is much more expensive. It’s better to forget about the basement workshops “at Uncle Vasya’s”. Repairing apple devices requires a very meticulous approach and advanced skills.

Any device, regardless of its complexity, from time to time requires a routine inspection in order to quickly track emerging problems, eliminate them in time at the inception stage and prevent reappearance. Despite the fact that Macs (both desktop and mobile) are famous for their reliability, they, too, should be prevented from time to time. Mac OS X contains many various settings and temporary elements, both at the software and hardware levels, that can affect the operation of the system as a whole and individual applications. We will talk about this in today's article.

We want to warn you right away that not all of the tips below should be used in any case - some of them are recommended only for obvious problems.

IRON PREVENTION

Prevention of hardware by the user consists in working with PRAM and PMU settings, disk boot volume data and partition table structure. With proper user skill and experience in assembling and disassembling your Mac, you should regularly clean its insides from dust.

  • Checking the main disk partition

We restart the computer, but we do not boot as usual, but from the recovery disk or from any other bootable volume (installation DVD, backup copy main section, etc.). During the boot process (when using the installation DVD) or after a full boot, run disk utility and, having selected the main partition with the system in it, we perform a disk check in order to find out if everything is in order with the structure of the disk file system. The same check can be done by booting in normal mode, but in case of booting from another medium, the check efficiency will be slightly higher.

  • Apple Hardware Test

For any Mac, there is also an official tool for testing hardware for errors. It's called the Apple Hardware Test and can be found in a variety of places:

  • on the installation disk with the Mac OS X that came with the Mac (if you bought it with Leopard 10.5.4 or older)
  • on the software disc that came with your Mac (if your Mac was preinstalled with Mac OS X 10.5.5-10.6.8)
  • on the Recovery partition or even on the Internet (if the Mac was sold with OS X Lion)

Depending on the Mac models, the way you run the test may also change. As a rule, to enter the test, you need to hold down the D key when turning on (not when rebooting!). If Apple Hardware Test is located on the Recovery partition of the disk, then use the Command + D combination.

If the D key doesn't change anything, try inserting the discs your Mac came with and holding it down while the computer is turning on with the DVD in the drive.

If the Apple Hardware Test finds any errors, it will be very important to remember (or better, write down) their codes. This will come in handy when communicating with technical support.

If there is no other media from which to boot, and once again bother with disk utility I don’t want to either, then you can boot the Mac into safe mode. This mode the good thing is that, among other things, with such a start, several system maintenance procedures will be launched and the disk will be forcibly checked for errors. In order to boot the original Mac in safe mode, the user just needs to hold down the key during boot SHIFT , in case of using Hackintosh - boot with the flag -x .

  • Reset PRAM

PRAM is a parametric random access memory that stores some settings operating system and devices so that Mac OS X can quickly access them. The number and name of settings varies depending on the type of computer, as well as the devices and drives connected to it. But almost always, video and monitor settings are stored there (refresh rate and screen resolution, number of colors, and some others), information about the starting volume of the disk, the speaker volume set, data about the last kernel panic.

In some cases, resetting the PRAM helps to cope with certain problems that have arisen. To clear the PRAM, it is enough to hold down the keys when starting the computer. COMMAND+OPTION+P+R (you need to have time to press them before the gray screen appears) and do not let go until the Mac boots up and you hear the Mac OS X welcome sound.

If you have a RAID array set up on your Mac, it may turn out that after resetting the PRAM, the computer will refuse to boot correctly. In this case, you should try to boot with the key pressed OPTION to the screen for choosing a system to start, and if this does not help, then restart the Mac by holding down the keys COMMAND+OPTION+SHIFT+DELETE .

  • Reset SMC

The SMC module is a computer chip that is usually found on the motherboard and is responsible for managing all aspects of the computer's power supply. It controls the rotation speed hard drive, turning sleep mode on and off, charging, and the effect of connected devices on sleep mode. In case there are problems with sleep mode, the inability to turn on the computer when running on battery power, and other problems related to power, then reset SMC settings can help solve them. The process for resetting the SMC is slightly different for different Macs, so for instructions on how to reset your Mac specifically, we refer you to the Apple Knowledge Base, where everything is described in detail. As an example, here is the procedure for resetting the SMC for Macbook Air and Mac Mini.

  1. Turn off your MacBook and disconnect all cables from it.
  2. Connect the network adapter cable to it.
  3. Press and hold keys CONTROL+SHIFT+OPTION on the left side of the keyboard (namely, on the left), and then press and hold the power button too.
  4. After 5 seconds, release all buttons and press the power button again.

  1. Disconnect all cables from the computer, including the power cord.
  2. Wait 10 seconds.
  3. Connect the power cord while holding down the power button on the back of the computer.
  4. Release the power button.
  5. Turn on the computer by pressing the power button again.
  • Dusting a Mac

This procedure requires some experience and practice in disassembling and reassembling a Mac. Despite the apparent complexity, the operation can significantly help in the fight against insufficient cooling of the case and computer components, because the Mac, like any other electronic equipment, is an excellent dust collector. Of course, not every Mac can be easily disassembled. You can find out how this is done and how difficult it is on the iFixit portal.

However, if you are not confident enough in your abilities, then it is better to clean your Mac from dust in a service center.

SYSTEM PREVENTION

Prevention of the system comes down to checking the status of the rights to files and folders, cleaning various caches and cleaning up other garbage.

  • Verification and restoration of rights

It may not be out of place to check and, if necessary, restore access rights to files and folders. To do this, boot in normal mode from the main boot partition and run again disk utility, in which we perform the above operations.

  • Unscheduled launch of the Mac OS X self-cleaning system

Mac OS X is a pretty smart system and it has a built-in self-cleaning system that cleans up various temporary files and other garbage on its own. Everything would be fine, but there is one problem - the self-cleaning system starts at strictly defined hours, when the computers of Russian users, as luck would have it, are turned off. How to solve this problem and start the self-cleaning process yourself is detailed in one of our articles on working with the Terminal.

  • Clearing Extensions and System Cache in Mac OS X

At possible problems cleaning system extensions can help with drivers, and clearing the system cache will help the system “breathe” more freely. Per detailed description the cleaning process, you can also refer to the aforementioned article on working with the Terminal.

The last finishing touch on the prevention of the operating system is to restart the computer. Don't be surprised if your Mac takes a long time to boot up after cleaning it for the first time - this is normal. Reboot the machine again and it will boot normally.

Alternatively, for the prevention of the system, you can use various specialized applications that greatly facilitate this process and eliminate operations with Terminal, Disk Utility and other scary newbie apps. We have already talked more than once on the pages of our site about such programs, for example, about or.

Keep your Mac in order, take care of it regularly and it will repay you with many years of impeccable work;)

Today we will talk about collecting diagnostics in macOS

Information about the computer and programs

If you select "About This Mac" from the Apple menu and then click the "System Report" button, you'll see a bunch of information about your computer. So, the system_profiler utility is the same, but a hundred times more detailed.

If you call system_profiler without parameters, then the information will be displayed in its entirety, which in my case means 3.8 MB of text. So I recommend immediately writing something like system_profiler > ~/Desktop/profile.txt or using grep to find the line you need.

MAC Diagnostics

Among what system_profiler will spit out, you will find information not only about the system and devices, but also about all programs, drivers, plugins, libraries and fonts. At the same time, parts of the system logs and a bunch of other crap will be displayed.

If all this does not interest you, write system_profiler -detailLevel mini, and then you will get only information about the computer.

You can also add the -xml parameter to make it more convenient to process the received information in the script.

Directory Service

The dscl - Directory Services Command Line utility is responsible for communicating with the directory service; it once replaced netinfo. Breathed in sysadmin tricks? This is true, and we will not dwell on them in detail.

For starters, a couple of commands: dscl . -list /Users will list all users and dscl . -read /Users/<имя пользователя>- information about the user in the form of XML. Even a file with an avatar is encoded inside!

By the way, if you run dscl without parameters, it will enter interactive mode, where you can use the usual cd and ls commands to navigate, and view the contents of the branches with the read command.

Directory Services Caches and User List

Another utility is attached to dscl - dscacheutil, it is responsible for working with directory service caches. You probably know it much better than dscl, because for a long time it was it that had to be run to reset the DNS cache.

By the way, in latest versions macOS does not work, and instead of dscacheutil -flushcache you now need to write killall -HUP mDNSResponder.

MAC Diagnostics

As for dscacheutil, it's handy to use to list users: dscacheutil -q user. Unlike what dscl produces, the result is much easier to read.

Reading and (not) resetting values ​​in NVRAM

Every Mac has a non-volatile memory that stores variables that are important to the operation of the computer. What exactly is there? The nvram command will help you find out: write nvram -xp, and you will see everything.

There are innocuous things like the sound level and the latest keyboard layout, as well as more interesting things like the Find My Mac key and the completely mysterious EFI settings.

All of them are presented in binary form, and the only snippet of description that I could find is contained in a CIA document leaked and posted on WikiLeaks.

Parameters can be set with the nvram command<переменная>=<значение>, delete with nvram -d command<переменная>or load from file with nvram -f<файл>.

You can reset everything by typing nvram -c. But usually NVRAM parameters are reset only if something went wrong and the computer does not boot. To do this, press Alt-Cmd-P-R immediately after switching on and hold for 20 s.

Please note: if you change the parameters with the nvram utility, then they will not be written to non-volatile memory immediately, but only when the computer is turned off in normal mode.

RAM statistics

There are many ways to see how loaded the RAM is. Perhaps the easiest is to open the "Memory" section in "System Monitoring": the most useful parameters are presented there in a visual form. From command line it's best to use top.

If you need the most detailed information, then you can refer to vm_stat. The disadvantage of this utility is that all values ​​are given in pages equal to 4 KB. However, it's not that difficult to calculate, and there are a lot of scripts on the Internet - for example, this Perl one-liner converts everything into megabytes.

You can also use vm_stat to track changes in memory usage over time. To do this, type vm_stat -c<число> <секунды>, where the first parameter is the number of measurements, and the second is the interval between them.

Flush disk cache in memory

Temporarily get a couple of extra gigabytes random access memory the purge command helps. It is called from root, has no parameters and resets the disk cache, bringing it to the state it was in after the OS was loaded. But usually the memory manager does not need such help - he himself will gradually unload the excess if the RAM runs out.

The help says that purge is generally needed mainly for testing, but who knows how life will turn out?

File system access tracking

The fs_usage command, run without options as root, prints a record of each access to file system. This is needed in cases where some program crashes on startup or produces cryptic error messages. If the problem is that one of the files is corrupt, then you can find it with fs_usage.

To reduce the need to rummage through the output, limit the messages to one process by writing its name after fs_usage. If you only know the ID, type sudo fs_usage pid .

Another useful parameter is -f, after which you can set a filter for network operations (-f network), files (-f pathname will add a path column) and so on. If the text doesn't fit on the line, add -w.

Internet