You are on page 1of 51

Troubleshooting and performance monitoring

Unit objectives
 Identify good troubleshooting
Course ILT

practices, and troubleshoot common


hardware and software-related
problems
 Monitor system performance by using
command-line and graphical utilities
 Understand the purpose and usage of
kernel modules
 Troubleshoot and tune the hard disk
Topic A
 Topic A: Troubleshooting
 Topic B: Performance monitoring
Course ILT

 Topic C: Customizing the kernel


 Topic D: Troubleshooting and tuning
the hard disk
Course ILT The maintenance cycle
Troubleshooting methodology
 Monitoring
– Examine log files
Course ILT

– Use monitoring utilities


 Proactive maintenance
– Prevent problems from occurring
 Reactive maintenance
– Fix problems when they occur
Common troubleshooting
Course ILT procedures
Troubleshooting methodology: Rules

 Prioritize problems
– According to severity
Course ILT

– Spend a reasonable amount of time


given priority
 Try to solve the root of the problem
– Avoid missing the underlying cause of a
problem
– Try to justify why a certain solution is
successful
Course ILT Activity A-1

Discussing troubleshooting
methodology
Course ILT The KDE Control Center
Hardware-related problems
 Absence of a device driver
– Prevents operating system from using
Course ILT

hardware devices
 Kudzu program
– Program used to detect and install
support for new hardware
Course ILT The kudzu welcome screen
Course ILT Configuring hardware using kudzu
Course ILT Activity A-2

Resolving hardware problems


Software-related problems
 Dependencies
– Prerequisites for program execution
Course ILT

 Shared libraries
 Other packages
 ldd command
– Displays shared libraries used by a
program

continued
Software-related problems, continued

 ldconfig command
– Updates the /etc/ld.so.conf and
Course ILT

/etc/ld.so.cache files
 /etc/ld.so.conf files
– Contains a list of directories that contain
shared libraries
 /etc/ld.so.cache file
– Contains the location of shared library
files
File descriptors and logs
 File descriptors
– Connections a program makes to files
Course ILT

 unlimit command
– Modifies process limit parameters
 /var/log directory
– Contains most system log files
OS-related problems
 Most software problems are related to
the operating system
Course ILT

– Typically problems with boot loaders,


filesystems, and serial devices
 mkbootdisk command
– Creates a boot floppy disk
Keywords used with the setserial utility
Course ILT
Course ILT Exercise A-3

Resolving software-related
problems
Course ILT Activity A-4

Viewing and modifying package


dependencies
Topic B
 Topic A: Troubleshooting
 Topic B: Performance monitoring
Course ILT

 Topic C: Customizing the kernel


 Topic D: Troubleshooting and tuning
the hard disk
Performance monitoring
 Hardware problems
– Improper configuration
Course ILT

– Old and failing


 Jabbering
– Failing hardware components send large
amounts of information to the CPU

continued
Improving software performance
 Upgrade CPU
 Bus mastering
Course ILT

 More RAM
 Faster hard drive
 CD-ROM on separate controller
 Smaller kernel
sysstat utilities
 System Statistics (sysstat) package
– Performance monitoring utilities
Course ILT

– mpstat, iostat, sar, and isag


 Multiple Processor Statistics (mpstat)
utility
– Displays CPU statistics

continued
sysstat utilities, continued
 Input/Output Statistics (iostat)
command
Course ILT

– Displays input/output statistics for block


devices
 System Activity Reporter (sar)
command
– Displays various system statistics
Course ILT Options for the sar command
Monitoring performance: sysstat utilities

 Interactive System Activity Grapher


(isag) command
Course ILT

– Graphs system performance


– Uses information stored in the /var/log/sa
directory
Course ILT Choosing a file to view by using ISAG
Course ILT Choosing statistics by using ISAG
Course ILT Viewing user statistics by using ISAG
Course ILT Activity B-1

Using the mpstat, iostat, and sar


commands
Other performance monitoring utilities

 free command
– Displays memory and swap statistics
Course ILT

 vmstat command
– Displays memory, CPU, and swap
statistics
Course ILT Activity B-2

Using the free and vmstat


commands
Topic C
 Topic A: Troubleshooting
 Topic B: Performance monitoring
Course ILT

 Topic C: Customizing the kernel


 Topic D: Troubleshooting and tuning
the hard disk
Device drivers and features
 Many compiled into the kernel
 May also be inserted into the kernel as
Course ILT

modules
– Reduces size of the kernel
– Runs faster
 Compile standard device support into
the kernel
 Support for other devices and features
as modules
Kernel modules
 insmod command
– Inserts a module into the kernel
Course ILT

 modprobe command
– Inserts module and all necessary
prerequisite modules into the kernel
 lsmod command
– Lists modules currently used by the
kernel

continued
Kernel modules, continued
 rmmod command
– Removes a module from the kernel
Course ILT

 /etc/modules.conf file
– Used to load and alias modules at
system initialization
 /etc/rc.d/rc.local file
– Loads modules at system initialization
Course ILT Activity C-1

Managing kernel modules


Compiling a new Linux kernel
 /usr/src/linux
– Contains source code for the kernel
Course ILT

during compilation
Course ILT The make menuconfig interface
Course ILT The make xconfig interface
Configuring code maturity level options
Course ILT
Course ILT Configuring USB support
Course ILT Activity C-2

Compiling and using a new kernel


Patching the Linux kernel
 Applies only the updates needed to
bring kernel to new level
Course ILT

 Patch command
– Used to apply a patch to the kernel
source code
Course ILT Exercise C-3

Discussing kernel patches


Topic D
 Topic A: Troubleshooting
 Topic B: Performance monitoring
Course ILT

 Topic C: Customizing the kernel


 Topic D: Troubleshooting and tuning
the hard disk
The hdparm program
 Displays detailed information about
hard disks
Course ILT

 Runs simple tests of hard disk


performance
Course ILT Activity D-1

Using the hdparm program


The bonnie program
 A hard disk benchmarking program
 Checks the read and write speed of
Course ILT

your hard disk


Course ILT Activity D-2

Tuning hard disk performance


Unit summary
 Identified good troubleshooting
practices, and learned how to
Course ILT

troubleshoot common hardware- and


software-related problems
 Monitored system performance by
using command-line and graphical
utilities
 Understood the purpose and usage of
kernel modules
 Learned how to troubleshoot and tune
the hard disk

You might also like