1 / 46

Linux+ Guide to Linux Certification, Second Edition

Linux+ Guide to Linux Certification, Second Edition. Chapter 13 Troubleshooting and Performance. Objectives. Describe and outline common troubleshooting procedures Identify good troubleshooting practices Effectively troubleshoot common hardware-related problems

helene
Download Presentation

Linux+ Guide to Linux Certification, Second Edition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linux+ Guide to Linux Certification, Second Edition Chapter 13 Troubleshooting and Performance

  2. Objectives • Describe and outline common troubleshooting procedures • Identify good troubleshooting practices • Effectively troubleshoot common hardware-related problems • Effectively troubleshoot common software-related problems Linux+ Guide to Linux Certification, 2e

  3. Objectives (continued) • Monitor system performance using command-line and graphical utilities • Identify and fix common performance problems • Understand the purpose and usage of kernel modules • Recompile and patch the Linux kernel Linux+ Guide to Linux Certification, 2e

  4. Troubleshooting Methodology Figure 13-1: The maintenance cycle Linux+ Guide to Linux Certification, 2e

  5. Troubleshooting Methodology (continued) • Monitoring: Observing system areas for problems or irregularities • Proactive maintenance: Minimizing chance of future problems • e.g., perform regular system backups Linux+ Guide to Linux Certification, 2e

  6. Troubleshooting Methodology (continued) • Reactive maintenance: Correcting problems when they arise • Documenting solutions • Developing better proactive maintenance methods • Documentation: System information stored in a log book for future references • Troubleshooting procedures: Tasks performed when solving system problems Linux+ Guide to Linux Certification, 2e

  7. Troubleshooting Methodology (continued) Figure 13-2: Common troubleshooting procedures Linux+ Guide to Linux Certification, 2e

  8. Troubleshooting Methodology (continued) • Two troubleshooting golden rules: • Prioritize problems according to severity • Spend reasonable amount of time on each problem given its priority • Try to solve root of problem • Avoid missing underlying cause • Justify why a certain solution is successful Linux+ Guide to Linux Certification, 2e

  9. Resolving Common System Problems • Two categories of problems: • Hardware-related • Software-related Linux+ Guide to Linux Certification, 2e

  10. Hardware-Related Problems • Often involve improper hardware or software configuration • SCSI termination • Video card and monitor configuration • POST test alerts • Loose hardware connections • IRQ or I/O address conflicts • View output of dmesg command Linux+ Guide to Linux Certification, 2e

  11. Hardware-Related Problems (continued) • Absence of device drivers prevent OS from using associated devices • Kudzu program: Detect and install support for new hardware • If hardware device not detected, device driver must be configured manually • HDDs most common device to fail • Good idea to use RAID Linux+ Guide to Linux Certification, 2e

  12. Hardware-Related Problems (continued) Figure 13-3: The kudzu welcome screen Linux+ Guide to Linux Certification, 2e

  13. Hardware-Related Problems (continued) Figure 13-4: Configuring new hardware using kudzu Linux+ Guide to Linux Certification, 2e

  14. Hardware-Related Problems (continued) • If HDD containing partitions mounted on noncritical directories fails: • Power down computer and replace failed HDD • Boot Linux system • Use fdisk to create partitions on replaced HDD • Use mkfs to create filesystems • Restore original data • Ensure /etc/fstab has appropriate entries to mount filesystems Linux+ Guide to Linux Certification, 2e

  15. Hardware-Related Problems (continued) • If HDD containing / filesystem fails: • Power down computer and replace failed HDD • Reinstall Linux on new HDD • Restore original configuration and data files Linux+ Guide to Linux Certification, 2e

  16. Software-Related Problems:Application-Related Problems • Missing program libraries/files, process restrictions, or conflicting applications • Dependencies: Prerequisite shared libraries or packages required for program execution • Programs usually check at installation • Package files may be removed accidentally Linux+ Guide to Linux Certification, 2e

  17. Software-Related Problems:Application-Related Problems (continued) • rpm –V command: Identify missing files in a package or package dependency • ldd command: Display shared libraries used by a program • ldconfig command: Updates /etc/ld.so.conf and /etc/ld.so.cache files Linux+ Guide to Linux Certification, 2e

  18. Software-Related Problems:Application-Related Problems (continued) • /etc/ld.so.conf file: List of directories containing shared libraries • /etc/ld.so.cache file: Contains location of shared library files • compressor/decompressor (codec) file: Contains rules to compress or decompress multimedia information Linux+ Guide to Linux Certification, 2e

  19. Software-Related Problems:Application-Related Problems (continued) • Filehandles: Connections that programs make to files • ulimit command: Modify process limit parameters in current shell • Can also modify max number of filehandles • /var/log directory: Contains most system log files • If applications stop functioning due to difficulty gaining resources, restart using SIGHUP Linux+ Guide to Linux Certification, 2e

  20. Software-Related Problems:Operating System-Related Problems • Most software-related problems related to OS • Boot loader, filesystem, serial device problems • LILO problems: Place “linear” in, remove “compact” from /etc/lilo.conf file • GRUB problems: Typically result of missing files in /boot directory • mkbootdisk command: Create a boot floppy diskette Linux+ Guide to Linux Certification, 2e

  21. Software-Related Problems:OS-Related Problems (continued) • If filesystem on partition mounted to noncritical directory becomes corrupted: • Unmount filesystem • Run fsck command with –f (full) option • If fsck command cannot repair filesystem, use mkfs command to re-create the filesystem • Restore filesystem’s original data Linux+ Guide to Linux Certification, 2e

  22. Software-Related Problems:OS-Related Problems (continued) • If / filesystem is corrupted: • Boot from first Red Hat Fedora installation CD • Type “linux rescue” at welcome screen • Enter shell for Linux system on CD • Create new / filesystem via mkfs command • Restore original data to re-created / filesystem • Reboot system Linux+ Guide to Linux Certification, 2e

  23. Software-Related Problems:OS-Related Problems (continued) Figure 13-5: The Red Hat Fedora Linux installation welcome screen Linux+ Guide to Linux Certification, 2e

  24. Software-Related Problems:OS-Related Problems (continued) Figure 13-6: Obtaining a shell in rescue mode Linux+ Guide to Linux Certification, 2e

  25. Software-Related Problems:OS-Related Problems (continued) Figure 13-7: The command-line shell used in rescue mode Linux+ Guide to Linux Certification, 2e

  26. Software-Related Problems:OS-Related Problems (continued) • Knoppix Linux and BBC Linux: Bootable CD-based Linux distributions containing many filesystem repair utilities • setserial command: Set IRQ, I/O address, and speed of serial devices Linux+ Guide to Linux Certification, 2e

  27. Software-Related Problems:OS-Related Problems (continued) Table 13-1: Common keywords used with the setserial utility Linux+ Guide to Linux Certification, 2e

  28. Performance Monitoring • Jabbering: Failing hardware components send large amounts of information to CPU • Other causes of poor performance: • Software monopolizes system resources • Too many processes • Too many read/write requests to HDD • Rogue processes Linux+ Guide to Linux Certification, 2e

  29. Performance Monitoring (continued) • Bus mastering: Peripheral components perform tasks normally executed by CPU • To increase performance: • Add RAM • Upgrade to faster HDDs • Disk Striping RAID • Decrease kernel size Linux+ Guide to Linux Certification, 2e

  30. Performance Monitoring (continued) • Run performance utilities on a regular basis • Record results in a system log book • Eases identification of performance problems • Baseline: Measure of normal system activity Linux+ Guide to Linux Certification, 2e

  31. Monitoring Performance with sysstat Utilities • System Statistics (sysstat) package: Common performance monitoring utilities • Multiple Processor Statistics (mpstat) utility: Displays CPU statistics • Input/Output Statistics (iostat) command: Displays block device input/output statistics • System Activity Reporter (sar) command: Displays various system statistics Linux+ Guide to Linux Certification, 2e

  32. Monitoring Performance with sysstat Utilities (continued) Table 13-2: Common options to the sar command Linux+ Guide to Linux Certification, 2e

  33. Monitoring Performance with sysstat Utilities (continued) • Large number of pages sent to and taken from swap partition: • Slower performance • Add RAM to resolve Linux+ Guide to Linux Certification, 2e

  34. Other Performance Monitoring Utilities • free command: Displays memory and swap statistics • vmstat command: Displays memory, CPU, and swap statistics Linux+ Guide to Linux Certification, 2e

  35. Customizing the Kernel • Options to provide additional hardware support or change existing hardware support: • Insert modules into kernel • Recompile kernel • Download and compile new kernel Linux+ Guide to Linux Certification, 2e

  36. Kernel Modules • May insert device drivers and kernel features into the kernel as modules • Reduces kernel size • Good form to compile standard device support into the kernel • Leave support for other devices and features as modules • Modules typically stored in subdirectories of /lib/modules/<kernel-version> Linux+ Guide to Linux Certification, 2e

  37. Kernel Modules (continued) • insmod command: Insert modules into kernel • modprobe command: Insert module and all necessary prerequisite modules into kernel • lsmod command: Lists modules currently used by kernel • Can also show module dependencies • rmmod command: Remove modules from kernel Linux+ Guide to Linux Certification, 2e

  38. Kernel Modules (continued) • Modules usually inserted into kernel automatically at boot time using modprobe • /etc/modprobe.conf file: Used to load any alias modules at system startup Linux+ Guide to Linux Certification, 2e

  39. Compiling a New Linux Kernel • Gain or remove hardware or kernel support • /usr/src/<kernel-version> directory: Contains Kernel source code for a specific distribution • Can download new kernel source code • /usr/src/linux directory: Contains Kernel source code • Symbolic link to /usr/src/<kernel-version> Linux+ Guide to Linux Certification, 2e

  40. Compiling a New Linux Kernel (continued) • Make commands: Compilation-related tasks • Many types • make mrproper: Remove files created by previous kernel • make oldconfig: Record current kernel features and settings • make config: Prompts user for kernel configuration information • Text-based Linux+ Guide to Linux Certification, 2e

  41. Compiling a New Linux Kernel (continued) • make menuconfig: Provides menus to select kernel configuration • make xconfig or make gconfig: Provide graphical interface to select kernel configuration • xconfig runs in KDE; gconfig runs in GNOME • make clean: Remove files not required for compilation Linux+ Guide to Linux Certification, 2e

  42. Compiling a New Linux Kernel (continued) Figure 13-8: The make menuconfig interface Linux+ Guide to Linux Certification, 2e

  43. Compiling a New Linux Kernel (continued) Figure 13-9: The make gconfig interface Linux+ Guide to Linux Certification, 2e

  44. Compiling a New Linux Kernel (continued) Figure 13-10: Configuring power options in the Linux kernel Linux+ Guide to Linux Certification, 2e

  45. Compiling a New Linux Kernel (continued) • make bzImage: Compile the kernel • Creates bzip2-compressed kernel • Copy to /boot directory • Rename as vmlinuz-<kernel version> • makemodules_install: Compile necessary modules and copy to appropriate location Linux+ Guide to Linux Certification, 2e

  46. Patching the Linux Kernel • If not changing kernel version, can apply patches • Rather than download all kernel source code • Patch command: Supply a patch to kernel source code • Still need to recompile kernel Linux+ Guide to Linux Certification, 2e

More Related