安装Siege到Linux(源码)

运行环境

系统版本:CentOS Linux release 7.3.1611 (Core)
软件版本:siege-4.0.4
硬件要求:无

安装过程

1、安装依赖

[root@localhost ~]# yum -y install openssl openssl-devel zlib zlib-devel

2、下载安装

[root@localhost ~]# wget http://download.joedog.org/siege/siege-latest.tar.gz
[root@localhost ~]# tar xzvf siege-latest.tar.gz
[root@localhost ~]# cd siege-4.0.4/
[root@localhost siege-4.0.4]# ./configure --prefix=/usr/local/siege --with-ssl=/usr --with-zlib=/usr
[root@localhost siege-4.0.4]# make && make install

3、配置环境变量

配置环境变量,使命令在全局生效。

[root@localhost ~]# vim /etc/profile
export PATH=$PATH:/usr/local/siege/bin
[root@localhost ~]# source /etc/profile

4、查看软件版本

[root@localhost bin]# siege -V
SIEGE 4.0.4

5、开始测试

[root@localhost ~]# siege -c 10 -r 10 http://www.szaybc.com/
# 语法:siege [选项] URL
# 选项:
#    -c   并发用户数量
#    -r   重复次数
Transactions:                900 hits          访问次数。
Availability:             100.00 %             成功次数。
Elapsed time:              85.20 secs          测试用时,单位为秒。
Data transferred:         112.63 MB            总传输数据大小。
Response time:              0.80 secs          平均响应时间,单位为秒。
Transaction rate:          10.56 trans/sec     每秒事物处理数量。
Throughput:             1.32 MB/sec            网络吞吐率。
Concurrency:                8.47               真实并发量。
Successful transactions:         900           成功传输次数。
Failed transactions:               0           失败的传输次数。
Longest transaction:           26.71           最长响应时间。
Shortest transaction:           0.02           最短响应时间。

猜你喜欢

转载自www.cnblogs.com/network-ren/p/12394522.html
今日推荐