Time
6 hours 20 minutes
Difficulty
Beginner
CEU/CPE
3

Video Description

Linux Troubleshooting Commands This lesson covers basic trouble shooting commands. Participants learn about command line tools which will help them to discover where a problem exists and how to remedy the problem. In Linux, it is more efficient to use the command line interface and available command line tools. In this lab-based lesson, participants learn step-by-step directions in how to use commands to troubleshoot problems. Some of the commands covered are: - The shutdown command - The lshw command (list hardware) - The Test Disk recovery utility - The VM stack command This lesson also covers auditing, or log files. Auditing is especially helpful in the troubleshooting process. Auditing commands covered are: - The telnet command - The log directory command - The top command

Video Transcription

00:03
Welcome to Cyberia. I t I'm Greg Stewart. I'm your subject matter expert for leanings. Plus,
00:09
in this part of module three, we're gonna be talking about some basic troubleshooting that you can do in your system.
00:15
Now is a systems administrator. You're gonna spend a lot of time doing troubleshooting.
00:20
So we're gonna go through some of the troubleshooting commands that you can run some command line tools that will actually help you, too.
00:27
Get a grasp on really where the problem exists and how to eradicate that problem.
00:33
So with Windows, there's a lot of different tools you can use. However, with with Lennox, I find it to be much quicker and easier to use the command line interface in the available command line tools.
00:45
There's a lot of third party tools that are available out there. Also that you can grab, and some of them have a graphical user interface.
00:52
But most of them are just command line. But they all provide some great information in background as to what's going on with your system.
01:00
Where to find the issue, what the issue is, what's causing problems in your system, and then you can go about figuring out how to mitigate those problems.
01:11
So we're gonna start off with the command line. We will touch on a few of the
01:18
we'll touch on a few of the gooey items.
01:25
Okay, so here I am in my command line. What I've done is I've blown this command line up full screen so that you can see
01:32
the full breath of the the of the display of the results from these commands. But some of it could get pretty lengthy and a smaller, smaller terminal window. You won't get a CZ much
01:42
clean displays you would in a larger window. Some of most of these commands the output has columns and rows, and if you have a smaller window, it gets a little jumbled. That's just how it's written, so focused mainly on having a full screen go full screen on this. When you're doing these commands,
02:00
we'll see a lot of these commands.
02:02
I will tell you what they are and how they work. A lot of them won't be able to run because requires
02:07
no crisis to have a full running Apache Web server going to several different Lennox boxes of us don't have Mrs Lab
02:15
this isn't something that you can't do on your own, though the Lenox Web servers of the Apache Web server
02:22
is really simple to download and set up, basically can grab it using the APP, get command
02:27
and built through the download steps and you could run it. There's a lot of good blocks out there on setting up a Web server,
02:34
and those are all things that you can do great. And you're not gonna be tested in depth on Apache and what works and what it doesn't have set it up on your exam. There just aren't enough questions in the exam. Even with two exams, there just aren't enough questions that you could ask assistant administrator
02:50
to fully cover the breath of his or her experience.
02:53
So we're gonna do is gonna focus on some of the main troubleshooting commands. Once they'd be using day and it day out. That could actually help you to find what's going on your system.
03:02
The important thing is when somebody submits a trouble ticket or somebody calls you on, the phones have se X Y Z is not working.
03:09
Foreman machine is frozen or
03:13
I can't connect to my virtual machine or I can't connect to the Internet. I can't connect Oh, shared file or a shared directory, those kind of things that you have to understand, where to start looking for
03:24
and most, most of the time, our logs are gonna be our friend. And we've talked about some of the logs. Talk about some of the history commands you could run to see who's been along
03:32
the machine, what they've been doing, etcetera. And from a widespread network environment, you could do a lot more with that. Thing is, we're only using one machine here on my demo box. We'll be able to see the full
03:45
oh spread of that command, those networking commands. But you can always go out and find these on your own and touch upon.
03:52
So let's start with some of the more simple on. So
03:54
begin to a situation where you need to shut down a box.
03:59
Of course, you can go and use the gooey and shut it down. We're focusing on the command line here because a lot of times
04:04
you'd be singing your desk. You're not gonna be
04:08
ableto remote into these boxes, so I've used the remote desktop client for linens called machine. No machine
04:15
for a long time, and no machine will allow you to rdp into it limits box.
04:20
We're not gonna deal with that. We're gonna deal with strictly with this sum.
04:25
With this terminal,
04:27
of course, you can use putty Any sshh client. They're putty for every other clients that you might find most of her free downloads
04:33
those who can use to actually reach the
04:36
the terminal window to command line. So were the folks in the command line cause assistant, As a systems administrator,
04:43
you'll be you'll get the option thio put into these machines and get into a terminal. But you will always have the option to get to the graphical interface.
04:50
So let's start off with shutting down if you have to get into the machine and shut down for some reason one or another,
04:57
there's, you know, a set of there's a shutdown command, and there's also set of switches or arguments that you can use to tell it what to do.
05:04
So let's go through some of those gains. This is not just gonna take a few. We're gonna shut the machine down, start back up a few times, so
05:12
bear with me on this one. You might have to. We might have to just wait for a little bit watching paint dry,
05:15
But let's start off with Shut down. So you need to shut the machine down. I'm just gonna type Shut down.
05:20
Okay, I'm gonna type Shut down.
05:23
You have to give the shot that you said Shut down. Enter.
05:27
It's not gonna not gonna shut it down. What? It tells me you're after band is the shutdown is there's a time expected. You have to give the shut down
05:33
command a time parameter as to when you want to start showing the machine now.
05:38
Okay, so you could do that. Or you could just simply do now instead of a time. And when I'm when I'm in my administrative experience with Lennox, I'm consistently doing it is now. I don't really set a time.
05:48
If I set a time, I'll forget about it and be doing something and be in the middle of it. And then it shuts down. So I was When I do it and remember to shut down, I go and shut it down. Shut down now so that it goes down.
06:00
So let's say, if you're in the network situation, you want to send the command to any users that are actually logged into the machine.
06:05
If you're putting too interested staged into the console
06:10
of the machine, you can type shut down
06:14
bash Lower case K member. There's sensitivity case sensitivity with Lennox.
06:18
Some of the commands that we use was shut down are gonna have uppercase lower case, which is our arguments. This is the same with any linens command. Really? That has these switches.
06:28
So we're in attacks should shut down minus K.
06:30
And we're going to give it
06:33
the parameter of now. Okay? And what the minus K or the dash case, which tells us, gives us
06:41
it's only going to
06:43
push out a warning. A broadcast message to anybody that's logged into the machine is going to give them warning that Hey, the machine is gonna get ready to shut down, save your work and get off the machine. Now.
06:53
You know, otherwise you could lose data.
06:56
So this shutdown command, with this switch tied to it, this dash case, which is not actually going to show your machine back and still have to go in and use different command.
07:03
So let's go ahead and try us and see what happens.
07:06
Case, What does it tell us? We need to be route
07:10
with most commands that we're gonna be doing in this trouble shooting sys admin module.
07:15
We're gonna need to be rude. So if the sake of time, and to make things quicker, I'm gonna be the super user, and I'm just gonna go, go bash.
07:24
It's gonna ask me for the root. This is just my password,
07:29
and I'm at route now, so I'm not gonna have to use the suit command again. It's a great command and love it.
07:33
It has its place. For this point in time, I'm gonna just be at the root level, be the route user. So I could just get to these commands. Went up to constantly stopping my password.
07:44
Time's sakes. Let me go ahead and put it in again. I'm going to do I'm just gonna do my up arrow.
07:50
Yes, out there. So let me dio Shut down. Okay, now,
07:57
Okay. So what happened?
07:59
What is it that tells it? Okay, shut down to get the dash k. I'm just guessing the broadcast message from cyber admin That's the end user
08:07
at 20 to 40 sevens when I sent it. System's going down now for maintenance Now in all caps, Everybody that's logged into this machine that your consulate into is going to get this message pop open in terminal window.
08:18
That's a good thing and gives them in time. Give some time to do that, and you can actually go into the file system and actually find this, find this file and edit it to say, Really whatever you want, get off now are
08:31
you can put a banner message in there about what to do to log off Saviour those couple steps for user's that may need it.
08:39
The default is just The system is going down for maintenance. Now that's all users ever really need to know. You're gonna tell them it's going down because he found the virus or anything like that had to scare him. We're just going to say the system's going down for maintenance now. Once we do that,
08:52
you hit, you hit the Internet, gives us this message, and that's pretty much it. So you hit enter again. It drops you back down into your tea. Your prompt your screen prompts.
09:01
Okay, so now we're actually gonna shut down the the machine, you bunting machine.
09:07
Okay? And what I'm doing is I am not actually powering off
09:11
the the the actual machine. What I'm doing is empowering it. I'm halting system, empowering it. I'm showing the guest operating system down.
09:22
Okay,
09:22
No, in or let's do that, I'm gonna do
09:26
shut down
09:28
with switch of dash H halter power off after shutdown
09:33
and the time now.
09:37
Okay, What that's going to do is just going to kill my guest operating system,
09:43
okay? And that, actually, that's which actually will shut down
09:46
the will actually power off after you after the shutdown and Powers is halted, its power system off.
09:52
Okay, what doesn't do is reboot, right? So I'm gonna go ahead and start my own machine again. Quick power on special machine.
10:11
Yeah, it's powering up. Going long back in.
10:24
It takes a little bit too long back in bear with me.
10:28
Okay, so we're back in.
10:31
Open up my terminal. I'm gonna go full screen again.
10:35
I'm back up. All right. So that halted the opera guest operating system and also powered the box off. Okay,
10:43
Now what I want to do What if I want to do that? But I wanted to come back and re boot up after it's been shut down. Well, I can do that. There's another switch for that one. That's shut down,
10:52
Dash lower case are in a time parameter now.
10:56
Okay, against tell May need to be rude. So good to see cash. You can also do Su su
11:03
and Root.
11:05
I'm sorry. That's not the password. Could strike again. Password.
11:09
Okay, I'm route. That's another way to do it. Suits which user and assuming that you mean the route user, cause you didn't actually specify easy you won't switch to
11:16
and I'm going to do a shutdown.
11:18
You are Now
11:22
that's going and tells you. Gives you message systems going down to reboot right now
11:28
and again it's going to kick me out. It's going to shut the machine down and so automatically gonna boot it back up.
11:35
Okay? Time's going through its post on their in. It's pretty snappy. Pretty quick. I'm running an SST on this laptop, so it's extra fast
11:48
long back in
11:52
skins to take a couple extra seconds long back and slightly slow.
11:58
I'm locked back in and open up a terminal again and go full screen.
12:03
Okay?
12:03
Nothing you can do is
12:07
shut down
12:09
P.
12:11
Capitol Team. Now, what that does is just going to power it off completely. It's not even gonna halt the operating systems is less of a
12:18
graceful shutdown on Mork old boot.
12:22
We're just basically, like thinking power cord in the back, right? I'm just gonna say shut it down and shuts down
12:28
with shutdown dash lower case age.
12:31
With the time Kraemer honor, that's actually going to halt the guest operating system that is going to power it off. Efforts been shut down.
12:37
Okay,
12:39
so just good ones and the other one that you can do I'm not gonna enter the game's up.
12:45
I'm gonna You can type shut down like a lower case. I'm sorry. Not carrying minus dash dash health.
12:54
This is like the man page or help Paige, and it tells you all the different switches and what to write.
13:01
So here we talked about it. Reboot of just shut down these roles. We just went through,
13:05
um, time. This is here. Time may have different formats, but the most the most communists and with the word now, which will bring insisting down immediately.
13:13
Other other valid formats air the plus m, where the M is the number of minutes to wait until shutting down and hh colon mm specifies the two digits place to put in the hour and the minute on 24 hour clock.
13:28
So that would be for 8 p.m. F A B 20 100 hours. So 20 colon 00
13:33
Um, so the law gives you said here the logged in users are worn by a message into their terminal, which may include the optional message included. With this, messages can be sent without actually bringing this system. Damage is in chaos. Shall we discuss that?
13:46
Okay, so this is the hell pages, actually nice, because it gives you all the different switches you need. And if you don't, if you want to see if there's a HelpAge for any other command you use, you can type that. If it doesn't give you ah, response or output. That means there is no help, Paige. But there's always a bun to requires that there is a man page for every command
14:05
within,
14:07
within the command line interface on a bun too.
14:11
I don't think I don't know that. That's the same for red hat when X or the door sandals, but for a bunch of that's that's a nice plus. OK, so we're going to clear that else we have a new screen.
14:22
So now you know what the shutdown commands are on what they dio.
14:26
Okay, There's some other commands that weaken d'oh,
14:28
that will help us to understand what's going on with their system. Okay, so when we're troubleshooting, we can use the following commands to check what are configuration is and any added peripheral device that we have printers, etcetera. We're gonna take a look at these commands. It tells the 1st 1 is the list hardware.
14:45
So if I do in L s,
14:48
hold on a second
14:50
and
14:54
this is crazy again. So let me back up.
15:00
There we go.
15:01
I'm gonna go to tell us H w If I just get that
15:07
she runs. Problem is a super user, Okay? Spooning me back out. So I'm gonna go ahead and do that again,
15:15
Control. See that I'm gonna do Seo. That's worth
15:20
and l s h w. Now if I just type l s H W is gonna give me a hardware list.
15:26
And what I found is that when you run this list, it's gonna pull down. Is pulling down a bunch of data so it takes a little bit longer than you normally
15:35
normally would. See. Our response, cop. Okay,
15:39
so here is listed all of our
15:43
hardware devices, and you can see that what it did is it hasn't gone back far enough.
15:48
I'm not able to scroll back The scroll back doesn't take Mel way back to the original commands. Almost. Surely something you can do that will help. That's let's stay clear.
15:56
Well, you can do is use the last command less.
16:00
And you're going to pipe that less command into
16:04
w.
16:07
Okay.
16:12
No, let's try this little mom.
16:18
I'm sorry. It's not gonna work.
16:19
Um,
16:21
okay, hold on. Let's try
16:23
something different here.
16:26
W
16:32
go ahead and listed again. Look through it.
16:40
It's coming up here soon. Scuzzy.
16:42
So it's your PC, I and this scuzzy all the different hardware interface is air here for you. Look at
16:48
Okay. You can scroll back through it. There's all your PC. I feel like this one actually did go all the way back to the beginning,
17:00
Okay. Tells you all the P c I shows your if you look at PC, I won the slots a PC. I bridge
17:07
the vendors. Veum. Where? Obviously this is a V m r workstation. Virtual machine shows your USB controllers cheddar. So if you want to get a little bit boring granular with each and every one of those,
17:18
you can look up specifically you can list the USB.
17:23
Okay, let's do it Clear on that so you could see it better. So if I do l s U S B
17:29
Think that command is going to list all of my universal serial bus for my USB controllers? OK,
17:37
Tells me the bus. The device i d number
17:40
what belongs to bust your charmed ones. The Legs foundation. Given there's another one for a rooftop than the other two are the actual humor
17:48
virtual us bees, which we're gonna point back to the physical USB controllers for the mouse keeper end. Any other peripherals use USB.
17:57
Uh, what if we do in Was to clear. I'm gonna keep clear in south Sudan. See it clean you
18:03
Well l s C P U.
18:07
Okay, that's gonna list all my CPU information
18:11
and you can see here that the architecture is x 86 64 64 bit. Right.
18:17
Um,
18:18
the bite order here is listed his little Indian. Okay, si, pues or one
18:22
threat records one. This is a single CP single BC to you. Okay,
18:27
um, and the vendors Intel rights and running it until I seven core processor
18:33
until the middle of a mega hurts the bogo managed Harper by hyper visor vendors being where recognizes that I'm running a hyper visor for this being.
18:42
So that's good. This is good troubleshooting in phone. And now, Okay. So if you have to get support and the support person on the other end, if it's above and beyond your pay grade or you don't understand that you call support and they don't want to know some of this information, this is a good spot, that you go look for it. It's really good. It's a good command. You're all good community used to do some troubleshooting and figure out what
19:00
the data that you need to gather in order to put together a plan to make it a problem.
19:07
So let's look at another another L s command. So L s P c. I gives me all of my PC I devices. We looked at that spacing PC card and fell.
19:17
Okay, if I do, it's clear this one out. This is a really good one. L s underscore.
19:23
I'm sorry. Let's be underscore. At least dash A But that does Is that actually shows me the
19:32
my version Code name and released for the installation of 1/2. Currently, this is great. This is absolutely, absolutely important, too.
19:40
Getting support on the phone and have them figure out what's really the issue. If you find her being on the Internet and one of the communities and figure out to make it asked, what's your know what? Release air. Using et cetera.
19:49
Here it all is. The code name is trustee For this release, it's released $14 before using a bun to 14 04 dot long
19:56
lt s which is Ah, long term support. Okay, distributor ideas. Bun too.
20:02
Great One to use to figure out what's going on. What? What kind of release you have.
20:07
Okay,
20:07
So another, another good one would be small salt business on my mind. My modules are my my box. Good stuff. No,
20:17
Um, again, I can do a net start. We've done nest and walked to that. Another good tool. You can use this test disc
20:23
testes. What it does is actually recovery recovery tool.
20:27
This is one that you actually have to go. This doesn't come in a built in automatically. This isn't automatically installed into your your destro.
20:37
You've actually got to go out and do a nap. Get to grab the testes package and install that. So it's a quick install, and you can see there's arrows here shows what do you can create a new log file?
20:48
As you know, it's recovery Software is designed to help you recover lost partitions and or make nonvoting discs bootable again when the systems air caught caused by faulty software.
20:59
We're certain types of viruses or human error, so it's It's a really good tool to use milk on the way to get out of this feedback trick. Man lies Q Q.
21:06
I just hit Q Q twice and took me out,
21:07
so that's that's a great tool to use. That's test disc,
21:12
Um, and then P s is a good one. It shows you're running processes. Okay,
21:17
These are some running process that I'm crazy. Suzu Bash P s k.
21:22
You know the really good ones to use. So there's it's those are some really good, quick
21:26
troubleshooting tools they can use.
21:27
So what about performance? How do we troubleshoot performance?
21:32
This is a great question.
21:33
I assume that if you were there in a classroom, we were together. This question might may arise. So it's let's cover it.
21:41
So a performance stroke troubleshooting for me always starts with the VM stack command. Okay.
21:48
And what that does gives you information about
21:52
virtual memory. Okay, It's short from virtual memory
21:56
and some other things such as links, processes, CPU activity and block Iook. And again with the M stat. Much like other ones, they're switches their arguments that you can place to get different outputs.
22:07
So let's look at the V M stat command and start with the M stat Dash a again. I'm gonna clear this out
22:17
for second.
22:27
Okay? So BM stat Dash a is showing me my mice, my swamp,
22:33
my free space, my inactive and active memory. Okay, And then it shows me a bunch of other calm So it looks like there's 123456 and 11 columns and those air sub columns to swap io system and CPU and memory.
22:49
So there's a lot of information there. Okay, we'll go through, we'll figure out what? What those don't mean. Okay, so
22:56
if you're looking at Proksa proxy field actually has two columns, and that's gonna be right over here. Okay,
23:03
Concede approx right here. Okay. And what the proxy cone does is it tells you two things than calm. The are calm,
23:10
which is the number of processes that are waiting for run time
23:12
and the be calm number processes in enoughto and uninterrupted bullets, big word, uninterruptible sleep or blocked processes. The memory field has four columns. The swamp, that s W P. D.
23:26
The amount of used to swap space or virtual memory that's used. Okay, this is the amount that's actually being used on their system. Currently,
23:33
remember our swamp or swap partition was basically an overflow for the memory that's being used.
23:38
The free that's pretty much self explanatory is the amount of free space or idle memory.
23:45
Enact is the amount of an active memory and active. It's obviously amount of active memory.
23:49
Okay, so when you break it down, these are all good and very helpful. So the swamp field actually has
23:56
two columns. If you look to the right of memory, appear at the top.
24:00
Okay, Swap field actually has two sub comes under that.
24:06
So it's the in her. I am.
24:08
Well, I'm sorry. That's system Theo s I is the amount of memory swapped in from disk and esos Amendment. We swapped out to this. So we were talking about swap partition. You're swapping memory in and out constantly,
24:22
depending on the amount of memory that you're overflowing on your
24:25
dedicated physical ram.
24:26
So this is this is good to know, kind of see how it's if you can look, it's just three and 19
24:32
okay? And that's not that's not a whole lot. So it's not. I'm not concerned about it now, But if that number were high insisted it would mean the system's getting pushed very hard
24:41
and you don't want to take a look at that. Maybe reconfigure your swap partition, maybe make it a little bit bigger.
24:45
Um, you know, Google around. See what you can find out what to do with your swap partition, but that would be an indicator.
24:52
The I O field is two columns
24:55
The B i N G o B I blocks received from a block of ice blocks in and blocks out blocks sent to a block device. Okay. For storage
25:03
under your system column there, too. They're two different columns. I n C s I n is the number of interrupts per second, including the clock system interrupts and CS is the number of context switches per second or process context legends
25:15
and then CPU has has only has four columns U S s y,
25:22
um, idea. Uh, I d N w a so
25:26
us his time spent running on Colonel cocaine. And this this stuff is getting a little above and beyond what you need to be concerned about for systems administration troubleshooting.
25:34
But nonetheless, it's good to know you may be tested on it.
25:37
That's why his time spent running girl code ideas Idle time and Delia is Time's been waiting for.
25:44
Okay,
25:45
so the VM stat command is ah, very helpful. And where I find that it's most helpful is when you're trying to figure out this crew trying to troubleshoot disc related issues.
25:56
So let's try another command was trying other being stackers left, IBM stat
26:02
dash.
26:03
Hey.
26:07
Okay,
26:10
so for two Dashti is gonna give us the dash T switch or argument is going to report our disk statistics.
26:18
So let's walk through the meaning of these calls. Okay? So total is total reads could be completed, successfully
26:23
merger the group resulting in one io sectors are sectors that red successfully in masses millisecond spend reading.
26:30
Um, fairly self explanatory, right?
26:34
What else is that? Writes Total Total rights completed successfully and then emerged column again is the all the group rights just showing is one. I am
26:44
sectors again. Sectors run successfully in milliseconds. Been around those milliseconds spent writing The IO column is the current, you know. See, you are as the current is the Ioan progress of current Io and s his second spin fry up
26:57
and you can see here that is, instead of being asked, it's actually sec for ***. The second spin fry. Oh,
27:06
so good stuff here. You can see all this different memory and the disc issues that were going on and this could be you know, this could be a good place to start if you're having discus user, if you're finding their failures,
27:17
you go here and jump on this and you might see if your eye oh, super high maybe you have network congestion is causing your eye all rights to be huge.
27:25
Good place to go in check. So it's a good troubleshooting tooling again. That's the VM stat tool. Okay,
27:33
so with any type of trouble shooting and this is again, it's just gonna be another one of our longer recording. So if you need to take a break on this would be a good break point before we get into auditing. So go ahead and positive stretch to whatever you need to do. We'll pick back up whenever you decide to pick back up. That's the beauty of having on demand courses like this. So
27:52
by all means, take a break. If you need Thio, I'm gonna keep recording.
27:56
You can start and stop whenever you want.
27:59
So
28:00
along with troubleshooting you one major component of trouble, Shane, it's extremely helpful. Is auditing right? And when we talk about putting
28:10
were mainly talking about log files. Okay,
28:14
so we're gonna talk about long files in this section, and we're gonna talk about other gold command line tools that will help us to understand what's going on
28:22
on a trail stuff to understand what's been happening and things that we can actually watch take place in real time
28:30
so we can start off first, you know, by basically using their telling that command So you could tell that
28:37
local news
28:40
three.
28:41
Okay,
28:42
So what's clears up? You'd better look.
28:45
So tell that local host 53. So what it's doing is just trying to This is my lube back address 1 27 Ow ow 270.0 dot one. What it's doing is trying to, you know, see if I can connect to my box, be if toward 53. It's a TCP ports.
29:04
And if you know your ports and protocols, you know that TCP Ports 53 is D N s,
29:10
which is why we're getting a failure here because we don't have d. N s configure for this host.
29:15
So if you try to do that, you want to check to see if you can connect check to check your important protocol,
29:21
um, to see if you get a response,
29:22
it will give you some informative information, like unable to connect remote host connection to refuse. Well, it's being refused, cause
29:30
Dennis is not set up currently. So poor 53 is not supposed to tell. It's a great tool to create auditing tools to your kind of port you have open. So let's try another. Tell that those
29:41
0.2.
29:45
It was 22 s s age. We're seeing a lot of the same thing. Okay,
29:48
so s h is on. Has this age tell? That's agree, Tool they can use to check. You know which ports are open ports and protocols?
29:56
No,
29:57
the P i. D. Command of the actual process idea. You can see you know what processes air running, you know, and what service is have what process? Ideas. They're tied to service names. So you can figure out if you have any noisy service is something they're taking up a lot of space or others.
30:15
I'm one of your machines. One of your end users machines is being super slow. You want to check out your process ideas.
30:22
So if I do a
30:26
no see here
30:27
can't. You are?
30:37
I'm sorry for laughing her again.
30:45
I think You know that doesn't even exist yet again. We're dealing with the real vanilla installation. Bon Tigger.
30:51
But the command pit off.
30:55
Okay,
30:56
second here, I'll pull it up.
31:04
Okay. This command, I'm gonna put it out. I'm gonna type it out here so you can see it. Service name.
31:15
Okay. If I do this, I hit. Enter and show me the service idea. The process I d name for that service
31:22
S O. You punch in any service. I encourage you to go ahead and try and punch a servant to see what it returns.
31:29
Gives you a little bit of a chance to do some little hands on yourself and poke around and figure it out. But it's good to know the process idea, because then you can once you find the process. I tease you going on. You didn't kill any of those processes that might be running that are taking a lot of space.
31:42
Okay, so let's jump into some of the logging.
31:47
All right? So our logs, a good place to start with logs would be the slash bar slash log directory. So let's go there. Let's change directory to your CD to our luck,
32:00
and we're gonna list It shows a list of all the logs that I currently have on my system.
32:07
Okay,
32:07
Eso
32:08
What we're gonna focus on here is the actual sis log.
32:14
It's just long as a huge law. In fact, I'm gonna demonstrate how big it is. We're gonna
32:17
I'm just gonna type cat.
32:21
This is long.
32:23
You can see that This will run and run and run and run and run. You just You can't read all that in time. And when I actually go back, if I go to try and
32:32
scroll back I came get all the way back is my
32:36
My buffer doesn't go back that far. Okay, my command buffer.
32:40
So there are things that I can do to read that. And what I want to do is do less.
32:46
And like that
32:51
panel on do
32:52
Yeah,
32:54
long.
32:57
She's long
33:01
plus
33:04
more
33:06
war.
33:07
Okay,
33:08
now that that's done, is it will go. Basically it page by page is going to a pages. I'm one full screen at a time. So if I hit the space bar,
33:17
it gives me the next page. Now
33:20
space bar again. Because me another page you can see that if you look at the time here 8 2131 look at all the things. There's something happening pretty much every second.
33:30
Okay, so it's going, It's going. It's going to go back to the first time that logged in. Okay, it's going to killing. Going home.
33:37
There's just a ton in this this log file that you can go find to see if there's anything going on.
33:43
I'm still still pushing the space bar and still haven't got to the bottom of this log. Still pushing into seeing go one page of the climb.
33:52
Okay. Or I could go. If I hit the enter key, I can go one
33:57
line at a time
33:58
that might take longer.
34:00
So I could look a page of time by doing the space bar or a lion space bar or a line at a time by doing the enter key.
34:07
And I'm still going Still going, still going? I'm just gonna hold space bar down till I get to the bottom. Since we can see that super long,
34:16
So not really a super effective way to scroll through the log a different way that you can do and see that I'm at the end right now, So I'm gonna take you. It takes me back to my
34:25
prompt. What I can do
34:30
is I can actually use the grab command
34:31
to find what I what I'm looking for specifically within a log file. Okay,
34:38
so I'm gonna type
34:44
second here,
34:46
running to monitor services,
34:51
throwing me off. All right, so I'm going to do grip
34:54
front,
34:58
admin
35:00
or or
35:15
Well, *** games, man,
35:22
they're with me for a second here,
35:34
okay? They're with me for a second.
35:38
Okay,
35:39
So what we're gonna do here is and blow this back up
35:45
and I'm actually gonna tight Grete
35:47
proper
35:51
prepper and
35:52
way to type this command out is grab. And then if you're looking for just a specific item within a cyst log,
36:00
for instance, if your users saying that I'm he's getting an error here, she's getting an error message. What you can do is you can just type *** and then error and then the name of the log file name of the law that you want to search their cigarette error.
36:14
Mrs. Logue,
36:15
when best done is actually showed me
36:19
all of their messages. Well again, maybe there's a ton of their messages. How can you get
36:22
to go where you can actually scroll back to all of them? Don't believe. Let's try it, But I don't believe I can.
36:30
Well, uh,
36:35
I can, for this one's fairly sure,
36:37
but let's pick a longer one. So let's try
36:39
ready
36:40
and adman
36:45
dances log.
36:46
Okay, so I want super long.
36:50
Okay,
36:51
So what I want to do is I can actually time clear this out.
36:57
I'm out of sight, Grete.
37:00
I'm actually gonna do less.
37:02
I'm a pipe that less command into the great command
37:07
error or C admin
37:09
And Mrs Logue
37:13
again. What that will do is allow me to and against is a short one as well.
37:16
But if there was something that you knew had a ton and time time, let's say, Colonel, for instance, the strict currency that works less
37:24
plate ready,
37:28
frontal, and just log.
37:35
That gives me a ton. Right? So that would allow me to go ahead and holding the of the key, the bar down.
37:40
But that gives me an option. Opportunity Just used the last night so I could go ahead, just pipe through it with the less command, and it gives me an opportunity to not have to go scrolling through the whole thing. I could just find what I'm looking for, that I could go page by page to find it
37:57
so great tool good to use.
37:59
And there are a lot of lot of other great tools, but what you want, what you want to focus on
38:05
are the, uh,
38:07
ones that will help you the most. I love the M stat
38:10
gives us a lot of information.
38:13
Those commands for troubleshooting. I love the P I D command. I will tell that.
38:17
Good for finding that out, one that I really loved that is super helpful is the top hand
38:24
I hit top. This is what you're looking at is basically equivalent of the task manager. Windows were all the processes,
38:32
and so it's good it's gotta doing, you know, it's got it's got a bunch of different columns, but the column the the comet you want to focus on the most is either the CPU percentage or memory percentage. These will tell you what the hogs are in your system,
38:47
so this ex organs taking up a lot of it's built in
38:51
with the Nome Terminal were unknown. We're using a lot of doing a lot of processes. That's taking up a lot of CPU and memory.
38:58
Technically, not taking up a whole lot. But, you know, 2.3%
39:01
55.2% shows you all the old one. So that's best. This is from a command line
39:08
command line function. So there are there is another another one you can use
39:15
and let me get to it
39:19
along here.
39:21
It's one that you actually have to download.
39:30
Where is it? Not finding it. Now along second. Here,
39:40
you put this
39:47
not marine command. Eso is Oh, okay. Installed. This It is a top. It's installed my other VM box. So we need to go out, actually. Grab because I want you to see what the graphical graphical interface look like. Slightly cleaner. Easier to see if you
40:02
you have computerized like me. So let's take a look at it. Going to go on grab for someone to do an af get
40:08
install. You talk.
40:13
It's nice thing again about APC. It'sjust goes up, grabs package downloads at peace cake, and you're done in the matter. I don't know that took like four seconds. Maybe
40:22
it's not just gonna run a top,
40:23
and there it is.
40:25
So it's a little gives you a little bit more to look at slightly more like a graphical interface.
40:30
Okay,
40:36
it's not actually an install. Little gooey that you can pull up a CZ you can see here doesn't show up, but it is in the command line, and you can see all the different processes.
40:46
Memory swap CPU and networking. Networking stuff shows you a teeth. Zero What it's doing. How many packages
40:54
dropped on me is processed, etcetera. It's just really good. Great tool. You can use any Q Q to get out of it.
41:01
So that's another good one to look through that you're gonna find a lot of information in
41:07
that will be helpful to get you through some troubleshooting.
41:12
So there's some of the major troubleshooting commands and the ones that we didn't really touch him with. A networking ones, which we talked about earlier in the module about the introduction to networking,
41:21
and we talked about those were you know,
41:23
if config the interface configuration command, which basically give you your i p address.
41:30
We talked about Ping and Nets stat talked about all those commands. Those are all good troubleshooting commands as well. Because really, to understand what's going with your network, you gotta be using those. So if you're having a problem with somebody can't get to the network. You want to look
41:42
at the lowest level running if config and see if the big bash A and you can see what their net mask is their gateway that have any default routes.
41:50
Those are all good good tools that you can use to troubleshoot. So
41:53
this was a really long module. I'm sorry, really long part of this module, but
41:58
as a systems administrator to be doing lots of trouble shooting, and it's to be a helpful start free. So come back and revisit its module. Use some of the commands. He's troubleshooting tools from the command line and try it on your own. Try Thio troubleshooter to try and create some errors. There's a lot of websites out there where you can run break scripts.
42:15
It will actually break things in your system, and you can go out and fix it. You know there are companies actually use that to break code
42:22
so that the users can go out of the developers can figure out if they're codes actually redundant, and it works and it doesn't shut. Bring everything down. Someone thing's broken,
42:31
but they're a bunch of scripts out there that you can break in and try and troubleshooting fix it where it will be fixed. So good luck with that hope. This troubleshooting part has helped you out a lot and taking notes because you will use these troubleshooting tools a lot in your day. They, uh, David A life is a systems administrator, so it's good to kind of memorize what they are
42:50
searching the Internet for him. Find some other books with a lot of the lyrics troubleshooting books out there that will be helpful, but they should give you a good start, so I hope you enjoyed it.

Up Next

Fundamental Linux Administration

An open-source operating system modelled on UNIX, first released by Linus Torvalds in 1991. Why do I need this Certification? With the increasing popularity of cloud based systems and data centers, organizations need system administrators

Instructed By

Instructor Profile Image
Greg Stuart
Instructor