您现在的位置是:主页 > news > wordpress添加可链接照片/广州seo黑帽培训
wordpress添加可链接照片/广州seo黑帽培训
admin2025/4/30 20:45:30【news】
简介wordpress添加可链接照片,广州seo黑帽培训,如何建设本地网站,微信网页版手机登录入口一、什么是abab是apache自带的压力测试工具。ab不仅可以对apache服务器进行网站访问压力测试,也可以对或其它类型的服务器进行压力测试。二、安装yum -y install httpd-toolsapt install apache2-utils三、ab的使用源码function getIPaddress(){$IPaddress ;if (is…
一、什么是ab
ab是apache自带的压力测试工具。ab不仅可以对apache服务器进行网站访问压力测试,也可以对或其它类型的服务器进行压力测试。
二、安装
yum -y install httpd-tools
apt install apache2-utils
三、ab的使用
源码
function getIPaddress()
{
$IPaddress = '';
if (isset($_SERVER)) {
if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
$IPaddress = $_SERVER["HTTP_X_FORWARDED_FOR"];
} else if (isset($_SERVER["HTTP_CLIENT_IP"])) {
$IPaddress = $_SERVER["HTTP_CLIENT_IP"];
} else {
$IPaddress = $_SERVER["REMOTE_ADDR"];
}
} else {
if (getenv("HTTP_X_FORWARDED_FOR")) {
$IPaddress = getenv("HTTP_X_FORWARDED_FOR");
} else if (getenv("HTTP_CLIENT_IP")) {
$IPaddress = getenv("HTTP_CLIENT_IP");
} else {
$IPaddress = getenv("REMOTE_ADDR");
}
}
return $IPaddress;
}
echo getIPaddress().PHP_EOL;
file_put_contents('/tmp/mau/wechat.txt',json_encode(($_POST).PHP_EOL, FILE_APPEND );
file_put_contents('/tmp/mau/wechat.txt',getIPaddress().PHP_EOL, FILE_APPEND );
POST文件
[root@localhost mau]# vim postdata.txt
name=chang&passwd=1111
压测命令
[root@localhost mau]# ab -c 2 -n 2 -p /tmp/mau/postdata.txt -H "X-FORWARDED-FOR:172.16.1.134" -T application/x-www-form-urlencoded http://127.0.0.1:6666/test.php
This is ApacheBench, Version 2.3
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient).....done
Server Software: BDWEB/1.9.9
Server Hostname: 127.0.0.1
Server Port: 6666
Document Path: /test.php
Document Length: 13 bytes
Concurrency Level: 2
Time taken for tests: 0.001 seconds
Complete requests: 2
Failed requests: 0
Write errors: 0
Total transferred: 356 bytes
Total body sent: 468
HTML transferred: 26 bytes
Requests per second: 1806.68 [#/sec] (mean)
Time per request: 1.107 [ms] (mean)
Time per request: 0.553 [ms] (mean, across all concurrent requests)
Transfer rate: 314.05 [Kbytes/sec] received
412.86 kb/s sent
726.91 kb/s total
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.3 1 1
Processing: 0 1 0.4 1 1
Waiting: 0 0 0.3 0 0
Total: 1 1 0.1 1 1
ERROR: The median and mean for the initial connection time are more than twice the standard
deviation apart. These results are NOT reliable.
Percentage of the requests served within a certain time (ms)
50% 1
66% 1
75% 1
80% 1
90% 1
95% 1
98% 1
99% 1
100% 1 (longest request)
测试结果
172.16.1.134
array (
'name' => 'chang',
'passwd' => '22222
',
)
172.16.1.134