Chapter 20. Troubleshooting a Linux PC

Linux includes numerous utilities to help diagnose and fix problems, enough to fill several thick books. In this chapter, the focus is on using system logs to find out what went wrong, building a central systemd logging server, monitoring hardware health, finding and stopping troublesome processes, getting the best performance from hardware, and tips and tricks for diagnosing hardware issues.


Get to know your system logs well, and you will find the causes of problems. If learning the cause does not point you to a solution, you have the information you need to ask for help, whether it’s product documentation, distribution documentation, paid support, or community support.

Get well-acquainted with the documentation for your Linux distributions, especially changelogs and release notes, and the documentation for the servers and applications that you use. Ubuntu, Fedora, and openSUSE all excel at maintaining their documentation and detailed release notes. Also get acquainted with the forums, wikis, and chats for your distro, servers, and applications. For every issue you encounter, it is likely many other users have dealt with the same issue.


Most errors are caused by software. Even consumer-grade hardware is pretty robust, and it fails most often from abuse and age. The most common hardware failures are components with moving parts:

  • SATA and SCSI disk drives

  • CPU coolers

  • Power supplies

  • Case fans

  • CD/DVD drives

Get Linux Cookbook, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.