![]() ![]() Using vmstat without any option returns a single line report of memory, swap, io, and CPU utilization. Enter the command vmstat in your console and you should see output similar to the following screenshot: This is an abbreviation of virtual memory statistics. Next, we will go through the vmstat command. Use flag -r to query memory utilization and page faults: By default, pidstat displays only CPU statistics for a given process. Similar to the top command, you can query memory statistics for a specific PID or program by using the pidstat command. The columns VIRT, RES, SHR, and %MEM all show different memory allocation for each process: Along with these two lines, top shows per process memory utilization as well. Similarly, swap row should display the allocated size of the swap if you have enabled the swapping. The memory line displays the size of total available memory, size of used memory, free memory, and the memory used for buffers and the file system cache. Run the top command and check for the Mem and Swap rows: These commands also provided details of memory usage. In the last recipe, we used commands top and vmstat to monitor CPU utilization. You may need sudo privileges for some commands. In this article, we will learn how to monitor system memory and swap utilization. It is utilized only when the system is low on main memory. Swap is part of persistent storage, such as hard drives or solid state drives. Swap, on the other hand, is an extension to main memory. The CPU performance also depends on the availability of enough memory. All files and data that are currently being used are kept in the system main memory for faster access. ![]() Memory is another important component of system performance. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |