Time required: 1 Hours
In this lab, you have a CentOS 7 server. Use this to follow along with the objectives in the scenario presented.
Identify and report on high CPU/memory utilization and kill or adjust process priorities.
In this lab, we identify and report on high CPU/memory utilization and kill or adjust process priorities.
In order to do that, we need to generate a process that will cause high CPU utilization. Before you begin the scenario below, be sure to do the following. Note that this is also covered in the video and lab guide.
1. Create a file with the following command:
dd if=/dev/urandom of=testfile count=20 bs=1024k
2. Create a file called cputest
.sh with the following code:
while [ 1 ]
i=`expr $i + 1`
echo "Iteration: $i"
3. Make the script executable:
chmod 755 cputest.sh
4. Run the command:
You have received a report about one of your systems taking a long time to complete tasks. You will need to log in and, using various utilities to report on and/or change processes and priorities, discover the process that is causing the high CPU utilization. Then, you must attempt to adjust the priority in order to address the problem while allowing the job to continue running.