Creating Capacity Usage Reports

30 minutes
  • 5 Learning Objectives

About this Hands-on Lab

Reporting on capacity usage not only shows what is happening on a system at a given time, but it can also help administrators plan for future resource needs. In this hands-on lab, you are tasked with generating several resource usage reports that utilize the `sar`, `vmstat`, and `iostat` commands.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Install the monitoring and reporting utilities (sysstat).

Use the yum command to install the sysstat package:

yum install -y sysstat
Start and enable the sysstat service so that sar will begin collecting system information.

Start and enable the sysstat service using systemctl:

systemctl start sysstat
systemctl enable sysstat
Update the cron file for sysstat so that the system activity accounting tool will run every thirty minutes.

Open the sysstat cron file and change the duration for the system activity accounting tool from 10 minutes to 30 minutes:

vim /etc/cron.d/sysstat

Update the following line:
*/10 * * * * root /usr/lib64/sa/sa1 1 1

To look like this:
*/30 * * * * root /usr/lib64/sa/sa1 1 1

Save the file by running :wq
Capture the results of the vmstat command in a file – /root/vmstat_report. The report should have a delay of one second with a count of ten and also include timestamps.

Use the vmstat command to generate a report and redirect the output to /root/vmstat_report:

vmstat -t 1 10 > /root/vmstat_report
Capture the results of the iostat command in a file – /root/iostat_report. Only include statistics from the nvme0n1 device (cpu and average removed). It should have a one second delay and count of five.

Use the iostat command to generate a report and redirect the output to /root/iostat_report:

iostat -dy -p nvme0n1 1 5 > /root/iostat_report

Additional Resources

You work as a Linux administrator for a mid-sized manufacturing company. Budgeting for the upcoming fiscal year has begun, and your manager needs you to provide usage reports to justify the purchase of additional hardware resources. The backend server you manage is already at capacity, and the user base for the applications on that server is estimated to grow around 30 to 40%. In order to gather this information, you will be using several utilities provided by the sysstat: sar, vmstat, and iostat. First, you will need to install the sysstat package and ensure that the sysstat service is started and enabled. Then you will need to alter the reporting interval for sar from the default of 10 minutes to 30 minutes. Finally, you will need to generate two reports using the vmstat and iostat commands and capture the results in two separate files in the root directory: vmstat_report and iostat_report.

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?