[Intro Music]
We have just successfully installed
'htop' utility; and now let's run
it. 'htop', and now you see that this
utility shows processes in more
nice looking way, and you could
perform different actions with
every single process. For example,
you could select process by using
up and down arrows like so. For
example, let's select 'htop' process,
and let's kill it. For that you
could use F9 key. Let's press
it, F9. And now you could select
in this left section, which
signal will be sent to the process you
want to kill. And you could send
different signals. And by default,
when you want to stop specific
process, you usually send SIGTERM
signal. Let's select this signal, and
press Enter, Send, and 'htop'
process was terminated. And if I
have a look at the running
processes now, I will not see
htop process here in this list.
Alright, let's start htop once
again. Actually, let me make it a
bit larger like this. And let me
also show you how you could perform
different setups for this output.
For that you could press F2 key. F2,
like this, and you could select
which meters you want to see in
different sections. For example,
here in the left column, by
default, you see CPU usage, Memory
usage and Swap usage. If you want,
you could move for example, this
Memory up like so. And you'll see
that Memory was moved and now
it is placed before CPU like this.
Let's press Enter in order to
finalize moving action. And now let
me show you how you could add
additional 'Available meters' to this
left or right columns. And let's
for example, select the Hostname,
and add it to this right column, and
you'll see that Hostname of this
computer was appeared here in this
right column. All right. Also, you
could perform different other
actions like change colors. For
example, let's adjust theme, and
let's choose this one, Light Terminal
now. No, it looks bad. Let's choose
this one, and let's go back to
Default. And also you could change
Display options, add some
additional parameters and so on.
That's how you could modify view of
htop utility. Great. Also in
this output, I wanted to show you
this column, Command. And this column
shows specific corresponding
command that was used for start of
corresponding process. I have told
you that when you enter any
command, Linux simply starts
process. That's it. And in this
case, you see that this root
process was started using '/bin/bash'
command; and this 'bash' process was
started simply by a 'bash' command.
And the difference here appears
because by default, when you start
a new Ubuntu container, there is a
default command that is executed
when container is created; and this
command is '/bin/bash'. And actually,
you could start every process using
either full path to corresponding
executable file, or you could use
shortcut if Linux knows about
location of corresponding
executable file. And we could use
'bash' command because there is
PATH variable that holds different
paths to 'bin' folders that hold
different utilities, and 'bash' is
located in one such folders.
That's why you could use either a
full path to corresponding utility
or short version like 'bash' or 'htop'.
Let me show you that quickly.
Let me exit from htop. For that,
press F10, and here let me do
following, let me clear terminal
first, make it a bit larger, and
let's find path to htop utility,
'which htop', here is its path. And
I could use this path in order to
start htop process. Let me copy it,
paste here, and press Enter. And I
see again htop process that is currently
running. But now in this table, I see
that the htop process was started
using '/usr/bin/htop' command.
Alright, that's how you could use
htop utility in order to monitor
running processes. And please
notice that this nice looking
application is actually running
inside of the terminal. It is a
terminal application. Alright,
that's all for this lecture. And
next let me show you a list of
processes on other computer where I
have a separate Ubuntu Installation,
not container. I'll see you next
guys. Bye-Bye.
[no audio]