Checking Resource Usage in Fedora (Linux)

Similar documents
APACHE TROUBLESHOOTING. Or, what to do when your vhost won t behave

Process States. Controlling processes. Process states. PID and PPID UID and EUID GID and EGID Niceness Control terminal. Runnable. Sleeping.

NAME top display top CPU processes. SYNOPSIS top [ ] [d delay] [p pid] [q] [c] [C] [S] [s] [i] [n iter] [b]

Question No: 1 In capacity planning exercises, which tools assist in listing and identifying processes of interest? (Choose TWO correct answers.

Linux System Administration

CPSC 457 OPERATING SYSTEMS MIDTERM EXAM

MYSQL TROUBLESHOOTING. Or, what to do when MySQL starts throwing a fit

Section 1: Tools. Contents CS162. January 19, Make More details about Make Git Commands to know... 3

Practical 5. Linux Commands: Working with Files

Prof. Thomas Sterling

Managing Processes Process: A running program

CompTIA Linux+ Guide to Linux Certification Fourth Edition. Chapter 2 Linux Installation and Usage

Chapter 9: Process management. Chapter 9 Process management

Linux+ Guide to Linux Certification, Third Edition. Chapter 2 Linux Installation and Usage

MySQL Performance Troubleshooting

CIT 470: Advanced Network and System Administration. Topics. What is performance testing? Performance Monitoring

07 - Processes and Jobs

Lab 5a Shell Script Lab 4 Using Arithmetic Operators in shell script

Linux Installation. Prepared by: William Zereneh

CRUK cluster practical sessions (SLURM) Part I processes & scripts

Real-Time Monitoring Configuration

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

Sperimentazioni I LINUX commands tutorial - Part II

Instructions: Step 1: Respond to the following: IT131 Linux+

Performance Objects and Counters for the System

Announcement. Exercise #2 will be out today. Due date is next Monday

Process Control Commands

Outline. Cgroup hierarchies

Performance Tuning of the Network Performance Server in Network Node Manager i December 8, 2016

OPS235: Week 1. Installing Linux ( Lab1: Investigations 1-4)

Linux Command Line Primer. By: Scott Marshall

Chapter 02 Linux Installation and Usage

Main Window. June 25, 2017, Beginners SIG Activity Monitor (Part 1 of 2)

EKT332 COMPUTER NETWORK

CST8207: GNU/Linux Operating Systems I Lab Nine Disks, Partitions, and File Systems Part 2. Disks, Partitions, and File Systems - Part 2 of 2

Prerequisites: Students must be proficient in general computing skills but not necessarily experienced with Linux or Unix. Supported Distributions:

commands exercises Linux System Administration and IP Services AfNOG 2015 Linux Commands # Notes

Shells and Processes. Bryce Boe 2012/08/08 CS32, Summer 2012 B

SANOG VI IP Services Workshop: FreeBSD Install

Linux Fundamentals (L-120)


System Performance Objects and Counters

Outline. Cgroup hierarchies

LINUX FUNDAMENTALS (5 Day)

Operating Systems. Lecture 05

How many of you have never built a NetBSD kernel?

The student will have the essential skills needed to be proficient at the Unix or Linux command line.

www highskills pt pt

Post Ubuntu Install Exercises

CSCI 2132 Software Development. Lecture 3: Unix Shells and Other Basic Concepts

Lab 3a Using the vi editor

Section 9: Cache, Clock Algorithm, Banker s Algorithm and Demand Paging

System performance objects and counters

Twitch Plays Pokémon: Twitch s Chat Architecture. John Rizzo Sr Software Engineer

This is Worksheet and Assignment 12. Disks, Partitions, and File Systems

CS 300 Data Structures

Tvheadend - Bug #2309 Another memory leak?

Appendix A GLOSSARY. SYS-ED/ Computer Education Techniques, Inc.

The Unix Shell & Shell Scripts

Operating systems fundamentals - B02

Sysinstall main menu. Move the cursor down by using the DOWN-ARROW and select Standard.

Extreme Backup and Recovery on the Oracle Database Machine

PROCESSES. At least they re not ISO-9001 processes

More Raspian. An editor Configuration files Shell scripts Shell variables System admin

Some Ubuntu Practice...

Introduction to Linux. Fundamentals of Computer Science

COL100 Lab 2. I semester Week 2, Open the web-browser and visit the page and visit the COL100 course page.

SAS Viya 3.2 Administration: Monitoring

Chapter. Basic Administration. Secrets in This Chapter. Monitoring the System Viewing Log Files Managing Services and Programs Monitoring Disk Usage

Linux Hardware Management. Linux System Administration COMP2018 Summer 2017

CS2506 Quick Revision

Most of the work is done in the context of the process rather than handled separately by the kernel

SNMP MIBs and Traps Supported

Accurate study guides, High passing rate! IT TEST BOOK QUESTION & ANSWER. Ittestbook provides update free of charge in one year!

client X11 Linux workstation

INF322 Operating Systems

Metbox Training Outline LDM Training Metbox overview Break Metbox hands on training

CSE 391 Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors

Viewing and Configuring Performance Counters in RTMT

Linux+ Guide to Linux Certification, Third Edition. Chapter 6 Advanced Installation

Getting Started With UNIX Lab Exercises

Upgrade Cisco Interface Module for LoRaWAN IXM using the Console

Topics. Operating System. What is an Operating System? Let s Get Started! What is an Operating System? Where in the Book are we?

RH133. Red Hat Linux System Administration

Lab 2A> ADDING USERS in Linux

Introduction to Red Hat Linux I: Easy Reference Index Page

CTEC1863/2018F Bonus Lab Page 1 of 5

Unix System Architecture, File System, and Shell Commands

Advanced SUSE Linux Enterprise Server Administration (Course 3038) Chapter 8 Perform a Health Check and Performance Tuning

Introduction to Process in Computing Systems SEEM

Brief Linux Presentation. July 10th, 2006 Elan Borenstein

Linux+ Guide to Linux Certification, Third Edition

Community Enterprise Operating System (CentOS 7) Courses

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

Exam Questions RH133

Manage Directories and Files in Linux. Objectives. Understand the Filesystem Hierarchy Standard (FHS)

Network Drawing. Computer Specs, I ve used. Installing a Network-Based Intrusion Detection

Topics. Operating System I. What is an Operating System? Let s Get Started! What is an Operating System? OS History.

Please note that CNE 216 is a brand new course that has never been taught on the George campus; it will be taught for the first time in the fall of

10 MONITORING AND OPTIMIZING

Transcription:

Lab 5C Checking Resource Usage in Fedora (Linux) Objective In this exercise, the student will learn how to check the resources on a Fedora system. This lab covers the following commands: df du top Equipment The following equipment is required for this exercise: A computer with Fedora v12 or greater installed. Scenario There is a server running Fedora (Linux) that has been running efficiently for a long time but the system resources might be reaching their limits. The technician decides to run a few of the commands to check the system resources to ensure that the system will continue to run properly. Procedures There are three basic Linux commands used to check and record the resource usage on a Linux system. 1

Step 1: The df Command (disk file system) 1. Login as the root user and open a terminal window. 2. To determine the amount of hard drive space that is being used by Linux, type: df To make the output of the df command easier to read, type: df h You will notice the output is easier for human to read. Explain to your instructor how much hard disk space is being used. Instructor Signature Step 2: The du Command (disk usage) 1. Remain logged in as the root user 2. The du command is useful in determining the size of any directory or file within a directory. To go to the /etc directory and determine the size of the directory and the size of the passwd file, type the following command sequence: cd /etc du du hs du hs passwd 2

The size of the /etc directory will be displayed. The size of the passwd file will be displayed. Explain to your instructor the size of the /etc directory and the size of the passwd file. Instructor signature Example of the du command 3

Step 3: The top Command 1. From a terminal type: top In the example below, the output shows the followings: CPU idle time=97.6% No. of user =3 No. of processes = 73 No. of processes sleeping =70 Memory used =125508K Memory free = 5196K 4

Example of the top command 2 Base on the output of your Linux system top command, explain to your instructor the CPU, User and memory parameters. Instructor signature 5

More about the Top command Top command provides a real-time look at what is happening with your system. Top produces so much output that a new user may get over whelmed with all that s presented and what it means. Let s take a look at Top one line at a time. The server has been flooded with http requests to create some load on the server. Top output: The first line in Top: 22:09:08 is the current time; up 14 min shows how long the system has been up for; 1 user how many users are logged in; load average: 0.21, 0.23, 0.30 the load average of the system (1minute, 5 minutes, 15 minutes). 6

Load average is an extensive topic and to understand its inner workings can be daunting. The simplest of definitions states that load average is the CPU utilization over a period of time. A load average of 1 means your CPU is being fully utilized and processes not having to wait to use a CPU. A load average above 1 indicates that processes need to wait and your system will be less responsive. If your load average is consistently above 3 and your system is running slow you may want to upgrade to more CPU s or a faster CPU. The second line in Top: Shows the number of processes and their current state. The third line in Top: Shows CPU utilization details. 9.5%us user processes are using 9.5%; 31.2%sy system processes are using 31.2%; 27.0%id percentage of available CPU; 7.6%wa time CPU is waiting for IO. When first analyzing the CPU(s) line in top look at the %id to see how much CPU is available. If %id is low then focus on %us, %sy, and %wa to determine what is using the CPU. The fourth and fifth lines in Top: Describes the memory usage. These numbers can be misleading. 255592k total is total memory in the system; 167568K used is the part of the RAM that currently contains information; 88024k free is the part of RAM that contains no information; 25068K buffers and 85724k cached is the buffered and cached data for IO. So the actual amount of free RAM available for programs to use is: free + (buffers + cached) 7

88024k + (25068k + 85724k) = 198816k How much RAM is being used by programs? The answer is: used (buffers + cached) 167568k (25068k + 85724k) = 56776k The processes information: Top will display the process using the most CPU usage in descending order. Let s describe each column that represents a process. PID process ID of the process USER User who is running the process PR The priority of the process NI Nice value of the process (higher value indicates lower priority) VIRT The total amount of virtual memory used RES Resident task size SHR Amount of shared memory used S State of the task. Values are S (sleeping), D (uninterruptible sleep), R (running), Z (zombies), or T (stopped or traced) %CPU Percentage of CPU used %MEM Percentage of Memory used TIME+ Total CPU time used COMMAND Command issued 8

Interacting with Top Now that we are able to understand the output from Top lets learn how to change the way the output is displayed. Just press the following key while running top and the output will be sorted in real time. M Sort by memory usage P Sort by CPU usage T Sort by cumulative time z Color display k Kill a process q quit If we want to kill the process with PID 3161, then press k and a prompt will ask you for the PID number, and enter 3161. Command Line Parameters with Top You can control what top displays by issuing parameters when you run top. - d Controls the delay between refreshes - p Specify the process by PID that you want to monitor -n Update the display this number of times and then exit If we want to only monitor the http process with a PID of 3166 If we want to change the delay between refreshes to 5 seconds A Graphical View: Gnome System Monitor - Real-time Systems Reporting and Graphing The System Monitor application enables you to display basic system information and monitor system processes, usage of system resources, and file systems. You can also use System Monitor to modify the behavior of your system. Although not as powerful as the KDE System Guard, it provides the basic information which may be useful for new users: Displays various basic information about the computer's hardware and software. 9

Linux Kernel version GNOME version Hardware Installed memory Processors and speeds System Status Currently available disk space Processes Memory and swap space Network usage File Systems Lists all mounted filesystems along with basic information about each. Gnome System Monitor application The The tool is located at under Applications > System Tools > System Monitor. Explain to your instructor the graphical output generated by the system monitor tool. Instructor Signature 10