網站壓力檢測
ab -c 10 -n 100 http://192.168.80.85/index.html 十個使用者每個使用者發100個請求
Server Hostname: 192.168.80.85
Server Port: 80
Document Path: /index.html
Document Length: 8 bytes
Concurrency Level: 10 十個使用者請求
Time taken for tests: 0.026 seconds
Complete requests: 100 每個使用者100個請求
Failed requests: 0
Write errors: 0
Total transferred: 27573 bytes
HTML transferred: 808 bytes
Requests per second: 3858.92 [#/sec] (mean) 共處了 3858.92
Time per request: 2.591 [ms] (mean)
Time per request: 0.259 [ms] (mean, across all concurrent requests) 處理時間 0.259
Transfer rate: 1039.08 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 0.2 1 2
Processing: 1 1 0.3 1 2
Waiting: 0 1 0.3 1 2
Total: 2 2 0.2 2 2
Percentage of the requests served within a certain time (ms)
50% 2
66% 2
75% 2
80% 2
90% 2
95% 2
98% 2
99% 2
100% 2 (longest request)
uptime 檢視cpu
top 檢視硬體使用情況
vmstat 檢視IO 和cpu記憶體
yum install vmstat -y
vnstat 檢視網卡流量
yum install vnstat -y
vnstat -l -i eth0
iostat檢視磁盤
yum install sysstat
iostat -x -k
iostat
檢視記憶體
feer -m
檢視CPU
sar -u 1 2