Follow System & Kernel Logs from Command Line in Mac OS X
If you’re troubleshooting some of the more difficult problems that you can have on a Mac, a good place to look are the System & Kernel Logs contained within Console app. But you can access the same OS X logs from the Terminal too.
Why bother reading system logs from the terminal when there’s an OS X app to do it natively in the GUI? Well there are many reasons, perhaps because you are reviewing logs remotely with ssh, maybe you just prefer the terminal, or, maybe things are really going south. In the latter situation, unfortunately there are times when you can’t access Console either because you are remotely troubleshooting, in Single User Mode, or even because the log files have grown so large that it actually starts crashing Console.app when it’s trying to load (this has happened to me more than once). Yes, from time to time, problems can be so bad that even the OS X Console log can’t be opened directly! But fear not if this occurs to you, you can still track down and monitor the system log of Mac OS X by turning to the command line of the Mac.
If you’re in this situation, or any other reason that you’d want to follow your Console system log from the command line, here’s all you need to type:
tail -f /var/log/system.log
You can do the same with the kernel log, which is great if you’re troubleshooting hardware and connectivity issues:
tail -f /var/log/kernel.log
The tail -f command allows the specified file to be read and printed to your screen in a live stream. There are plenty of other log files you can follow contained within /var/log but the above two are generally the most useful for troubleshooting purposes.
You can also use the less command on log files, like so:
Once you have the log file opened with less, hit the “F” key to continuously update the log file as it updates live, making it kind of like tail -f in that it offers a constantly updating log file for easy viewing.
The syslog command is another option, but quite the firehose if you’re running syslog uncontrolled by grep, awk, more, or less. See for yourself with:
You’ll find it to be a bit overwhelming, and much more manageable by piping through more:
The syslog command is well featured with some perks though, discover more with the –help flag, which will show you how to export the contents of a log file, read specific logs, match logs to processes, and much more.
You could also combine these commands with GeekTool if you want to see system log activity directly on your Mac OS X desktop. Or just throw a Terminal window onto the Mac, maybe make it transparent for some easier multitasking views, and happy troubleshooting, administration, or development to you.
Question: Q: Macbook Crashing — Kernel Panic
I have a continual kernal panic happening on my Mid 2015 Macbook Pro running Catalina. It seems to maybe have something to due with bluetooth. When the Macbook comes back up after the panic if the issue is persisting none of my bluetooth peripherals will work and upon trying to open the bluetooth preference pane the system preferences lock up all together. After several reboots things will seem ok and at this time bluetooth is again working properly.
I’m not sure if this is related, but I did install the app SmoothCursor a few days ago in an attempt to speed up tracking on my magic mouse. It was not running at the time, but it was installed at the time of the first panic. I’ve since removed it and just a few moments ago it happened again.
MacBook Pro Retina
Posted on Nov 2, 2019 8:08 PM
All replies
Loading page content
Page content loaded
Back up. Back ip again. Boot Recovery. Reinstall macOS.
If you don’t wipe, the re-install should be harmless.
Failing that, wipe, and either re-install, or restore your pre-app-install backups.
On the off chance that add-on damaged something.
Dealing with Kernel Panics
Kernel panics are indicative of possible hardware failure, so you should Check your Mac with hardware diagnostics or AHT. Read the kernel panic log: Mac OS X- How to log a kernel panic.
If you have no success figuring what is happening then you may need to examine the software you have running when the panics occur. Be sure it’s all current. If you must to resolve the problem erase the disk and reinstall macOS. Follow this outline to reset the computer to the factory-new state:
How To Do A Factory Reset
Selection A should be used on computers that came with Lion or later when factory new. These models had no disks included when new. Selection B is for Macs that came originally with Snow Leopard or earlier. These models shipped with Software Restore disks when new.
B. Factory Reset Your Pre-Lion Mac
Follow these instructions until you get to Step 5 of Factory reset of your Mac — Apple Support. At Step 5 you will need a Snow Leopard DVD or the installer disc that came with the computer.
- Boot the computer using the Snow Leopard Installer Disc or the Disc 1 that came with your computer. Insert the disc into the optical drive and restart the computer. After the chime press and hold down the «C» key. Release the key when you see a small spinning gear appear below the dark gray Apple logo.
- After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities’ menu. After Disk Utility loads select the hard drive entry from the left side list (out-dented entry — mfgr.’s ID and drive size.) Click on the Partition button in the Disk Utility toolbar. Set the number of partitions to one (1) from the Partitions drop down menu, click on Options button and select GUID, click on OK, then set the format type to MacOS Extended (Journaled), then click on the Apply button.
- When the formatting has finished quit Disk Utility. Proceed with the OS X installation and follow the directions included with the installer.
- If you are planning to sell or give your computer away, then do the following: After you reformat your hard drive and reinstall OS X, the computer restarts to a Welcome screen and asks you to choose a country or region. If you want to leave the Mac in an out-of-box state, don’t continue with the setup of the system. Instead, press Command-Q to shut down the Mac. When the new owner turns on the Mac, the Setup Assistant will guide them through the setup process.
Thank you for your responses, but does any know or have any idea from looking at the kernal panics that it was infact that application or possibly something else?
Kernel panics are usually the result of hardware failure. The panic report suggests several possibilities including the GPU or CPU. Try reading the links I provided. You may also follow this protocol:
A Troubleshooting Procedure that may Fix Problems with macOS El Capitan or Later
You should try each, one at a time, then test to see if the problem is fixed before going on to the next.
Be sure to backup your files before proceeding if possible.
- Shutdown the computer, wait 30 seconds, restart the computer.
- Disconnect all third-party peripherals.
- Resetting your Mac’s PRAM and NVRAM
- Reset the System Management Controller (SMC)
- Reset your Startup Disk and Sound preferences, if needed.
- Start the computer in Safe Mode. Test in safe mode to see if the problem persists, then restart normally.
- Use Apple Hardware Test to see if there is any hardware malfunction.
- Repair the diskby booting from the Recovery HD. Immediately after the chime hold down the Command and R keys until the Utility Menu appears. Choose Disk Utility and click on the Continue button. Select the indented (usually, Macintosh HD) volume entry from the side list. Click on the First Aid button in the toolbar. Wait for the Done button to appear. Quit Disk Utility and return to the Utility Menu. Restart the computer from the Apple Menu.
- Repair permissions on the Home folder: Resolve issues caused by changing the permissions of items in your home folder.
- Create a New User Account Open Users & Groups preferences. Click on the lock icon and enter your Admin password when prompted. On the left under Current User click on the Add [+] button under Login Options. Setup a new Admin user account. Upon completion log out of your current account then log into the new account. If your problems cease, then consider switching to the new account and transferring your files to it — Transferring files from one User Account to another.
- Reinstall OS X by booting from the Recovery HD using the Command and R keys. When the Utility Menu appears select Reinstall OS X then click on the Continue button.
- Erase and Install OS X Restart the computer. Immediately after the chime hold down the Command and R keys until the Apple logo appears. When the Utility Menu appears:
1. Select Disk Utility from the Utility Menu and click on the Continue button.
2. When Disk Utility loads select the drive (out-dented entry) from the Device list.
3. Click on the Erase icon in Disk Utility’s toolbar. A panel will drop down.
4. Set the Format type to APFS (for SSDs only) or Mac OS Extended (Journaled.)
5. Click on the Apply button, then wait for the Done button to activate and click on it.
6. Quit Disk Utility and return to the Utility Menu.
7. Select Reinstall OS X and click on the Continue button.