1 00:00:00,460 --> 00:00:06,940 ‫System monitoring can help users check on how much system resources are being used and which apps are 2 00:00:06,940 --> 00:00:09,220 ‫consuming what percentage of it. 3 00:00:09,910 --> 00:00:10,720 ‫It's very helpful. 4 00:00:11,050 --> 00:00:15,910 ‫It helps the user to properly manage the applications as well as make sure that the system is in good 5 00:00:15,910 --> 00:00:16,240 ‫health. 6 00:00:17,460 --> 00:00:21,690 ‫Of course, there are many built in tools available for system monitoring in Linux. 7 00:00:22,620 --> 00:00:24,000 ‫So we'll look at some of them. 8 00:00:25,560 --> 00:00:34,080 ‫So to see the status of disc death, which is an abbreviation for disc free, this is the command used 9 00:00:34,080 --> 00:00:41,520 ‫to display the amount of available disk space for file systems on which the invoking user has appropriate 10 00:00:41,520 --> 00:00:42,540 ‫read access. 11 00:00:44,690 --> 00:00:48,350 ‫The Dash H parameter print sizes in human readable format of. 12 00:00:50,250 --> 00:00:56,250 ‫Now, hopefully, you remember from the previous lectures, we already practiced the top command, so 13 00:00:56,250 --> 00:00:59,370 ‫top commanders used to show the Linux processes. 14 00:01:00,270 --> 00:01:03,960 ‫It provides a dynamic Real-Time view of the Running System. 15 00:01:06,760 --> 00:01:15,340 ‫Now, to see the status of RAM, the slash proc slash mem info file is another alternative way. 16 00:01:16,030 --> 00:01:22,540 ‫It's used to report the amount of free and unused memory on this system, as well as the shared memory 17 00:01:22,540 --> 00:01:24,460 ‫and buffers used by the kernel. 18 00:01:27,010 --> 00:01:34,330 ‫To check the status of the CPU, virtual memory statistics reporter, also known as VMS STAT. 19 00:01:35,200 --> 00:01:41,860 ‫This is a Linux command line tool that reports various bits of system information. 20 00:01:43,720 --> 00:01:51,490 ‫So slash proc slash CPU info is a short read only plain text file that contains information about the 21 00:01:51,490 --> 00:01:55,540 ‫CPU's or central processing unit on a particular computer. 22 00:01:57,760 --> 00:02:05,650 ‫Now, to check the status of the network, netstat can be used to list out all of the network socket 23 00:02:05,650 --> 00:02:07,090 ‫connections on a system. 24 00:02:08,680 --> 00:02:11,830 ‫There are some important parameters to that step. 25 00:02:13,560 --> 00:02:17,790 ‫Dashti is the parameter used to get TCP packets. 26 00:02:18,570 --> 00:02:23,370 ‫Dash N is used to avoid domain name resolution. 27 00:02:25,390 --> 00:02:29,920 ‫Dash L, this is a parameter used to list only the listening ports. 28 00:02:31,300 --> 00:02:39,280 ‫The dash parameters used to list the ID and name of the program, the Dash as parameter will get you 29 00:02:39,280 --> 00:02:40,510 ‫some statistics. 30 00:02:41,910 --> 00:02:45,480 ‫And, of course, a root parameter just plays the kernel routing table. 31 00:02:47,030 --> 00:02:51,320 ‫It must be so confusing to the UK users who say root and router. 32 00:02:52,480 --> 00:02:54,280 ‫Anyway, let's go to Carly. 33 00:02:54,700 --> 00:02:56,680 ‫And look how each tool works. 34 00:02:57,790 --> 00:03:01,240 ‫So first, let's run DFA dash each. 35 00:03:02,510 --> 00:03:08,150 ‫So as you can see, it displays the space available on all the currently mounted file systems. 36 00:03:09,440 --> 00:03:13,670 ‫If you happen to be using Mac OS, you can also run this in the terminal screen. 37 00:03:40,070 --> 00:03:42,980 ‫So let's go back to Carly, run the top command. 38 00:03:46,900 --> 00:03:56,410 ‫And these are the running processes with their kids usage, percentage of CPU memory, some other detailed 39 00:03:56,410 --> 00:03:57,610 ‫information. 40 00:04:06,340 --> 00:04:07,480 ‫And pressing you to quit. 41 00:04:09,090 --> 00:04:12,720 ‫Now, let's have a look at the content of these programs. 42 00:04:12,900 --> 00:04:13,720 ‫Info file. 43 00:04:16,520 --> 00:04:23,540 ‫So this whole display, the status of the RAM and the output of this command would be different depending 44 00:04:23,540 --> 00:04:26,480 ‫on the OS and architecture of the server. 45 00:04:37,150 --> 00:04:40,090 ‫All right, so let's continue with the status of CPU. 46 00:04:47,090 --> 00:04:53,630 ‫VM STAT provides a number of values and will typically be called using two numerical parameters. 47 00:04:56,070 --> 00:05:02,100 ‫Number two will provide the values and will be re measured and reported every two seconds. 48 00:05:03,000 --> 00:05:09,510 ‫Number five will provide the values that will be reported five times and then the program will stop. 49 00:05:10,350 --> 00:05:13,260 ‫All right, so now anticipating for you. 50 00:05:14,190 --> 00:05:19,460 ‫Now, the other way to get some information about the CPU is the Proc CPU info file. 51 00:05:22,370 --> 00:05:28,360 ‫As you can see, there's a lot of detailed information about CPUs such as model name, cache size, 52 00:05:28,360 --> 00:05:29,980 ‫speed, CPU cores and all that. 53 00:05:50,930 --> 00:05:58,730 ‫All right, so we'll have a look at the status of the network run, netstat, dash and LP. 54 00:06:00,370 --> 00:06:05,080 ‫That'll show the active connections with TCP packets and IDs. 55 00:06:16,200 --> 00:06:18,540 ‫So let's use netstat as parameter. 56 00:06:20,490 --> 00:06:25,430 ‫As you can see, the dash as argument will show overall stats. 57 00:06:25,850 --> 00:06:29,420 ‫And this is how you can pay attention to packets discarded messages. 58 00:06:31,110 --> 00:06:35,700 ‫And then finally, we can use the route parameter, or is it route parameter? 59 00:06:36,370 --> 00:06:38,040 ‫Well, I'm not if I'm a route user. 60 00:06:39,690 --> 00:06:44,400 ‫So the connections aren't working as expected because the connection goes through a different route. 61 00:06:44,880 --> 00:06:52,110 ‫It may be necessary to quickly check the routing table, so it includes information about how packets 62 00:06:52,110 --> 00:06:53,370 ‫are to be forwarded. 63 00:06:54,330 --> 00:06:56,640 ‫And it's stored in a kernel structure.