linux guide to linux certification second edition l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Linux+ Guide to Linux Certification, Second Edition PowerPoint Presentation
Download Presentation
Linux+ Guide to Linux Certification, Second Edition

Loading in 2 Seconds...

play fullscreen
1 / 46

Linux+ Guide to Linux Certification, Second Edition - PowerPoint PPT Presentation


  • 257 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Linux+ Guide to Linux Certification, Second Edition' - helene


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
linux guide to linux certification second edition

Linux+ Guide to Linux Certification, Second Edition

Chapter 13

Troubleshooting and Performance

objectives
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

objectives continued
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

troubleshooting methodology
Troubleshooting Methodology

Figure 13-1: The maintenance cycle

Linux+ Guide to Linux Certification, 2e

troubleshooting methodology continued
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

troubleshooting methodology continued6
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

troubleshooting methodology continued7
Troubleshooting Methodology (continued)

Figure 13-2: Common troubleshooting procedures

Linux+ Guide to Linux Certification, 2e

troubleshooting methodology continued8
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

resolving common system problems
Resolving Common System Problems
  • Two categories of problems:
    • Hardware-related
    • Software-related

Linux+ Guide to Linux Certification, 2e

hardware related problems
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

hardware related problems continued
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

hardware related problems continued12
Hardware-Related Problems (continued)

Figure 13-3: The kudzu welcome screen

Linux+ Guide to Linux Certification, 2e

hardware related problems continued13
Hardware-Related Problems (continued)

Figure 13-4: Configuring new hardware using kudzu

Linux+ Guide to Linux Certification, 2e

hardware related problems continued14
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

hardware related problems continued15
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

software related problems application related problems
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

software related problems application related problems continued
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

software related problems application related problems continued18
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

software related problems application related problems continued19
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

software related problems operating system related problems
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

software related problems os related problems continued
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

software related problems os related problems continued22
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

software related problems os related problems continued23
Software-Related Problems:OS-Related Problems (continued)

Figure 13-5: The Red Hat Fedora Linux installation welcome screen

Linux+ Guide to Linux Certification, 2e

software related problems os related problems continued24
Software-Related Problems:OS-Related Problems (continued)

Figure 13-6: Obtaining a shell in rescue mode

Linux+ Guide to Linux Certification, 2e

software related problems os related problems continued25
Software-Related Problems:OS-Related Problems (continued)

Figure 13-7: The command-line shell used in rescue mode

Linux+ Guide to Linux Certification, 2e

software related problems os related problems continued26
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

software related problems os related problems continued27
Software-Related Problems:OS-Related Problems (continued)

Table 13-1: Common keywords used with the setserial utility

Linux+ Guide to Linux Certification, 2e

performance monitoring
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

performance monitoring continued
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

performance monitoring continued30
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

monitoring performance with sysstat utilities
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

monitoring performance with sysstat utilities continued
Monitoring Performance with sysstat Utilities (continued)

Table 13-2: Common options to the sar command

Linux+ Guide to Linux Certification, 2e

monitoring performance with sysstat utilities continued33
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

other performance monitoring utilities
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

customizing the kernel
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

kernel modules
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

kernel modules continued
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

kernel modules continued38
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

compiling a new linux kernel
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

compiling a new linux kernel continued
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

compiling a new linux kernel continued41
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

compiling a new linux kernel continued42
Compiling a New Linux Kernel (continued)

Figure 13-8: The make menuconfig interface

Linux+ Guide to Linux Certification, 2e

compiling a new linux kernel continued43
Compiling a New Linux Kernel (continued)

Figure 13-9: The make gconfig interface

Linux+ Guide to Linux Certification, 2e

compiling a new linux kernel continued44
Compiling a New Linux Kernel (continued)

Figure 13-10: Configuring power options in the Linux kernel

Linux+ Guide to Linux Certification, 2e

compiling a new linux kernel continued45
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

patching the linux kernel
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