In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of how to use the Linux vmstat command, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this Linux vmstat command article. Let's take a look at it.
The common Linux command vmstat command means to display the virtual memory status ("Viryual Memor Statics"), but it can report on the overall running status of the system, such as processes, memory, Ibank O, and so on.
Vmstat displays virtual memory status
Syntax vmstat (options) (parameters) option-a: show the active inside page;-f: show the total number of processes created after startup;-m: display slab information;-n: display the header information only once;-s: display event counters and memory status in tabular form;-d: report disk status;-p: display the specified hard disk partition status;-S: output information units. Parameter event interval: the interval between status information refresh
Times: the number of times the report is displayed.
Example vmstat 3 procs-memory- swap---io---- system---cpu- r b swpd free buff cache si so bi bo in cs us sy id wa st 0 0320 42188 167332 1534368 0 0 4 7 1 0 0 99 0 0 0 42188 167332 1534392 00 00 1002 39 00 100 00 42188 167336 1534392 00 019 1002 44 00 100 00 320 4188 167336 153439200 00 1002 41 00 100 00 320 4188 167336 1534392 00 1002 41 00 10000 Field description:
Procs (process)
R: the number of processes in the run queue, which can also determine whether CPU needs to be increased. (long-term greater than 1)
B: the number of processes waiting for IO.
Memory (memory)
Swpd: use virtual memory size, if the value of swpd is not 0, but the value of SI,SO is 0 for a long time, this situation will not affect system performance.
Free: the amount of free physical memory.
Buff: the amount of memory used as a buffer.
Cache: the amount of memory used for caching. If the value of cache is large, it means that there are a large number of files at cache. If frequently accessed files can be accessed by cache, then the read IO bi of the disk will be very small.
Swap
Si: the amount of memory written from the swap area to memory per second, transferred from disk to memory.
So: the amount of memory written to the swap area per second, transferred from memory to disk.
Note: when there is enough memory, these two values are both 0. If these two values are greater than 0 for a long time, the system performance will be affected and disk IO and CPU resources will be consumed. Some friends see free memory (free) very little or close to 0, they think that memory is not enough, can not just look at this point, but also combine si and so, if free is very little, but si and so are also very few (mostly 0), then do not worry, system performance will not be affected at this time.
IO (the current Linux version block size is 1kb)
Bi: number of blocks read per second
Bo: number of blocks written per second
Note: when random disk reads and writes, the higher these two values (for example, more than 1024k), the greater the value that you can see CPU waiting for in IO.
System (system)
In: interrupts per second, including clock interrupts.
Cs: context switches per second.
Note: the higher the above two values, the more CPU time you will see consumed by the kernel.
CPU (as a percentage)
Us: percentage of user process execution time (user time)
When the value of us is high, it means that the user process consumes more CPU time, but if the long-term use exceeds 50%, then we should consider optimizing the program algorithm or speeding up.
Sy: percentage of kernel system process execution time (system time)
When the value of sy is high, it means that the system kernel consumes a lot of CPU resources, which is not benign, and we should check the reason.
Wa: percentage of IO wait time
When the value of wa is high, the IO wait is serious, which may be caused by a large number of random access to the disk, or there may be a bottleneck (block operation) on the disk.
Id: percentage of idle time
This is the end of the article on "how to use the Linux vmstat command". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to use Linux vmstat commands". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.