In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about how to use sar and iostat under suse linux 10. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
Sysstat is a common tool under linux & Unix. Its main purpose is to observe service loads, such as CPU and memory usage, network utilization, and disk write and read speeds.
You can't use the sar command directly under suse linux 10. You need to install the rpm package of sysstat. After installation, there will be iostat, mpstat, sar functions.
Start sysstat
/ etc/init.d/sysstat start
Set sysstat self-startup
# chkconfig sysstat on
The specific usage and parameters are as follows:
1. Sar-u 1 5
Output statistics on CPU usage, once per second, for a total of 5 times
17:06:01 CPU user nice system iowait idle
17:06:02 all 1.27 0.00 0.51 1.01 97.22
17:06:03 all 0.00 0.00 0.00 100.00
17:06:04 all 0.00 0.00 0.00 100.00
17:06:05 all 0.25 0.00 0.00 0.00 99.75
17:06:06 all 0.00 0.00 0.00 0.51 99.49
Average: all 0.30 0.00 0.10 0.30 99.29
CPU all indicates that the statistics are the average of all CPU.
% user displays the percentage of total time spent using CPU running at the user level (application).
% nice is displayed at the user level, as a percentage of the total CPU time spent on nice operations.
The percentage of total CPU time spent running system at the core level (kernel).
% iowait shows the percentage of total CPU time spent waiting for the IUnip O operation.
The percentage of steal hypervisor (hypervisor) waiting for virtual CPU while serving another virtual process.
% idle displays the percentage of total CPU time occupied by CPU idle time.
Tips:
If the value of% iowait is too high, it indicates that there is a bottleneck in the hard disk.
If the value of% idle is high but the system response is slow, it is possible that CPU is waiting to allocate memory. At this time, the memory capacity should be increased.
If the value of% idle is consistently lower than 10, the CPU processing capacity of the system is relatively low, indicating that the resource that needs to be solved most in the system is CPU.
2. Sar-b 1 5
Display statistics for IBG O and transfer rate
17:09:07 tps rtps wtps bread/s bwrtn/s
17:09:08 3.12 3.12 0.00 25.00 0.00
17:09:09 89.58 6.25 83.33 141.67 733.33
17:09:10 42.71 9.38 33.33 141.67 600.00
17:09:11 2.11 2.11 0.00 16.84 0.00
17:09:12 1.04 0.00 1.04 0.00 175.00
Average: 27.77 4.18 23.59 65.14 302.30
Total Istroke O transmissions of tps physical devices per second
The total amount of data that rtps reads from physical devices per second
The total amount of data written by wtps to the physical device per second
The amount of data read from a physical device by bread/s per second, in blocks per second
The amount of data written by bwrtn/s to the physical device per second, in blocks per second
3. Sar-c
Number of processes created per second
15:10:01 1.35
15:20:01 1.01
15:30:01 0.59
15:40:01 1.35
15:50:01 0.99
16:00:01 0.57
16:10:01 1.33
16:20:01 1.02
16:30:01 0.57
16:40:01 1.33
16:50:01 1.07
17:00:01 0.56
17:10:01 1.32
4. Sar-n DEV 1 5
Output statistics on the status of network devices
17:13:42 IFACE rxpck/s txpck/s rxbyt/s txbyt/s rxcmp/s txcmp/s rxmcst/s
17:13:43 eth2 3669.70 4156.57 368362.63 2747714.14 0.00 0.00 0.00
17:13:44 eth2 2689.11 2585.15 289661.39 701461.39 0.00 0.00 0.00
17:13:45 eth2 3746.00 4077.00 415178.00 2605720.00 0.00 0.00 0.00
17:13:46 eth2 3096.00 3241.00 327916.00 1597320.00 0.00 0.00 0.00
17:13:47 eth2 2910.00 2834.00 312632.00 957903.00 0.00 0.00 0.00
Average: eth2 3220.20 3375.60 342592.60 1717931.20 0.00 0.00 0.00
IFACE network device name
Total packets received by rxpck/s per second
Total number of packets transmitted by txpck/s per second
Total bytes received by rxbyt/s per second (byte)
Total number of bytes transmitted by txbyt/s per second (byte)
Total number of compressed packets received by rxcmp/s per second
Total number of compressed packets transmitted by txcmp/s per second
Total number of Multicast (multicast) packets received by rxmcst/s per second
5. Sar-Q 1 5
Output process queue length and average load status statistics
17:16:28 runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15
17:16:29 0 160 0.26 0.11 0.03
17:16:30 0 160 0.26 0.11 0.03
17:16:31 0 160 0.24 0.11 0.03
17:16:32 0 160 0.24 0.11 0.03
17:16:33 0 160 0.24 0.11 0.03
Average: 0 160 0.25 0.11 0.03
Length of runq-sz run queue (number of processes waiting to run)
Number of processes (processes) and threads (threads) in the plist-sz process list
Average system load in the last minute of the ldavg-1 (System load average)
Average system load of ldavg-5 over the past 5 minutes
Average system load of ldavg-15 over the past 15 minutes
6. Sar-r
Output memory and swap space statistics
7. Iostat (add-p parameter to view the read and write status of specific disk partitions)
The total number of tps O transmissions per second for physical devices.
The total amount of data read by Blk_read, in blocks.
The total amount of data written by Blk_wrtn, in blocks.
The total amount of data read by kB_read, in KB.
The total amount of data written by kB_wrtn, in KB.
The total amount of data read by MB_read, in MB.
The total amount of data written by MB_wrtn, in MB.
The amount of data that Blk_read/s reads from the drive per second, in blocks per second.
The amount of data that Blk_wrtn/s writes to the drive per second, in blocks per second.
The amount of data, in KB/s, that kB_read/s reads from the drive per second.
The amount of data, in KB/s, that kB_wrtn/s writes to the drive per second.
The amount of data, in MB/s, that MB_read/s reads from the drive per second.
The amount of data, in MB/s, that MB_wrtn/s writes to the drive per second.
The number of read requests sent to the device per second after rrqm/s merges read requests.
The number of write requests sent to the device per second after wrqm/s merges write requests.
The number of read requests sent to the device by rbarb per second.
The number of write requests sent to the device by whand per second.
The number of sectors read from the device by rsec/s per second.
The number of sectors written to the device by wsec/s per second.
The amount of data read from the device by rkB/s per second, in KB/s.
The amount of data written by wkB/s to the device per second, in KB/s.
The amount of data read from the device by rMB/s per second, in MB/s.
The amount of data written by wMB/s to the device per second, in MB/s.
The average size, in sectors, of requests sent by avgrq-sz to the device.
The average queue length of requests sent by avgqu-sz to the device.
The average execution time of the await IPUBO request. Including the time to send the request and execute. The unit is millisecond.
The average execution time of the Istroke O request sent by the svctm to the device. The unit is millisecond.
The percentage of CPU time consumed by% util during the time the CPU O request was sent to the device. Used to display the bandwidth utilization of the device. When this value is close to 100%, the device bandwidth is full.
The above is how to use sar and iostat under suse linux 10. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please 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.