Linux+ Guide to Linux Certification Chapter Fourteen Troubleshooting and Performance.

  • Published on
    03-Jan-2016

  • View
    218

  • Download
    5

Transcript

  • ObjectivesDescribe and outline common troubleshooting proceduresIdentify good troubleshooting practicesEffectively troubleshoot common hardware-related problemsEffectively troubleshoot common software-related problemsMonitor system performance using command-line and graphical utilitiesUnderstand the purpose and usage of kernel modules

  • Troubleshooting MethodologyFigure 14-1: The maintenance cycle

  • Troubleshooting MethodologyMonitoringProcess by which system areas are observed for problems or irregularitiesProactive maintenanceMeasure taken to reduce future system problemsReactive maintenanceMeasure taken when system problems arise

  • Troubleshooting MethodologyDocumentationSystem information that is stored in a log book for future referencesTroubleshooting proceduresThe tasks performed when solving system problems

  • Troubleshooting MethodologyFigure 14-2: Common troubleshooting procedures

  • Troubleshooting MethodologyTwo golden rules to guide you during any troubleshooting process:Prioritize problemsPrioritize the problems according to severity and spend a reasonable amount of time on each problem given its priorityTry to solve the root of the problemTo avoid missing the underlying cause of any problem, try to justify why a certain solution is successful

  • Hardware-Related ProblemsFigure 14-3: The KDE Control Center

  • Hardware-Related ProblemsThe absence of a device driver will also prevent the operating system from using the associated hardware devicesKudzu programProgram used to detect and install support for new hardware

  • Hardware-Related ProblemsFigure 14-4: The kudzu welcome screen

  • Hardware-Related ProblemsFigure 14-5: Configuring new hardware using kudzu

  • Hardware-Related ProblemsIf the hard disk that contains the / filesystem fails, then perform the following steps:Power down the computer and replace the failed hard diskReinstall Linux on the new hard diskRestore the original configuration and data files using a back-up utility

  • Software-Related Problems:Application-Related ProblemsDependenciesThe prerequisites required for program execution such as shared libraries or other packagesldd commandCommand used to display the shared libraries used by a certain program

  • Software-Related Problems:Application-Related Problemsldconfig commandCommand that updates the /etc/ld.so.conf and /etc/ld.so.cache files/etc/ld.so.conf filesFile that contains a list of directories that contain shared libraries/etc/ld.so.cache fileFile that contains the location of shared library files

  • Software-Related Problems:Application-Related ProblemsFilehandlesConnection that a program makes to files on a filesystemunlimit commandCommand used to modify process limit parameters in the current shell/var/log directoryDirectory that contains most system log files

  • Software-Related Problems:OS-Related ProblemsMost software-related problems are related to the operating system itselfThese typically involve problems with boot loaders, filesystems, and serial devicesmkbootdisk commandCommand used to create a boot floppy diskette

  • Software-Related Problems:OS-Related ProblemsFigure 14-6: The Red Hat Linux installation welcome screen

  • Software-Related Problems:OS-Related ProblemsFigure 14-7: Obtaining a shell in rescue mode

  • Software-Related Problems:OS-Related ProblemsFigure 14-8: The command-line shell used in rescue mode

  • Software-Related Problems:OS-Related ProblemsTable 14-1: Common keywords used with the setserial utility

  • Performance MonitoringJabberingProcess by which failing hardware components send large amounts of information to the CPUBus masteringProcess by which peripheral components perform tasks normally executed by the CPU

  • Performance MonitoringTo 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 bookBaselineA measure of normal system activity

  • Monitoring Performance with sysstat UtilitiesSystem Statistics (sysstat) packageSoftware package that contains common performance monitoring utilities such as mpstat, iostat, sar, and isagMultiple Processor Statistics (mpstat) utilityCommand that displays CPU statistics

  • Monitoring Performance with sysstat UtilitiesInput/Output Statistics (iostat) commandCommand that displays Input/Output statistics for block devicesSystem Activity Reporter (sar) commandCommand that displays various system statistics

  • Monitoring Performance with sysstat UtilitiesTable 14-2: Common options to the sar command

  • Monitoring Performance with sysstat UtilitiesTable 14-2 (continued): Common options to the sar command

  • Monitoring Performance with sysstat UtilitiesIf there are a large number of pages being sent to and taken from the swap partition, then the system will suffer from slower performanceTo remedy this, you could add more physical memory (RAM) to the systemInteractive System Activity Grapher (isag) commandCommand used to graph system performance information stored in the /var/log/sa directory

  • Monitoring Performance with sysstat UtilitiesFigure 14-9: Choosing a file to view using the System Activity Grapher

  • Monitoring Performance with sysstat UtilitiesFigure 14-10: Choosing statistics using the System Activity Grapher

  • Monitoring Performance with sysstat UtilitiesFigure 14-11: Viewing user statistics using the System Activity Grapher

  • Other Performance Monitoring Utilitiesfree commandCommand used to display memory and swap statisticsvmstat commandCommand used to display memory, CPU, and swap statistics

  • Kernel ModulesMany device drivers and kernel features are compiled into the kernelHowever, these may also be inserted into the kernel as modules to reduce the size of the kernelIt is good form to compile standard device support into the kernel and leave support for other devices and features as modules

  • Kernel Modulesinsmod commandCommand used to insert a module into the Linux kernelmodprobe commandCommand used to insert a module and all necessary prerequisites modules into the Linux kernellsmod commandCommand that lists modules currently used by the Linux kernel

  • Kernel Modulesrmmod commandCommand that removes a module from the Linux kernel/etc/modules.conf fileFile used to load and alias modules at system initialization/etc/rc.d/rc.local fileFile used to load modules at system initialization

  • Compiling a New Linux KernelTo 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/linuxThe directory that contains source code for the Linux kernel during compilation

  • Compiling a New Linux KernelFigure 14-12: The make menuconfig interface

  • Compiling a New Linux KernelFigure 14-13: The make xconfig interface

  • Compiling a New Linux KernelFigure 14-14: Configuring code maturity level options

  • Compiling a New Linux KernelFigure 14-15: Configuring USB support

  • Patching the Linux KernelTo 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/linuxPatch commandCommand used to supply a patch to the Linux kernel source code

  • Chapter SummaryAfter installation, Linux administrators monitor the system, perform proactive and reactive maintenance, and document important system informationCommon 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 useSystem problems may be categorized as hardware- or software-related

  • Chapter SummaryIRQ conflicts, invalid hardware settings, absence of kernel support, and hard disk failure are common hardware-related problems on Linux systemsSoftware-related system problems may be further categorized as application-related or operating system-relatedSystem performance is affected by a variety of hardware and software factors

  • Chapter SummaryUsing performance monitoring utilities to create a baseline is helpful when diagnosing performance problems in the futureSystem features and hardware support may be compiled into the Linux kernel or provided by a kernel moduleYou may compile a Linux kernel with only the necessary features and support in order to increase system performance

Recommended

View more >