Linux Operations and Administration Chapter Twenty Advanced Linux Administration.

Slides:



Advertisements
Similar presentations
Objectives Overview Define an operating system
Advertisements

Genesis: from raw hardware to processes System booting sequence: how does a machine come into life.
Chapter 9: Understanding System Initialization The Complete Guide To Linux System Administration.
Linux Booting Procedure
Linux can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
Linux+ Guide to Linux Certification, Second Edition
Discovering Computers Fundamentals, Third Edition CGS 1000 Introduction to Computers and Technology Fall 2006.
1 Linux Networking and Security Chapter 2. 2 Configuring Basic Networking Describe how networking devices differ from other Linux devices Configure Linux.
MCDST : Supporting Users and Troubleshooting a Microsoft Windows XP Operating System Chapter 8: Troubleshooting Storage Devices and Display Devices.
Router Components Semester 2 Chapter 4. Table of Contents More on Components The Show Command Network Neighbor Routers Basic Network Testing.
Linux+ Guide to Linux Certification, Second Edition Chapter 3 Linux Installation and Usage.
Hands-On Microsoft Windows Server 2003 Administration Chapter 10 Monitoring and Troubleshooting Windows Server 2003.
A Guide to Unix Using Linux Fourth Edition
11 INSTALLING WINDOWS XP Chapter 2. Chapter 2: Installing Windows XP2 INSTALLING WINDOWS XP  Prepare a computer for the installation of Microsoft Windows.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 11: Monitoring Server Performance.
Chapter 14 Chapter 14: Server Monitoring and Optimization.
1 Web Server Administration Chapter 3 Installing the Server.
Lesson 4-Installing Network Operating Systems. Overview Installing and configuring Novell NetWare 6.0. Installing and configuring Windows 2000 Server.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 1 Introduction to Managing the SUSE Linux Enterprise Server.
Linux Operations and Administration
Ch 11 Managing System Reliability and Availability 1.
Linux Operations and Administration
Linux+ Guide to Linux Certification, Third Edition
© Paradigm Publishing Inc. 4-1 Chapter 4 System Software.
CompTIA Linux+ Certification
Linux+ Guide to Linux Certification Chapter Three Linux Installation and Usage.
Your Interactive Guide to the Digital World Discovering Computers 2012.
Linux Booting Procedure
A Guide to Unix Using Linux Fourth Edition
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
Chapter 4 System Software.
Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Linux Operations and Administration Chapter Fourteen Planning for a Linux Installation.
University of Management & Technology 1 Operating Systems & Utility Programs.
Explain the purpose of an operating system
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
Cisco S2 C4 Router Components. Configure a Router You can configure a router from –from the console terminal (a computer connected to the router –through.
Guide to Linux Installation and Administration, 2e1 Chapter 2 Planning Your System.
MCTS Guide to Microsoft Windows Vista Chapter 4 Managing Disks.
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
1 Interface Two most common types of interfaces –SCSI: Small Computer Systems Interface (servers and high-performance desktops) –IDE/ATA: Integrated Drive.
1 Objectives Manage and install new file systems.
Chapter Eight Exploring the UNIX Utilities. 2 Lesson A Using the UNIX Utilities.
14 Step-by-Step Instructions for an Upgrade Installation n Prepare for the installation Verify that all devices and applications are Windows 2000 compatible.
Linux Administration. Pre-Install Different distributions –Redhat, Caldera, mandrake, SuSE, FreeBSD Redhat Server Install –Check HCL –Significant issues.
Troubleshooting and Performance
Guide to Linux Installation and Administration1 Chapter 4 Running a Linux System.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
Linux Operations and Administration Chapter Two Installing OpenSUSE.
System Administration – Part 2. Devices in UNIX are files: A device can be accessed with different file names All device files are stored in /dev or its.
CSC190 Introduction to Computing Operating Systems and Utility Programs.
Chapter 8: Installing Linux The Complete Guide To Linux System Administration.
Chapter 9 Operating Systems Discovering Computers Technology in a World of Computers, Mobile Devices, and the Internet.
Linux Operations and Administration
Materi managing user & groups, file system Managing Software Packages and File Systems The Complete Guide to Linux System Administration Chapter 10.
CHAPTER 3 Router CLI Command Line Interface. Router User Interface User and privileged modes User mode --Typical tasks include those that check the router.
Linux Filesystem Administration
CHAPTER 7 Operating System Copyright © Cengage Learning. All rights reserved.
DISCOVERING COMPUTERS 2018 Digital Technology, Data, and Devices
Chapter 8 Unix & Linux.
Chapter Objectives In this chapter, you will learn:
Guide to Linux Installation and Administration, 2e
Chapter 2: System Structures
CONFIGURING HARDWARE DEVICE & START UP PROCESS
IS3440 Linux Security Unit 7 Securing the Linux Kernel
SUSE Linux Enterprise Desktop Administration
Presentation transcript:

Linux Operations and Administration Chapter Twenty Advanced Linux Administration

Linux Operations and Administration Objectives Manage kernel modules and load and configure the kernel Explain how to monitor system resources and use system-monitoring tools Use commands to fine-tune a file system Describe emergency recovery procedures Summarize common troubleshooting measures in Linux 2

Linux Operations and Administration Working with the Linux Kernel Linux kernel –Innermost layer of Linux OS –Also called the core –Acts as an interface to hardware attached to the computer –Manages communication between processes Each Linux distribution includes a precompiled kernel 3

Linux Operations and Administration Basics of the Linux Kernel Linux kernel can function in one or more modes –User mode and kernel mode Source code for the Linux kernel is stored in a group of directories called kernel source tree Linux kernel is generally one of two types: –Monolithic –Modular Table 20-1 describes some of commands for managing kernel modules 4

Linux Operations and Administration5 Figure 20-1 Numbering of Linux kernel versions © Cengage Learning 2013

Linux Operations and Administration Basics of the Linux Kernel (cont’d.) 6 Table 20-1 Commands for managing kernel modules

Linux Operations and Administration Kernel Configuration In openSUSE, you must install the Linux Kernel Development pattern to have access to important packages You must be in /usr/src/linux directory Configuration build file for kernel is.config file Configuration tools to edit.config file –make oldconfig –make menuconfig –make config 7

Linux Operations and Administration Compiling the Kernel Involves translating its contents into a binary format Compiling process automated by using make utility zcat command is used to view the gzipped kernel configuration –Running in real time in /proc/config.gz virtual file Activity 20-1: Configuring and Building the Linux Kernel –Configure and build the Linux kernel 8

Linux Operations and Administration System Monitoring Monitoring a server or a workstation for CPU and memory use is an important task –Helps identify possible performance problems OpenSUSE has several commands for monitoring system performance, such as free and top Monitoring system performance helps determine possible system errors or performance bottlenecks These errors can be diagnosed using system log files 9

Linux Operations and Administration Monitoring System Resources System monitoring –Process of observing portions of a system for problems or anomalies –Includes monitoring: CPU utilization Network bandwidth Storage space use Memory use 10

Linux Operations and Administration Monitoring CPU Utilization Context switching –Specifies when CPU stops the currently running process and starts a new process Interrupts –An interrupt occurs when the CPU suspends its current execution, saves the current work status, and transfers control to an interrupt handler Load percentage –Specifies the percentage of time a user-level or a system-level process spends on a CPU 11

Linux Operations and Administration Monitoring Network Bandwidth Number of bytes received or sent –Specifies the number of bytes that can be sent or received over a network connection Data transfer speed –Specifies the maximum number of I/O operations that a network connection can perform per second 12

Linux Operations and Administration Monitoring Storage Space Free space Data transfer speed File system–based information Seek time Latency 13

Linux Operations and Administration Monitoring Memory Use Memory pages –Gives detailed information about: Memory-resident pages, which can be active or inactive How the system uses memory pages Swapping statistic –Specifies a system’s swapping behavior –Swapping Technique of moving data pages from memory to a swap space on a hard drive 14

Linux Operations and Administration Using Basic System-Monitoring Commands top command –Gives you an active view of a running system and can display system summary information vmstat command –Displays virtual memory statistics and information about processes, CPU activity, and disk space use –Syntax: vmstat -n delay cnt 15

Linux Operations and Administration Using Basic System-Monitoring Commands (cont’d.) free command –Shows in column format the total amount of free, physical, and swap memory in the system as well as buffers used by the kernel df command –Displays the amount of available disk space on the file system Activity 20-2: Using System-Monitoring Commands –Work with Linux system-monitoring commands 16

Linux Operations and Administration Administering System Logs logrotate utility –Included in OpenSUSE –Can be used by administrators to manage large numbers of log files –Offers automatic rotation, compression, removal, and mailing of log files –Configuration file is called logrotate.conf Located in /etc directory 17

Linux Operations and Administration Using GUI System-Monitoring Tools Linux offers sophisticated system-monitoring tools, such as the sysstat package Graphical tools in GNOME and KDE desktop environments are also included for monitoring system resources and processes 18

Linux Operations and Administration The GNOME System-Monitoring Tool GNOME System Monitor –Displays information on CPU, memory, and swap utilization in tabular form –Started using gnome-system-monitor command –Contains five tabs: System Processes Resources File Systems Hardware 19

Linux Operations and Administration20 Figure 20-4 The GNOME System Monitor interface © Cengage Learning 2013

Linux Operations and Administration The KDE System-Monitoring Tool KDE System Monitor –Used to monitor processes –Started using ksysguard command –Contains two tabs: Process Table System Load 21

Linux Operations and Administration22 Figure 20-5 The KDE System Monitor interface © Cengage Learning 2013

Linux Operations and Administration Using the sysstat Package for Resource Monitoring sysstat package –Used to display detailed information on system performance –Consists of iostat and mpstat commands iostat command –Used to report CPU utilization and I/O statistics for devices, partitions, and network file systems 23

Linux Operations and Administration Using the sysstat Package for Resource Monitoring (cont’d.) mpstat command –Used to display information for each processor, starting with processor0 Activity 20-3: Using Tools to Monitor System Performance –Display detailed information on system performance with the sysstat package and GUI system- monitoring tools 24

Linux Operations and Administration Performance Tuning After you determine resource use with system- monitoring tools, you should fine-tune system resources to improve performance Two frequently used resources that require tuning are the hard drive and file system 25

Linux Operations and Administration Performance Tuning a Disk Disk I/O performance –Has a large effect on a system’s benchmark performance –Can be improved by fine-tuning the hard drive For example: –You can tune the hard drive to increase disk transfer speed –This improves system performance 26

Linux Operations and Administration Using the hdparm Command Can be used to tune an IDE hard drive You must be logged in as root to use this command Syntax: hdparm option device –option specifies flags that can be used to improve drive performance –device specifies the hard drive to be tuned 27

Linux Operations and Administration Fine-Tuning a File System File system has a major effect on system performance If file system size is very large, response time for performing I/O operations increases –Results in reduced system performance To improve system performance, you need to tune the file system 28

Linux Operations and Administration Using the mke2fs Command mke2fs command –Used to create a Linux ext2, ext3, or ext4 file system on a specified device, which is usually a hard drive partition –Format: mke2fs options device Best practice –Large files: use a large block size If the file size isn’t a multiple of the block size, you should specify the block size as a factor of the file size –Small files: use small block sizes for optimized performance 29

Linux Operations and Administration Using the tune2fs Command tune2fs command –Can be used to tune file system parameters on a Linux ext2, ext3, or ext4 file system –General format: tune2fs options device Example: –Command to change the number of maximum mounts on /dev/hda4 partition to 60: tune2fs –c 60 –L mypartiton1 /dev/hda4 30

Linux Operations and Administration Using the e2fsck Command e2fsck command –Used to check an ext2, ext3, or ext4 file system for bad data blocks –Syntax: e2fsck options device Example: –Command to force a file system check on /dev/hda2 device: e2fsck –f /dev/hda2 31

Linux Operations and Administration Using the badblocks Command badblocks command –Used to check a device for bad data blocks –General syntax: badblocks options device Example: –Command to check /dev/hda1 device for bad data blocks and write all bad blocks to the badblockdata file: badblocks –c 20 –o badblockdata /dev/hda1 32

Linux Operations and Administration Using the noatime Option noatime option –A special mount option for a file system –Stored in /etc/fstab configuration file When the noatime option is used: –Linux eliminates the need to update the access time of an inode in the referenced file system –Speeds up file access if files on the referenced file system are accessed frequently 33

Linux Operations and Administration Problem Solving in Linux A network’s security must be updated judiciously from time to time Administrator should be equipped to face any critical situation and have a thorough knowledge of troubleshooting techniques 34

Linux Operations and Administration Preventive Measures Having an overall view of a problem is important for troubleshoot Applying preventive measures can minimize the effect of critical situations that can cause losses –Backups –Configuration notes –Rescue disks 35

Linux Operations and Administration Backups YaST System Backup –Started with yast2 backup command –An easy-to-use backup program that searches files on a Linux system to create a backup archive Pax –A POSIX utility that can read and write a wide variety of archive formats –Command-line utility included with openSUSE Linux Ark –KDE archiving tool –A GUI tool 36

Linux Operations and Administration37 Figure 20-7 The YaST System Backup tool © Cengage Learning 2013

Linux Operations and Administration Configuration Notes Keep notes on the system configuration Notes should contain data about partition table entries and other important information, such as: –Partition number and size –Mount points –User details –Network card details 38

Linux Operations and Administration Rescue Disks Rescue disks are emergency disks you create ahead of time to save critical data To use openSUSE bootable CD as a rescue disk: –Select Rescue System from the boot menu 39

Linux Operations and Administration Recovering from a Disaster You should try to identify the root cause and find a solution to recover from the problem –Observe and read –Monitor the system log file –Refer to Linux user groups A disaster can also result from server downtime caused by a system crash 40

Linux Operations and Administration Single-User Mode Also known as maintenance mode An OS mode in which only the root partition is active and mounted Linux runs in runlevel 1 41

Linux Operations and Administration Rescue Mode You can boot a small Linux environment from some type of medium, such as a CD-ROM This medium is called a rescue disk Helpful if you cannot recover from a system crash or are having hardware or software problems Enables you to access files on the system’s hard drive, even if you’re having trouble running Linux from it 42

Linux Operations and Administration Troubleshooting Linux Two widely used Linux boot loaders: –LILO and GRUB Boot loader –A small program stored on the Master Boot Record (MBR) that can load one or more OSs by reading file system information through a pointer from the disk partition containing OS files Linux Loader (LILO) –One of the original boot loaders –No longer supported by openSUSE 43

Linux Operations and Administration Using GRUB Grand Unified Boot Loader (GRUB) –A more flexible boot loader than LILO –Has become the boot loader of choice for current Linux distributions –Packaged with the latest version of openSUSE In openSUSE, the GRUB configuration file is controlled by /boot/grub/menu.lst file 44

Linux Operations and Administration Login Problems Login requires a username and password for validation Sometimes root users forget their passwords You can change this password by editing the kernel entry in the GRUB menu screen, which tells the system to boot to a specific shell Activity 20-4: Changing a Root Password –Change a root password 45

Linux Operations and Administration File System Problems Problem –System fails to unmount file system because it’s been powered off by a hard reboot or power failure Solution –System might run a file system check (by using fsck command) to fix problems in file system Journaling file systems do not use fsck –Use a log to recover from problems To use fsck command, you need to know partition details 46

Linux Operations and Administration Network Troubleshooting ping command –Used to send Internet Control Message Protocol (ICMP) packets to a remote host in an attempt to get the remote host to send back an Echo packet traceroute command –Tracks the route packets take through a network and displays the routers used along the way Activity 20-5: Using the ping and traceroute Commands –Use ping and traceroute commands to check network connectivity 47

Linux Operations and Administration Summary Linux kernel performs two main tasks: –Servicing low-level hardware programming requirements –Providing an environment for different processes in the computer OS can function in user mode or kernel mode Linux kernel’s source code is stored under a group of directories known as kernel source tree Kernel can be monolithic or modular You can use lsmod and insmod commands to manage Linux kernel modules 48

Linux Operations and Administration Summary (cont’d.) System monitoring is used to determine possible performance bottlenecks and errors –Monitoring CPU utilization, network connection’s bandwidth, storage space, and memory use Basic system-monitoring commands in Linux: top, vmstat, free, du, and df Logrotate utility enables administrators to manage large numbers of log files Linux includes GUI tools in GNOME and KDE for monitoring system resources and processes 49

Linux Operations and Administration Summary (cont’d.) Two frequently used resources that require tuning are hard drives and file systems Preventive measures can minimize the effect of critical situations In single-user mode, also known as maintenance mode, only root partition is active and mounted Grand Unified Boot Loader (GRUB): a small program that can load one or more Oss Command for fixing file system problems: fsck Two useful commands for diagnosing networks: ping and traceroute 50