Troubleshooting CPU Utilization

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

The ability to diagnose and resolve issues on a Linux system is a skill that every administrator needs to cultivate. In this lab, we cover using various reporting and monitoring utilities to troubleshoot issues with CPU utilization on the system.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Install the Monitoring and Reporting Utilities (`sysstat`)

Install the sysstat package using the following commands:

sudo -i
yum install -y sysstat
Use the Monitoring and Reporting Utilities to Diagnose the Issue

This is a list of possible steps to take to find the source of the issue. Not all of them are required.

free -h
df -h
vmstat 1 4
iostat -y 1 3
iostat -cy 1 3
top <-- locate PID(s) that are taking up a large amount of CPU (gzip and cat)

Use the PIDs to discover the parent process ID (PPID) that spawned them and copy the offending script to /home/cloud_user/.

ps -ef | egrep "PID|PID" <-- You can grep for each individual PID (egrep saves a step) 
pstree -p (PID of <-- shows process tree in a visual format
cp /root/ /home/cloud_user/  
Terminate the Offending Process

Once the PID of the offending process has been located (, use the kill command to terminate it.

kill -15 PID

Additional Resources

We work as a Linux administrator for a large industrial supplier. The employees that work in the marketing department have been complaining that several of the applications they use on a daily basis have been freezing intermittently or are completely unresponsive. As the administrator of the back-end servers that house these applications, we have been tasked with diagnosing and resolving the issue. The first thing we need to do is install the performance and monitoring tools provided by the sysstat package, and then use these and other tools to diagnose the issue. After discovering the issue, we need to terminate the process behind it to bring the system back to a fully-functional state.

Additional info:

  • All steps should be performed as the root user.
  • Use as many (or as few) tools as necessary to locate the issue.
  • Once discovered, the source of the issue should be copied to the /home/cloud_user directory.
  • The sigkill signal (9) should not be used with the kill command because of the potential to orphan child processes.

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?