CPU Troubleshooting

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
21 hours 25 minutes
Difficulty
Intermediate
CEU/CPE
21
Video Transcription
00:00
>> Hey there cybrarians and welcome back to
00:00
the Linux plus course here at Cybrary,
00:00
I'm your instructor Ralph Gilles.
00:00
In today's lesson we're going to be
00:00
talking about CPU troubleshooting.
00:00
Upon completion of this lesson,
00:00
you're going to be able to determine how to
00:00
find detailed CPU load information,
00:00
as well as understand how the sar
00:00
and sysctl commands are used.
00:00
Once you've determined that there is a load on the CPU,
00:00
you may want to look at that load in more detail.
00:00
Recall that in the previous lesson
00:00
we discussed using the uptime command,
00:00
that's how we can determine if there's load on
00:00
the CPU and then to
00:00
actually determine what's going on with load.
00:00
Well, for the Linux plus exam,
00:00
we should know about two commands.
00:00
Those are iostat and sar.
00:00
Now we have covered iostat previously.
00:00
We saw that in this module for looking at disk latency,
00:00
but it can also be used to look at CPU load,
00:00
and we can do that by specifying
00:00
>> an interval and account.
00:00
>> For example, iostat-c2 5.
00:00
This is going to display the average CPU
00:00
every two seconds, five times.
00:00
Two seconds is the interval and five is the count.
00:00
Now if we want to view the historical CPU performance,
00:00
we use another command which is
00:00
these System Activity Reporter or the SAR command,
00:00
System Activity Reporter, SAR.
00:00
Now SAR uses data that's found in
00:00
the VAR log as a directory.
00:00
That directory VAR log SA
00:00
can contain up to a month of data.
00:00
However, by default, SAR is only going to
00:00
display the current day's CPU usage,
00:00
and it will give it to us in 10 minute intervals.
00:00
There are a lot of difference SAR
00:00
options to take a look at.
00:00
Definitely look at the main page if you want
00:00
to learn a little bit more about SAR,
00:00
but one option that's very helpful is SAR
00:00
dash H. We should be pretty familiar
00:00
>> with dash H by now.
00:00
>> We've seen it a bunch of times,
00:00
it displays things in human-readable format.
00:00
Here dash H is used for that same purpose with SAR.
00:00
Besides staying on top of the CPU load monitoring,
00:00
we can also look at tuning
00:00
CPU performance by modifying kernel parameters.
00:00
We do this using this sysctl command.
00:00
Now, we've covered this one as well.
00:00
You may remember we talked
00:00
about this command when we were doing network
00:00
tuning in module 3 or in module
00:00
19 where we were doing IP forwarding.
00:00
This is sysctl command is used
00:00
anytime we need to tune kernel parameters,
00:00
it's used for a lot of different purposes,
00:00
so you'll see it a lot.
00:00
You know, if we see something more
00:00
than once during our lesson,
00:00
during our course here,
00:00
it's going to be on the exam.
00:00
Definitely make sure you know about sysctl.
00:00
Now for the purposes of CPU performance improvement,
00:00
sysctl can be used to
00:00
modify processor handling in the kernel,
00:00
and so that's where it's used in this context.
00:00
With that, we've reached the end of this lesson,
00:00
and in this lesson we covered how to
00:00
find detailed CPU load information,
00:00
as well as how IO stat and sysctl commands are used.
00:00
Thanks so much for being here and I look
00:00
forward to seeing you in the next lesson.
Up Next