Troubleshooting Disk Utilization on Linux

preview_player
Показать описание
Scenario
We work as a Linux administrator for a small company. The employees that work in the sales department have been complaining of sluggishness when attempting to use applications hosted by the back-end server that we are responsible for. So, we have been tasked with diagnosing the issue and ultimately resolving it. In order to do this, we will need to install the appropriate monitoring and reporting utilities on the host, use them to isolate the issue, and then terminate the process behind the problem.

NOTE: the processes listed here are, unlikely, to be relevant to you following along. Whilst doing this video the process I was trying to kill disappeared!
However, the commands are what are important in troubleshooting the issues.

Log in to the Server Environment and Gain root Access.

Begin by logging in to the server using the credentials provided.

Gain root access using the password on the hands-on lab page.

sudo -i
Install the Monitoring and Reporting Utilities (sysstat)
Install the necessary tools. Note that this is done later in the video but placed here to match the tasks in the lab.

yum install -y sysstat
Use the Monitoring and Reporting Utilities to Diagnose the Issue
Start with the top command.

top
Hit Ctrl-C to quit top.

Discover information about your system such as how many processors it has.

cat /proc/cpuinfo
Rerun the top command.

top
Hit Ctrl-C to quit top.

Use vmstat to verify the issue is with writing to a disk.

vmstat 1 4
Try to identify the source of the load.

iostat -y 1 3
Get more information about the specific device causing a problem.

iostat -dy -p xvdg 1 3
Get a list of all the blocks on the machine.

lsblk
Track down the process giving an issue.

lsof | grep "202,97"
Use the mount point to find the process giving an issue.

lsof | grep "/mnt/roshar"
Gain information on the persistent process using the process ID.

ps -ef | grep 1251

An alternate way to show the parent-child process relationship using the process ID.

pstree -p 1251

Copy the offending process to potentially look at it later.

Terminate the Offending Process
Terminate the process using the process ID.

kill -15 1251
Verify that the problem has been addressed.

top
Рекомендации по теме
welcome to shbcf.ru