370 likes | 618 Views
Troubleshooting and performance monitoring. Unit objectives Identify good troubleshooting practices and troubleshoot common hardware and software problems Monitor system performance using command line and graphical utilities. Topic A: Troubleshooting. The maintenance cycle.
E N D
Troubleshooting and performance monitoring Unit objectives • Identify good troubleshooting practices and troubleshoot common hardware and software problems • Monitor system performance using command line and graphical utilities
Troubleshooting methodology • Monitoring • Examine log files • Use monitoring utilities • Proactive maintenance • Prevent problems from occurring • Reactive maintenance • Fix problems when they occur • Troubleshooting procedures
Troubleshooting a problem • Do similar systems hav problem • Examin system logs • View contents of proc directory • Run information gathering utilities • Research symptoms • Implement and test solutions • Document results and fix
Troubleshooting methodology: rules • Prioritize problems • According to severity • 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
Hardware problems • Conflicts • IRQ • Check dmesg, boot.log, messages • Check legacy vs. PnP • Absence of a device driver • Prevents operating system from using hardware devices • Kudzu program • Program used to detect and install support for new hardware
Hardware failure • Hard Drives • Power down • Replace HD • Boot • Use fdisk to partition • Use mkfs to create filesystems • Restore data from backup • Use fstab to mount at startup
Software problems • Dependencies • Prerequisites for program execution • shared libraries • other packages • rpm -V • ldd command • Displays shared libraries used by a program continued
Software problems, continued • ldconfig command • Updates the /etc/ld.so.conf and /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
Multimedia • Programs need codecs • Typically a shared library • If manually installed • Copy files to location • Update /etc/ld.so.conf and /etc/ld.so.cache
File descriptorsand logs • Filehandles • Connections a program makes to files • ulimit command • Modifies process limit parameters • /var/log directory • Contains most system log files
Operating system problems • Most software problems are related to the operating system • Typically problems • boot loaders • Filesystems • serial devices
Operating system problems • Boot loaders • LILO • Linear command • No compacty • GRUB • Missing files • Make sure kernel is before 1024 cyliner • Turn on lba32 • Create bootdisk • mkbootdisk command
Filesystem problems • fsck • unmont filesystem • Run fsck –f • If fsck can’t fix • Run mkfs • Restore data
Keywords used with the setserial utility • Serial ports • Need to reset from defaults
Performance monitoring • Hardware problems • Improper configuration • Old and failing • Jabbering • Failing hardware components send large amounts of information to the CPU continued
Improving software performance • Upgrade CPU • Buss Mastering • More RAM • Faster hard drive • CD-ROM on separate controller • Smaller kernel
sysstat utilities • System Statistics (sysstat) package • Performance monitoring utilities • mpstat, iostat, sar, and isag • Multiple Processor Statistics (mpstat) utility • Displays CPU statistics continued
sysstat utilities, continued • Input/Output Statistics (iostat) command • Displays Input/Output statistics for block devices • System Activity Reporter (sar) command • Displays various system statistics
Other performance monitoring utilities • top command • Displays memory usage, swap usage, average CPU Load • free command • Displays memory and swap statistics • vmstat command • Displays memory, CPU, and swap statistics
Unit summary • Identified good troubleshooting practices and learned how to troubleshoot common hardware and software problems • Monitored system performance using utilities
The system administrator wishes to view vmstat output once every 10 seconds for the next minute. Which of the following commands accomplishes this? A. vmstat 10 6 B. vmstat 10 1min C. vmstat 10; sleep 60 D. vmstat time='1 min' 10
The system administrator wishes to view vmstat output once every 10 seconds for the next minute. Which of the following commands accomplishes this? A. vmstat 10 6 B. vmstat 10 1min C. vmstat 10; sleep 60 D. vmstat time='1 min' 10 Answer: A
If a user wishes to monitor the last three lines of the log file messages.log and update it every 15 seconds, which of the following commands should be issued? A. sar f s 15 n 3 messages.log B. tail f s 15 n 3 messages.log C. watch f s 15 n 3 messages.log D. follow f s 15 n 3 messages.log
If a user wishes to monitor the last three lines of the log file messages.log and update it every 15 seconds, which of the following commands should be issued? A. sar f s 15 n 3 messages.log B. tail f s 15 n 3 messages.log C. watch f s 15 n 3 messages.log D. follow f s 15 n 3 messages.log Answer: B
Which of the following is the BEST tool to measure system performance baseline over a period of time? A. sar B. var C. pmap D. netstat
Which of the following is the BEST tool to measure system performance baseline over a period of time? A. sar B. var C. pmap D. netstat Answer: A
A new RPM package returns a large number of errors and has never run successfully. Which of the following commands should be run as a FIRST step to troubleshooting this problem? A. verify <package_name> B. rpm V <package_name> C. rpmdb v <installation_file> D. diff rpm <package_name> <installation_file>
A new RPM package returns a large number of errors and has never run successfully. Which of the following commands should be run as a FIRST step to troubleshooting this problem? A. verify <package_name> B. rpm V <package_name> C. rpmdb v <installation_file> D. diff rpm <package_name> <installation_file> Answer: B