Linux - System logging
4K views
Nov 28, 2024
Linux - System logging
View Video Transcript
0:00
now in this video we are going to talk
0:02
about new system logs now what are logs
0:04
logs are nothing but it creates a report
0:07
of whatever the process are happening
0:09
into a Linux operating system into our
0:11
previous video we have checked for the
0:13
performance of different devices but
0:15
what if I'm not continuing checking the
0:18
particular devices or if there is an
0:20
error occurring into the back end how we
0:22
are going to come to know those
0:23
particular areas so for that logs are
0:26
very important to be created into the
0:28
Linux operating system but luckily your
0:30
system your Linux operating system
0:32
creates the logs itself by default so we
0:35
do not have to create it by default your
0:37
system create the logs which are a
0:39
flexible and empowered for logs we
0:41
create by using these units or system
0:44
tools now into this Linux operating
0:46
system it create the logs in their file
0:49
called as a syslog so this log is called
0:51
as your system log files which are by
0:54
default located centralized in a lock in
0:56
profiles called as slack VTC slash log D
0:59
or you can also get in control system
1:02
log itself so this is about the logs now
1:06
if I want to check what the locks we
1:08
have created and what are the actions we
1:09
can perform or file after the slow now
1:12
for example the logs already created and
1:14
I am NOT going to check the logs what
1:15
will happen I won't come to know what is
1:17
the error happening in to the backend
1:19
now for that we can also set an actions
1:21
for the slocks so we can set the
1:23
auctions that whatever the files we have
1:25
what are they whatever the log files we
1:27
have it should be printed so we can give
1:30
what log lpr dot log so it will be
1:33
printed into this particular file as
1:35
well as we can also directly move into
1:37
the particular console now if I want to
1:40
log to be checked or directly on the
1:41
console I can quietly put it on the
1:43
console or any of the terminals same way
1:46
we can also assign an action so that
1:49
whenever log are created after a day
1:52
after end of the day the log file should
1:54
be sent to a particular user or a root
1:56
we can any ins assign any users where
1:59
this particular log message should be
2:00
sent then we can also pipe a message to
2:04
a particular program now if suppose I
2:06
want to get this logs into a particular
2:08
file which is turned into a particular
2:10
folder so it should create a day wise
2:13
logs into that directory itself I can
2:15
also create into that or I can put it
2:17
with the certain program it will just
2:20
for the failure logs it will filter the
2:22
failure logs and will provide me the
2:24
error messages itself then also we can
2:27
send this particular messages on the
2:29
other host as well so not only in your
2:31
actual system or the system which you
2:33
have logged on we can also put this logs
2:35
into the other system now for an example
2:37
I'm a system administrator sitting at my
2:40
80 or the server I should get this
2:42
particular logs very clear on my console
2:45
whenever I have logged in so those
2:47
particular message can also be sent on
2:49
the other host so let us see how we can
2:51
check for this logs how we can get this
2:53
logs or how we can redirect it to the
2:55
particular user or a particular host
2:57
into our terminal so we can check for
3:00
the system logs into cache EGC slow
3:05
which we generally have
3:11
okay so we should be a route that
3:23
so we have multiple files here right now
3:26
we do not have any system blocks created
3:29
into it but yes we can also check for
3:31
the logs into the CDs slash four slash
3:35
logs so you can see if we have a log
3:39
directory here and we can also check the
3:41
logs over here so they are different
3:43
commands I have used for different
3:45
services I do have the logs so what are
3:48
the services generally I use mostly
3:50
generally the logs are created over here
3:53
and c-cup service GTM I know what it
3:56
looks good logs so I can also check the
3:58
boot locks what they would locks
3:59
containing like if it's fine or
4:01
it has similar so I can check it over
4:03
here so whenever your system gets
4:05
started
4:06
it creates and manages both locks same
4:09
way we have multiple locks which we are
4:11
generally used so once you go and create
4:14
the services once you go and manage your
4:16
services you will be able to see the
4:18
slots so it can check there is okay in
4:20
the error B I have received while using
4:23
my yum so it has created yum dot log a
4:26
separate services so it is nothing into
4:29
it right now because I think it's
4:32
completely flushed out when I restart my
4:35
machine so also we have different clocks
4:37
like we have used the Samba process we
4:41
have used GGG in process but it so all
4:44
the logs we can check by opening one or
4:46
one of one locks and if you have any
4:48
particular service it will create a
4:49
separate log for it
4:50
or if you do not remember this
4:52
particular you know and the path that is
4:54
war slash at the log if you do not
4:57
remember it you can also use the command
4:59
called as ta message so I can use the
5:02
mesg so it will again show you the
5:04
complete log still no which we have here
5:07
so you can check for the process the
5:10
complete log by using more it will show
5:13
you thee logs for yours complete system
5:16
logs
5:17
so this is how we generally check for
5:20
the logs which by default get created
5:22
into your systems so if you want to
5:24
create your manual logs as well so you
5:27
can also create your manual logs by
5:28
using some cropping tools the trapping
5:31
tools are like we have the Wireshark
5:34
which is the fruit free tool we
5:35
generally we have available into the
5:37
Linux operating systems so we can use
5:39
those those to you don't spoof here or
5:42
you can say crap your complete
5:44
activities which is going on into the
5:46
over the Internet same way you can also
5:48
trap the processes over here by using
5:51
the dump or a creation entity Wireshark
5:55
itself so for wire shock you need to
5:57
download those tool and you can work on
5:59
it so right now to set the system lock
6:01
switch your system creates by your own
6:03
so if you want to manually create your
6:05
locks you can do it but it will be the
6:07
same as generally the locks you
6:08
generally find into thee who are locks
6:13
so you will find systematic locks
6:16
created only by the system itself and
6:18
you can also set up messages for this
6:21
lock snake if anybody clear logs get
6:24
feel or if any particular services field
6:26
so you can also send a message over the
6:28
slogs to your email addresses so by
6:31
default your route gets this locks in
6:33
emails even you can't direct it into
6:34
their emails as well so this is what
6:37
exactly the logs we have seen like how
6:39
we can check the logs into the Linux
6:40
operating systems into next we are going
6:42
to check for the you know the process
6:45
management part that is signals and
6:47
traps so how we can create the traps if
6:49
how we don't really get trapped into the
6:51
machine and how we can get do release to
6:54
it so that's we are going to discuss so
6:56
keep watching the next video
#Monitoring Software
#Network Monitoring & Management
#Programming
#Software