PS D:\****.WebSite> docker exec -ti d630dc731617 /bin/bash root@d630dc731617:/app# apt-get install net-tools Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: net-tools 0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded. Need to get 248 kB of archives. After this operation, 963 kB of additional disk space will be used. Get:1 http://mirrors.163.com/debian stretch/main amd64 net-tools amd64 1.60+git20161116.90da8a0-1 [248 kB] Fetched 248 kB in 6s (35.8 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package net-tools. (Reading database ... 21948 files and directories currently installed.) Preparing to unpack .../net-tools_1.60+git20161116.90da8a0-1_amd64.deb ... Unpacking net-tools (1.60+git20161116.90da8a0-1) ... Setting up net-tools (1.60+git20161116.90da8a0-1) ... root@d630dc731617:/app# netstat -ant |grep 172.16.32.80:8080|grep -i "ESTABLISHED"|wc -l 0 root@d630dc731617:/app# netstat -ant |grep 172.16.32.80:8080|grep -i "CLOSE_WAIT"|wc -l 0 root@d630dc731617:/app# apt-get install apache2-utils Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libapr1 libaprutil1 The following NEW packages will be installed: apache2-utils libapr1 libaprutil1 0 upgraded, 3 newly installed, 0 to remove and 4 not upgraded. Need to get 400 kB of archives. After this operation, 905 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://mirrors.163.com/debian stretch/main amd64 libapr1 amd64 1.5.2-5 [96.6 kB] Get:2 http://mirrors.163.com/debian stretch/main amd64 libaprutil1 amd64 1.5.4-3 [85.8 kB] Get:3 http://mirrors.163.com/debian stretch/main amd64 apache2-utils amd64 2.4.25-3+deb9u8 [218 kB] Fetched 400 kB in 0s (1,369 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libapr1:amd64. (Reading database ... 22004 files and directories currently installed.) Preparing to unpack .../libapr1_1.5.2-5_amd64.deb ... Unpacking libapr1:amd64 (1.5.2-5) ... Selecting previously unselected package libaprutil1:amd64. Preparing to unpack .../libaprutil1_1.5.4-3_amd64.deb ... Unpacking libaprutil1:amd64 (1.5.4-3) ... Selecting previously unselected package apache2-utils. Preparing to unpack .../apache2-utils_2.4.25-3+deb9u8_amd64.deb ... Unpacking apache2-utils (2.4.25-3+deb9u8) ... Setting up libapr1:amd64 (1.5.2-5) ... Processing triggers for libc-bin (2.24-11+deb9u4) ... Setting up libaprutil1:amd64 (1.5.4-3) ... Setting up apache2-utils (2.4.25-3+deb9u8) ... Processing triggers for libc-bin (2.24-11+deb9u4) ... root@d630dc731617:/app# env
root@d630dc731617:/app# curl -X GET "http://localhost:5001/api/Ops/TestProxy" -H "accept: text/plain" curl: (7) Failed to connect to localhost port 5001: Connection refused root@d630dc731617:/app# curl -X GET "http://localhost/api/Ops/TestProxy" -H "accept: text/plain" {"opSucess":true,"result":3020000,"resultContent":true,"type":"System.Boolean","isArray":false}root@d630dc731617:/app# root@d630dc731617:/app# ab -n 1 -c 1 http://localhost/api/Ops/TestProxy This is ApacheBench, Version 2.3 <$Revision: 1757674 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient).....done Server Software: Kestrel Server Hostname: localhost Server Port: 80 Document Path: /api/Ops/TestProxy Document Length: 95 bytes Concurrency Level: 1 Time taken for tests: 1.603 seconds Complete requests: 1 Failed requests: 0 Total transferred: 279 bytes HTML transferred: 95 bytes Requests per second: 0.62 [#/sec] (mean) Time per request: 1602.877 [ms] (mean) Time per request: 1602.877 [ms] (mean, across all concurrent requests) Transfer rate: 0.17 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 1603 1603 0.0 1603 1603 Waiting: 1603 1603 0.0 1603 1603 Total: 1603 1603 0.0 1603 1603 root@d630dc731617:/app# netstat -ant |grep 172.16.32.80:8080|grep -i "CLOSE_WAIT"|wc -l 0 root@d630dc731617:/app# netstat -ant |grep 172.16.32.80:8080|grep -i "ESTABLISHED"|wc -l 3 root@d630dc731617:/app#
原文:https://www.cnblogs.com/panpanwelcome/p/12145260.html