linux+ guide to linux certification chapter fourteen troubleshooting and performance
TRANSCRIPT
![Page 1: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/1.jpg)
Linux+ Guide to Linux Certification
Chapter Fourteen
Troubleshooting and Performance
![Page 2: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/2.jpg)
ObjectivesObjectives
• Describe and outline common troubleshooting procedures
• Identify good troubleshooting practices• Effectively troubleshoot common hardware-related
problems• Effectively troubleshoot common software-related
problems• Monitor system performance using command-line and
graphical utilities• Understand the purpose and usage of kernel modules
![Page 3: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/3.jpg)
Troubleshooting MethodologyTroubleshooting Methodology
Figure 14-1:The maintenance cycle
![Page 4: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/4.jpg)
Troubleshooting MethodologyTroubleshooting Methodology
• Monitoring– Process by which system areas are observed for
problems or irregularities
• Proactive maintenance– Measure taken to reduce future system problems
• Reactive maintenance– Measure taken when system problems arise
![Page 5: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/5.jpg)
Troubleshooting MethodologyTroubleshooting Methodology
• Documentation– System information that is stored in a log book
for future references
• Troubleshooting procedures– The tasks performed when solving system
problems
![Page 6: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/6.jpg)
Troubleshooting MethodologyTroubleshooting Methodology
Figure 14-2: Common troubleshooting procedures
![Page 7: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/7.jpg)
Troubleshooting MethodologyTroubleshooting Methodology
• Two golden rules to guide you during any troubleshooting process:– Prioritize problems
• Prioritize the problems according to severity and spend a reasonable amount of time on each problem given its priority
– Try to solve the root of the problem• To avoid missing the underlying cause of any problem, try
to justify why a certain solution is successful
![Page 8: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/8.jpg)
Hardware-Related ProblemsHardware-Related Problems
Figure 14-3: The KDE Control Center
![Page 9: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/9.jpg)
Hardware-Related ProblemsHardware-Related Problems
• The absence of a device driver will also prevent the operating system from using the associated hardware devices
• Kudzu program– Program used to detect and install support for
new hardware
![Page 10: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/10.jpg)
Hardware-Related ProblemsHardware-Related Problems
Figure 14-4: The kudzu welcome screen
![Page 11: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/11.jpg)
Hardware-Related ProblemsHardware-Related Problems
Figure 14-5: Configuring new hardware using kudzu
![Page 12: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/12.jpg)
Hardware-Related ProblemsHardware-Related Problems
• If the hard disk that contains the / filesystem fails, then perform the following steps:– Power down the computer and replace the failed
hard disk– Reinstall Linux on the new hard disk– Restore the original configuration and data files
using a back-up utility
![Page 13: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/13.jpg)
Software-Related Problems:Software-Related Problems:Application-Related ProblemsApplication-Related Problems
• Dependencies– The prerequisites required for program execution
such as shared libraries or other packages
• ldd command– Command used to display the shared libraries
used by a certain program
![Page 14: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/14.jpg)
Software-Related Problems:Software-Related Problems:Application-Related ProblemsApplication-Related Problems
• ldconfig command– Command that updates the /etc/ld.so.conf and
/etc/ld.so.cache files
• /etc/ld.so.conf files– File that contains a list of directories that contain
shared libraries
• /etc/ld.so.cache file– File that contains the location of shared library
files
![Page 15: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/15.jpg)
Software-Related Problems:Software-Related Problems:Application-Related ProblemsApplication-Related Problems
• Filehandles– Connection that a program makes to files on a
filesystem
• unlimit command– Command used to modify process limit
parameters in the current shell
• /var/log directory– Directory that contains most system log files
![Page 16: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/16.jpg)
Software-Related Problems:Software-Related Problems:OS-Related ProblemsOS-Related Problems
• Most software-related problems are related to the operating system itself– These typically involve problems with boot
loaders, filesystems, and serial devices
• mkbootdisk command– Command used to create a boot floppy diskette
![Page 17: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/17.jpg)
Software-Related Problems:Software-Related Problems:OS-Related ProblemsOS-Related Problems
Figure 14-6: The Red Hat Linux installation welcome screen
![Page 18: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/18.jpg)
Software-Related Problems:Software-Related Problems:OS-Related ProblemsOS-Related Problems
Figure 14-7: Obtaining a shell in rescue mode
![Page 19: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/19.jpg)
Software-Related Problems:Software-Related Problems:OS-Related ProblemsOS-Related Problems
Figure 14-8: The command-line shell used in rescue mode
![Page 20: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/20.jpg)
Software-Related Problems:Software-Related Problems:OS-Related ProblemsOS-Related Problems
Table 14-1: Common keywords used with the setserial utility
![Page 21: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/21.jpg)
Performance MonitoringPerformance Monitoring
• Jabbering– Process by which failing hardware components
send large amounts of information to the CPU
• Bus mastering– Process by which peripheral components perform
tasks normally executed by the CPU
![Page 22: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/22.jpg)
Performance MonitoringPerformance Monitoring
• To ease identification of performance problems, you should run performance utilities on a healthy Linux system on a regular basis during normal business hours and record results in a system log book
• Baseline– A measure of normal system activity
![Page 23: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/23.jpg)
Monitoring Performance with Monitoring Performance with sysstat Utilitiessysstat Utilities
• System Statistics (sysstat) package– Software package that contains common
performance monitoring utilities such as mpstat, iostat, sar, and isag
• Multiple Processor Statistics (mpstat) utility– Command that displays CPU statistics
![Page 24: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/24.jpg)
Monitoring Performance with Monitoring Performance with sysstat Utilitiessysstat Utilities
• Input/Output Statistics (iostat) command– Command that displays Input/Output statistics for
block devices
• System Activity Reporter (sar) command– Command that displays various system statistics
![Page 25: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/25.jpg)
Monitoring Performance with Monitoring Performance with sysstat Utilitiessysstat Utilities
Table 14-2: Common options to the sar command
![Page 26: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/26.jpg)
Monitoring Performance with Monitoring Performance with sysstat Utilitiessysstat Utilities
Table 14-2 (continued): Common options to the sar command
![Page 27: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/27.jpg)
Monitoring Performance with Monitoring Performance with sysstat Utilitiessysstat Utilities
• If there are a large number of pages being sent to and taken from the swap partition, then the system will suffer from slower performance– To remedy this, you could add more physical
memory (RAM) to the system
• Interactive System Activity Grapher (isag) command– Command used to graph system performance
information stored in the /var/log/sa directory
![Page 28: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/28.jpg)
Monitoring Performance with Monitoring Performance with sysstat Utilitiessysstat Utilities
Figure 14-9: Choosing a file to view using the System Activity Grapher
![Page 29: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/29.jpg)
Monitoring Performance with Monitoring Performance with sysstat Utilitiessysstat Utilities
Figure 14-10: Choosing statistics using the System Activity Grapher
![Page 30: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/30.jpg)
Monitoring Performance with Monitoring Performance with sysstat Utilitiessysstat Utilities
Figure 14-11: Viewing user statistics using the System Activity Grapher
![Page 31: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/31.jpg)
Other Performance Monitoring Other Performance Monitoring UtilitiesUtilities
• free command– Command used to display memory and swap
statistics
• vmstat command– Command used to display memory, CPU, and
swap statistics
![Page 32: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/32.jpg)
Kernel ModulesKernel Modules
• Many device drivers and kernel features are compiled into the kernel– However, these may also be inserted into the
kernel as modules to reduce the size of the kernel
• It is good form to compile standard device support into the kernel and leave support for other devices and features as modules
![Page 33: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/33.jpg)
Kernel ModulesKernel Modules
• insmod command– Command used to insert a module into the Linux
kernel
• modprobe command– Command used to insert a module and all necessary
prerequisites modules into the Linux kernel
• lsmod command– Command that lists modules currently used by the
Linux kernel
![Page 34: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/34.jpg)
Kernel ModulesKernel Modules
• rmmod command– Command that removes a module from the Linux
kernel
• /etc/modules.conf file– File used to load and alias modules at system
initialization
• /etc/rc.d/rc.local file– File used to load modules at system initialization
![Page 35: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/35.jpg)
Compiling a New Linux KernelCompiling a New Linux Kernel
• To gain certain hardware or kernel support, it may be necessary to recompile the current kernel with different features or download the source code for a newer kernel and compile it
• /usr/src/linux– The directory that contains source code for the
Linux kernel during compilation
![Page 36: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/36.jpg)
Compiling a New Linux KernelCompiling a New Linux Kernel
Figure 14-12: The make menuconfig interface
![Page 37: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/37.jpg)
Compiling a New Linux KernelCompiling a New Linux Kernel
Figure 14-13: The make xconfig interface
![Page 38: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/38.jpg)
Compiling a New Linux KernelCompiling a New Linux Kernel
Figure 14-14: Configuring code maturity level options
![Page 39: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/39.jpg)
Compiling a New Linux KernelCompiling a New Linux Kernel
Figure 14-15: Configuring USB support
![Page 40: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/40.jpg)
Patching the Linux KernelPatching the Linux Kernel
• To install a more current Linux kernel version, you normally download the source code for that kernel and place it in a directory that will be referenced by /usr/src/linux
• Patch command– Command used to supply a patch to the Linux
kernel source code
![Page 41: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/41.jpg)
Chapter SummaryChapter Summary
• After installation, Linux administrators monitor the system, perform proactive and reactive maintenance, and document important system information
• Common troubleshooting procedures involve collecting data to isolate and determine the cause of system problems, as well as implementing and testing solutions that can be documented for future use
• System problems may be categorized as hardware- or software-related
![Page 42: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/42.jpg)
Chapter SummaryChapter Summary
• IRQ conflicts, invalid hardware settings, absence of kernel support, and hard disk failure are common hardware-related problems on Linux systems
• Software-related system problems may be further categorized as application-related or operating system-related
• System performance is affected by a variety of hardware and software factors
![Page 43: Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance](https://reader035.vdocument.in/reader035/viewer/2022062301/56649efa5503460f94c0c01b/html5/thumbnails/43.jpg)
Chapter SummaryChapter Summary
• Using performance monitoring utilities to create a baseline is helpful when diagnosing performance problems in the future
• System features and hardware support may be compiled into the Linux kernel or provided by a kernel module
• You may compile a Linux kernel with only the necessary features and support in order to increase system performance