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.
*This course is not approved or sponsored by Red Hat.*
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Confirm Select Utilities Are Available by Checking the Version for Each
ps
top / htop
vmstat
mpstat
iostat
pidstat
- Test the Functionality of Each Utility by Completing Specific Tasks
ps
- Change the columns displayed
- Search for a specific process
top / htop
- Add a column, change the sort column
- Search for
bash
processes
vmstat
- Execute the command
- Execute the command again on a 3 second cycle, and repeat 5 times
mpstat
- Execute the command
- Execute the command again, and display all metrics
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.
pidstat
- View all processes
- Display the process tree for any process containing "sshd"
- Launch a Script and Monitor the System
- 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.
- 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.
- Kill all parent and child processes, preferably using one of these tools.
- Execute the