Monitoring System Performance Using Multiple Tools

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

In this hands-on lab, you will be using common commands like `ps` and `top/htop` along with other utilities like `vmstat`, `mpstat`, `iostat`, and `pidstat` to view system performance metrics. Additionally, you will launch a script on the system and then use these tools to locate any processes created by it and monitor system performance. For the final task, you will kill the script process, any child processes, and check system performance again.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Confirm Select Utilities Are Available by Checking the Version for Each
  1. ps
  2. top / htop
  3. vmstat
  4. mpstat
  5. iostat
  6. pidstat
Test the Functionality of Each Utility by Completing Specific Tasks
  1. ps
    • Change the columns displayed
    • Search for a specific process
  2. top / htop
    • Add a column, change the sort column
    • Search for bash processes
  3. vmstat
    • Execute the command
    • Execute the command again on a 3 second cycle, and repeat 5 times
  4. mpstat
    • Execute the command
    • Execute the command again, and display all metrics
  5. iostat
    • Execute the command, and display all metrics
    • Execute the command again on a 2 second cycle, and repeat 10 times while writing the data to a log file.
  6. pidstat
    • View all processes
    • Display the process tree for any process containing "sshd"
Launch a Script and Monitor the System
  1. Execute the systemcheck.sh script from the scripts directory, and send it to the background.
    • This script will spawn a separate process that will impact the system.
  2. Use one or more these tools to view active processes to determine what the script is doing.
    • Determine what processes are spawned by the script.
    • Identify what resources are being impacted by the script.
    • Collect the script process ID as well as any related child process PIDs.
  3. Kill all parent and child processes, preferably using one of these tools.

Additional Resources

SCENARIO:

You are a Linux system administrator working for a software development company. The software validation team has requested a new server that will be used to test code. The team wants to easily monitor system resources but are not Linux administrators or comfortable with complicated tools. Your manager has tasked you to review the system, confirm that common utilities are installed, and test the utilities on the system before turning it over to the validation team.

OBJECTIVES:

Confirm the following utilities by checking the version for each.

  1. ps
  2. top / htop
  3. vmstat
  4. mpstat
  5. iostat
  6. pidstat

Use these utilities to monitor system metrics, completing the following tasks.

  1. ps
    • Change the columns displayed
    • Search for a specific process
  2. top / htop
    • Add a column, change the sort column
    • Search for bash processes
  3. vmstat
    • Execute the command
    • Execute the command again on a 3 second cycle and repeat 5 times
  4. mpstat
    • Execute the command
    • Execute the command again and display all metrics
  5. iostat
    • Execute the command and display all metrics
    • Execute the command again on a 2 second cycle, and repeat 10 times while writing the data to a log file.
  6. pidstat
    • View all processes
    • Display the process tree for any process containing "sshd"

Use select system utilities to monitor system metrics.

  1. Execute the systemcheck.sh script from the scripts directory, and send it to the background.
    • This script will spawn a separate process that will impact the system.
  2. Use one or more these tools to view active processes to determine what the script is doing.
    • Determine what processes are spawned by the script.
    • Identify what resources are being impacted by the script.
    • Collect the script process ID as well as any related child process PIDs.
  3. Kill all parent and child processes, preferably using one of these tools.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?