1 00:00:00,000 --> 00:00:04,300 [Intro Music] 2 00:00:04,319 --> 00:00:06,029 We have just successfully installed 3 00:00:06,029 --> 00:00:08,189 'htop' utility; and now let's run 4 00:00:08,189 --> 00:00:11,339 it. 'htop', and now you see that this 5 00:00:11,369 --> 00:00:13,589 utility shows processes in more 6 00:00:13,619 --> 00:00:15,749 nice looking way, and you could 7 00:00:15,749 --> 00:00:17,399 perform different actions with 8 00:00:17,459 --> 00:00:19,919 every single process. For example, 9 00:00:19,949 --> 00:00:21,719 you could select process by using 10 00:00:21,989 --> 00:00:24,269 up and down arrows like so. For 11 00:00:24,269 --> 00:00:26,369 example, let's select 'htop' process, 12 00:00:26,549 --> 00:00:28,529 and let's kill it. For that you 13 00:00:28,529 --> 00:00:31,229 could use F9 key. Let's press 14 00:00:31,229 --> 00:00:34,199 it, F9. And now you could select 15 00:00:34,199 --> 00:00:36,329 in this left section, which 16 00:00:36,359 --> 00:00:38,999 signal will be sent to the process you 17 00:00:38,999 --> 00:00:41,129 want to kill. And you could send 18 00:00:41,159 --> 00:00:43,349 different signals. And by default, 19 00:00:43,349 --> 00:00:44,879 when you want to stop specific 20 00:00:44,879 --> 00:00:47,639 process, you usually send SIGTERM 21 00:00:47,639 --> 00:00:49,979 signal. Let's select this signal, and 22 00:00:49,979 --> 00:00:52,559 press Enter, Send, and 'htop' 23 00:00:52,559 --> 00:00:55,469 process was terminated. And if I 24 00:00:55,499 --> 00:00:56,519 have a look at the running 25 00:00:56,519 --> 00:00:58,400 processes now, I will not see 26 00:00:58,400 --> 00:01:00,200 htop process here in this list. 27 00:01:00,869 --> 00:01:03,209 Alright, let's start htop once 28 00:01:03,209 --> 00:01:06,209 again. Actually, let me make it a 29 00:01:06,209 --> 00:01:08,579 bit larger like this. And let me 30 00:01:08,609 --> 00:01:10,229 also show you how you could perform 31 00:01:10,259 --> 00:01:13,379 different setups for this output. 32 00:01:13,589 --> 00:01:16,319 For that you could press F2 key. F2, 33 00:01:16,319 --> 00:01:18,779 like this, and you could select 34 00:01:18,809 --> 00:01:21,839 which meters you want to see in 35 00:01:21,869 --> 00:01:23,969 different sections. For example, 36 00:01:23,999 --> 00:01:25,589 here in the left column, by 37 00:01:25,589 --> 00:01:28,049 default, you see CPU usage, Memory 38 00:01:28,049 --> 00:01:30,779 usage and Swap usage. If you want, 39 00:01:30,809 --> 00:01:32,999 you could move for example, this 40 00:01:33,029 --> 00:01:36,209 Memory up like so. And you'll see 41 00:01:36,209 --> 00:01:38,039 that Memory was moved and now 42 00:01:38,039 --> 00:01:40,529 it is placed before CPU like this. 43 00:01:40,829 --> 00:01:42,059 Let's press Enter in order to 44 00:01:42,059 --> 00:01:44,729 finalize moving action. And now let 45 00:01:44,729 --> 00:01:46,079 me show you how you could add 46 00:01:46,109 --> 00:01:48,269 additional 'Available meters' to this 47 00:01:48,299 --> 00:01:50,579 left or right columns. And let's 48 00:01:50,579 --> 00:01:52,979 for example, select the Hostname, 49 00:01:53,159 --> 00:01:55,619 and add it to this right column, and 50 00:01:55,619 --> 00:01:57,419 you'll see that Hostname of this 51 00:01:57,419 --> 00:01:59,069 computer was appeared here in this 52 00:01:59,069 --> 00:02:01,619 right column. All right. Also, you 53 00:02:01,619 --> 00:02:03,719 could perform different other 54 00:02:03,719 --> 00:02:06,689 actions like change colors. For 55 00:02:06,689 --> 00:02:08,939 example, let's adjust theme, and 56 00:02:08,969 --> 00:02:10,679 let's choose this one, Light Terminal 57 00:02:10,679 --> 00:02:13,408 now. No, it looks bad. Let's choose 58 00:02:13,408 --> 00:02:15,809 this one, and let's go back to 59 00:02:15,809 --> 00:02:18,239 Default. And also you could change 60 00:02:18,239 --> 00:02:20,099 Display options, add some 61 00:02:20,099 --> 00:02:22,049 additional parameters and so on. 62 00:02:22,379 --> 00:02:25,409 That's how you could modify view of 63 00:02:25,439 --> 00:02:28,919 htop utility. Great. Also in 64 00:02:28,919 --> 00:02:30,689 this output, I wanted to show you 65 00:02:30,719 --> 00:02:33,659 this column, Command. And this column 66 00:02:33,689 --> 00:02:35,549 shows specific corresponding 67 00:02:35,549 --> 00:02:38,309 command that was used for start of 68 00:02:38,309 --> 00:02:40,529 corresponding process. I have told 69 00:02:40,529 --> 00:02:41,909 you that when you enter any 70 00:02:41,909 --> 00:02:44,399 command, Linux simply starts 71 00:02:44,429 --> 00:02:47,039 process. That's it. And in this 72 00:02:47,039 --> 00:02:48,809 case, you see that this root 73 00:02:48,809 --> 00:02:51,509 process was started using '/bin/bash' 74 00:02:51,509 --> 00:02:54,539 command; and this 'bash' process was 75 00:02:54,539 --> 00:02:56,549 started simply by a 'bash' command. 76 00:02:57,389 --> 00:02:59,549 And the difference here appears 77 00:02:59,579 --> 00:03:01,439 because by default, when you start 78 00:03:01,439 --> 00:03:03,689 a new Ubuntu container, there is a 79 00:03:03,719 --> 00:03:05,759 default command that is executed 80 00:03:05,759 --> 00:03:07,859 when container is created; and this 81 00:03:07,859 --> 00:03:10,829 command is '/bin/bash'. And actually, 82 00:03:10,829 --> 00:03:13,169 you could start every process using 83 00:03:13,229 --> 00:03:15,359 either full path to corresponding 84 00:03:15,389 --> 00:03:17,459 executable file, or you could use 85 00:03:17,489 --> 00:03:20,069 shortcut if Linux knows about 86 00:03:20,099 --> 00:03:21,659 location of corresponding 87 00:03:21,689 --> 00:03:24,269 executable file. And we could use 88 00:03:24,299 --> 00:03:26,099 'bash' command because there is 89 00:03:26,129 --> 00:03:28,289 PATH variable that holds different 90 00:03:28,289 --> 00:03:30,779 paths to 'bin' folders that hold 91 00:03:30,839 --> 00:03:33,959 different utilities, and 'bash' is 92 00:03:33,959 --> 00:03:36,089 located in one such folders. 93 00:03:36,209 --> 00:03:37,829 That's why you could use either a 94 00:03:37,829 --> 00:03:39,899 full path to corresponding utility 95 00:03:39,959 --> 00:03:42,709 or short version like 'bash' or 'htop'. 96 00:03:42,709 --> 00:03:44,429 Let me show you that quickly. 97 00:03:44,609 --> 00:03:47,339 Let me exit from htop. For that, 98 00:03:47,369 --> 00:03:50,339 press F10, and here let me do 99 00:03:50,339 --> 00:03:51,569 following, let me clear terminal 100 00:03:51,569 --> 00:03:53,909 first, make it a bit larger, and 101 00:03:53,909 --> 00:03:56,519 let's find path to htop utility, 102 00:03:56,849 --> 00:04:00,869 'which htop', here is its path. And 103 00:04:00,869 --> 00:04:02,789 I could use this path in order to 104 00:04:02,789 --> 00:04:05,279 start htop process. Let me copy it, 105 00:04:05,429 --> 00:04:08,039 paste here, and press Enter. And I 106 00:04:08,039 --> 00:04:10,229 see again htop process that is currently 107 00:04:10,229 --> 00:04:13,109 running. But now in this table, I see 108 00:04:13,139 --> 00:04:15,329 that the htop process was started 109 00:04:15,329 --> 00:04:17,759 using '/usr/bin/htop' command. 110 00:04:18,539 --> 00:04:20,339 Alright, that's how you could use 111 00:04:20,369 --> 00:04:22,439 htop utility in order to monitor 112 00:04:22,469 --> 00:04:24,178 running processes. And please 113 00:04:24,178 --> 00:04:25,949 notice that this nice looking 114 00:04:25,978 --> 00:04:27,839 application is actually running 115 00:04:27,869 --> 00:04:29,969 inside of the terminal. It is a 116 00:04:29,999 --> 00:04:32,069 terminal application. Alright, 117 00:04:32,069 --> 00:04:33,269 that's all for this lecture. And 118 00:04:33,269 --> 00:04:34,949 next let me show you a list of 119 00:04:34,949 --> 00:04:37,259 processes on other computer where I 120 00:04:37,259 --> 00:04:39,119 have a separate Ubuntu Installation, 121 00:04:39,179 --> 00:04:40,889 not container. I'll see you next 122 00:04:40,889 --> 00:04:41,849 guys. Bye-Bye. 123 00:04:41,849 --> 00:04:43,840 [no audio]