Linux性能评估工具
副标题[/!--empirenews.page--]
<div class="toc"> <div class="toc-list"> 检测服务器当前的性能,主要检查的项目如下:
$ uptime
22:37:31 up 65 days,3:15,1 user,load average: 40.00,25.01,10.05 通过
$ dmesg |tail
[ 2567.534310] IPv6: ADDRCONF(NETDEV_UP): em3: link is not ready
[ 2570.386536] tg3 0000:02:00.0 em3: Link is up at 1000 Mbps,full duplex
[ 2570.386550] tg3 0000:02:00.0 em3: Flow control is off for TX and off for RX
[ 2570.386555] tg3 0000:02:00.0 em3: EEE is disabled
[ 2570.386584] IPv6: ADDRCONF(NETDEV_CHANGE): em3: link becomes ready
[20907.774686] perf: interrupt took too long (2502 > 2500),lowering kernel.perf_event_max_sample_rate to 79000
[50276.167405] perf: interrupt took too long (3173 > 3127),lowering kernel.perf_event_max_sample_rate to 63000
[96662.454537] perf: interrupt took too long (4010 > 3966),lowering kernel.perf_event_max_sample_rate to 49000
[143249.558510] perf: interrupt took too long (5025 > 5012),lowering kernel.perf_event_max_sample_rate to 39000
[204028.503117] perf: interrupt took too long (6286 > 6281),lowering kernel.perf_event_max_sample_rate to 31000 通过
通过free命令可以查看系统内存的使用状况。要了解Linux对内存利用率,就必须了解Linux对buffer cache和page cache的处理。简单来说,Linux内核会将进程要读取或者写入的数据先保存在内存中形成缓存块,加快下次对该数据的操作,上图中
swap显示了swap分区的大小,通过调整
$ vmstat 1
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 3082644 2076 4156120 0 0 1 210 12 9 1 0 99 0 0
0 0 0 3083180 2076 4156112 0 0 0 473 2231 2420 1 0 99 0 0
0 0 0 3083212 2076 4156112 0 0 0 12510 3946 3945 1 2 97 0 0
0 0 0 3083684 2076 4156096 0 0 0 1403 2333 1725 1 0 99 0 0
1 0 0 3082868 2076 4156388 0 0 0 505 2307 1795 4 1 95 0 0
0 0 0 3083508 2076 4156040 0 0 0 475 1888 1570 1 1 99 0 0
0 0 0 3083152 2076 4156040 0 0 0 8090 1694 1910 1 1 99 0 0 vmstat报告有关进程,内存,分页,块IO和cpu活动的信息。
Memory:
Swap:
IO:
System:
CPU :
(编辑:晋中站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |