insight 最近的时间轴更新
insight

insight

V2EX 第 29727 号会员,加入于 2012-11-19 13:08:55 +08:00
insight 最近回复了
"To resolve this issue, sign out of iCloud, then sign back in:
1. Tap Settings > iCloud > Sign Out.
2. Enter your Apple ID and password to sign in again."

https://support.apple.com/en-us/HT203067
2014-11-03 16:50:37 +08:00
回复了 wzxjohn 创建的主题 分享发现 捆绑安装浏览器:技术剖析搜狗输入法中的猫腻
“Microsoft Pinyin - SimpleFast 2010”——干净、稳定、兼容性好,而且,关键一点,不会自作聪明。http://t.cn/zOU9zLY
2014-09-17 13:16:44 +08:00
回复了 dbow 创建的主题 Python 分享找某个目录里找 top N 大文件的 python 代码.
Windows Directory Statistics
https://windirstat.info/
2014-08-01 08:36:32 +08:00
回复了 zhangsan 创建的主题 问与答 有什么小软件能爬完整个站,并下载站里的图片的?
2013-11-27 11:54:03 +08:00
回复了 fibonacci 创建的主题 问与答 免费调查问卷网站推荐
简单、好用的第三方在线调查工具:
http://www.diaochapai.com/
2013-11-25 16:59:20 +08:00
回复了 gouera 创建的主题 Linux 关于ab压力测试的问题
同时建立-c条TCP连接,然后这-c条连接一直发,在响应时间大于等于-t的超时时间或者所有的-n条请求数已经被发送完毕时,停止发送。

-n requests Number of requests to perform
-c concurrency Number of multiple requests to make
-t timelimit Seconds to max. wait for responses

ab.c的源代码:
http://svn.apache.org/repos/asf/httpd/httpd/trunk/support/ab.c

重点是static void test(void)函数的实现。
2013-08-19 13:24:59 +08:00
回复了 yakczh 创建的主题 Python webpy 怎么样禁止 access log ?
修改一下web.py中的httpserver.py文件,
注释掉func = LogMiddleware(func)这句就可以了。
2013-08-12 13:28:39 +08:00
回复了 georgetso 创建的主题 问与答 https协议是否可以使用80端口?
http://sendtoreader.com/

SENDtoREADER的bookmarklet在iOS上的Safari浏览器中工作的很好,我原先在 iPod touch上就是用的这个,效果很好。
2013-04-09 11:34:06 +08:00
回复了 hustlzp 创建的主题 服务器 ab的原理是?能否造成DoS攻击?
可以看一下ab.c的源代码:
http://svn.apache.org/repos/asf/httpd/httpd/trunk/support/ab.c

重点是static void test(void)函数的实现,其中这几句是关键:

for (i = 0; i < concurrency; i++) {
con[i].socknum = i;
start_connect(&con[i]);
}

do {
apr_int32_t n;
const apr_pollfd_t *pollresults, *pollfd;

n = concurrency;
do {
status = apr_pollset_poll(readbits, aprtimeout, &n, &pollresults);
} while (APR_STATUS_IS_EINTR(status));
if (status != APR_SUCCESS)
apr_err("apr_pollset_poll", status);

for (i = 0, pollfd = pollresults; i < n; i++, pollfd++) {
struct connection *c;

c = pollfd->client_data;

/*
* If the connection isn't connected how can we check it?
*/
if (c->state == STATE_UNCONNECTED)
continue;

rtnev = pollfd->rtnevents;

#ifdef USE_SSL
if (c->state == STATE_CONNECTED && c->ssl && SSL_in_init(c->ssl)) {
ssl_proceed_handshake(c);
continue;
}
#endif

/*
* Notes: APR_POLLHUP is set after FIN is received on some
* systems, so treat that like APR_POLLIN so that we try to read
* again.
*
* Some systems return APR_POLLERR with APR_POLLHUP. We need to
* call read_connection() for APR_POLLHUP, so check for
* APR_POLLHUP first so that a closed connection isn't treated
* like an I/O error. If it is, we never figure out that the
* connection is done and we loop here endlessly calling
* apr_poll().
*/
if ((rtnev & APR_POLLIN) || (rtnev & APR_POLLPRI) || (rtnev & APR_POLLHUP))
read_connection(c);
if ((rtnev & APR_POLLERR) || (rtnev & APR_POLLNVAL)) {
bad++;
err_except++;
/* avoid apr_poll/EINPROGRESS loop on HP-UX, let recv discover ECONNREFUSED */
if (c->state == STATE_CONNECTING) {
read_connection(c);
}
else {
start_connect(c);
}
continue;
}
if (rtnev & APR_POLLOUT) {
if (c->state == STATE_CONNECTING) {
rv = apr_socket_connect(c->aprsock, destsa);
if (rv != APR_SUCCESS) {
set_conn_state(c, STATE_UNCONNECTED);
apr_socket_close(c->aprsock);
err_conn++;
if (bad++ > 10) {
fprintf(stderr,
"\nTest aborted after 10 failures\n\n");
apr_err("apr_socket_connect()", rv);
}
start_connect(c);
continue;
}
else {
set_conn_state(c, STATE_CONNECTED);
#ifdef USE_SSL
if (c->ssl)
ssl_proceed_handshake(c);
else
#endif
write_request(c);
}
}
else {
write_request(c);
}
}
}
} while (lasttime < stoptime && done < requests);

也就是说:
ab在执行时会先“同时”建立-c条TCP连接,然后这-c条连接一直发送请求,在响应时间大于等于-t的超时时间或者所有的-n条请求数已经被发送完毕时,停止发送。
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1521 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 17:07 · PVG 01:07 · LAX 09:07 · JFK 12:07
Developed with CodeLauncher
♥ Do have faith in what you're doing.