{"id":87880,"date":"2026-07-31T03:48:24","date_gmt":"2026-07-30T19:48:24","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/87880.html"},"modified":"2026-07-31T03:48:24","modified_gmt":"2026-07-30T19:48:24","slug":"kkce-com%ef%bc%9atcping-%e7%bd%91%e7%bb%9c%e6%a3%80%e6%b5%8b%e4%bb%8e%e6%95%85%e9%9a%9c%e5%ae%9a%e4%bd%8d%e5%88%b0%e8%87%aa%e5%8a%a8%e5%8c%96%e7%9b%91%e6%8e%a7","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/87880.html","title":{"rendered":"KKCE.COM\uff1aTCPing \u7f51\u7edc\u68c0\u6d4b\u4ece\u6545\u969c\u5b9a\u4f4d\u5230\u81ea\u52a8\u5316\u76d1\u63a7"},"content":{"rendered":"<p>\u5728\u65e5\u5e38\u8fd0\u7ef4\u548c\u5f00\u53d1\u5de5\u4f5c\u4e2d&#xff0c;\u6211\u4eec\u5e38\u5e38\u9047\u5230\u8fd9\u6837\u7684\u5c34\u5c2c\u573a\u666f&#xff1a;\u660e\u660e\u670d\u52a1\u5668\u80fd ping \u901a&#xff0c;\u4f46\u4e1a\u52a1\u7aef\u53e3\u5c31\u662f\u8fde\u4e0d\u4e0a&#xff1b;\u6216\u8005\u5728\u590d\u6742\u7684\u5fae\u670d\u52a1\u67b6\u6784\u4e2d&#xff0c;\u67d0\u4e2a\u4e2d\u95f4\u4ef6\u7a81\u7136\u201c\u5931\u8054\u201d&#xff0c;\u4f20\u7edf\u7684 ICMP \u63a2\u6d4b\u5374\u663e\u793a\u4e00\u5207\u6b63\u5e38\u3002\u8fd9\u79cd\u201c\u5047\u6027\u8fde\u901a\u201d\u5f80\u5f80\u8ba9\u6392\u67e5\u5de5\u4f5c\u9677\u5165\u50f5\u5c40&#xff0c;\u5c24\u5176\u662f\u5728\u7535\u5546\u5927\u4fc3\u3001\u6e38\u620f\u5f00\u670d\u7b49\u5bf9\u7f51\u7edc\u7a33\u5b9a\u6027\u8981\u6c42\u6781\u9ad8\u7684\u65f6\u523b&#xff0c;\u51e0\u5206\u949f\u7684\u8bef\u5224\u90fd\u53ef\u80fd\u5bfc\u81f4\u5de8\u5927\u7684\u4e1a\u52a1\u635f\u5931\u3002<\/p>\n<p>\u5176\u5b9e&#xff0c;\u95ee\u9898\u7684\u6839\u6e90\u5728\u4e8e\u6211\u4eec\u8fc7\u5ea6\u4f9d\u8d56\u4e86 ICMP \u534f\u8bae\u3002\u5927\u591a\u6570\u751f\u4ea7\u73af\u5883\u7684\u9632\u706b\u5899\u7b56\u7565\u90fd\u4f1a\u9ed8\u8ba4\u62e6\u622a ICMP \u5305&#xff0c;\u800c\u771f\u6b63\u51b3\u5b9a\u4e1a\u52a1\u53ef\u7528\u6027\u7684&#xff0c;\u662f TCP \u7aef\u53e3\u7684\u8fde\u901a\u72b6\u6001\u3002\u8fd9\u65f6\u5019&#xff0c;\u4e00\u6b3e\u80fd\u591f\u76f4\u63a5\u63a2\u6d4b TCP \u7aef\u53e3\u54cd\u5e94\u65f6\u95f4\u7684\u5de5\u5177\u5c31\u663e\u5f97\u5c24\u4e3a\u91cd\u8981\u3002\u5b83\u4e0d\u4ec5\u80fd\u7ed5\u8fc7 ICMP \u7684\u9650\u5236&#xff0c;\u76f4\u63a5\u6a21\u62df\u771f\u5b9e\u4e1a\u52a1\u7684\u8fde\u63a5\u8bf7\u6c42&#xff0c;\u8fd8\u80fd\u63d0\u4f9b\u6beb\u79d2\u7ea7\u7684\u5ef6\u8fdf\u6570\u636e&#xff0c;\u5e2e\u52a9\u6211\u4eec\u8981\u7cbe\u51c6\u5b9a\u4f4d\u7f51\u7edc\u74f6\u9888\u3002<\/p>\n<p>\u672c\u6587\u5c06\u6df1\u5165\u63a2\u8ba8\u5982\u4f55\u5229\u7528 TCPing \u8fd9\u4e00\u8f7b\u91cf\u7ea7\u5de5\u5177&#xff0c;\u89e3\u51b3\u4ece\u57fa\u7840\u7aef\u53e3\u8bca\u65ad\u5230\u4f01\u4e1a\u7ea7\u76d1\u63a7\u5927\u5c4f\u63a5\u5165\u7684\u4e00\u7cfb\u5217\u5b9e\u9645\u95ee\u9898\u3002\u65e0\u8bba\u4f60\u662f\u9700\u8981\u5feb\u901f\u6392\u67e5\u7ebf\u4e0a\u6545\u969c\u7684\u8fd0\u7ef4\u5de5\u7a0b\u5e08&#xff0c;\u8fd8\u662f\u81f4\u529b\u4e8e\u4f18\u5316\u8de8\u56fd\u94fe\u8def\u5ef6\u8fdf\u7684\u5f00\u53d1\u4eba\u5458&#xff0c;\u4ea6\u6216\u662f\u60f3\u8981\u6784\u5efa\u81ea\u52a8\u5316\u5065\u5eb7\u68c0\u67e5\u4f53\u7cfb\u7684\u67b6\u6784\u5e08&#xff0c;\u90fd\u80fd\u4ece\u4e2d\u627e\u5230\u53ef\u843d\u5730\u7684\u5b9e\u64cd\u65b9\u6848\u3002\u6211\u4eec\u5c06\u8df3\u8fc7\u67af\u71e5\u7684\u7406\u8bba\u5806\u780c&#xff0c;\u76f4\u63a5\u901a\u8fc7\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u548c\u4ee3\u7801\u793a\u4f8b&#xff0c;\u5c55\u793a\u5982\u4f55\u8ba9\u5b83\u6210\u4e3a\u4f60\u5de5\u5177\u7bb1\u4e2d\u4e0d\u53ef\u6216\u7f3a\u7684\u5229\u5668\u3002<\/p>\n<h3>\u2460 \u4f20\u7edf Ping \u5931\u6548\u573a\u666f\u4e0e TCPing \u6838\u5fc3\u4f18\u52bf<\/h3>\n<p>\u5728\u5f88\u591a IDC \u673a\u623f\u6216\u4e91\u5382\u5546\u7684\u5b89\u5168\u7ec4\u7b56\u7565\u4e2d&#xff0c;\u4e3a\u4e86\u51cf\u5c11\u5e7f\u64ad\u98ce\u66b4\u6216\u9632\u6b62\u7b80\u5355\u7684\u7f51\u7edc\u626b\u63cf&#xff0c;ICMP \u534f\u8bae\u5f80\u5f80\u662f\u88ab\u4f18\u5148\u5c4f\u853d\u7684\u5bf9\u8c61\u3002\u5f53\u4f60\u6267\u884c\u6807\u51c6\u7684 ping \u547d\u4ee4\u65f6&#xff0c;\u770b\u5230\u7684\u53ef\u80fd\u662f\u8fde\u7eed\u7684 Request timed out&#xff0c;\u4f46\u8fd9\u5e76\u4e0d\u4ee3\u8868\u670d\u52a1\u5668\u5b95\u673a\u4e86&#xff0c;\u5f88\u53ef\u80fd\u53ea\u662f\u9632\u706b\u5899\u4e22\u5f03\u4e86 ICMP \u56de\u663e\u5305&#xff0c;\u800c\u4f60\u7684 SSH \u6216 Web \u670d\u52a1\u5176\u5b9e\u8fd0\u884c\u5f97\u597d\u597d\u7684\u3002<\/p>\n<p>TCPing \u7684\u6838\u5fc3\u4f18\u52bf\u5c31\u5728\u4e8e\u5b83\u201c\u53e6\u8f9f\u8e4a\u5f84\u201d\u3002\u5b83\u4e0d\u53d1\u9001 ICMP Echo Request&#xff0c;\u800c\u662f\u5c1d\u8bd5\u53d1\u8d77\u4e00\u4e2a TCP \u4e09\u6b21\u63e1\u624b\u3002\u53ea\u8981\u76ee\u6807\u7aef\u53e3\u662f\u5f00\u653e\u7684&#xff08;LISTEN \u72b6\u6001&#xff09;&#xff0c;\u5373\u4f7f ICMP \u88ab\u7981&#xff0c;TCPing \u4e5f\u80fd\u6210\u529f\u5efa\u7acb\u8fde\u63a5\u5e76\u8ba1\u7b97\u51fa\u5f80\u8fd4\u65f6\u95f4&#xff08;RTT&#xff09;\u3002\u8fd9\u79cd\u673a\u5236\u8ba9\u5b83\u6210\u4e3a\u4e86\u7a7f\u900f\u9632\u706b\u5899\u8ff7\u96fe\u7684\u201c\u900f\u89c6\u773c\u201d\u3002\u6b64\u5916&#xff0c;\u4f20\u7edf ping \u53ea\u80fd\u6d4b\u8bd5\u4e3b\u673a\u5c42\u9762\u7684\u53ef\u8fbe\u6027&#xff0c;\u800c TCPing \u53ef\u4ee5\u7cbe\u786e\u5230\u5177\u4f53\u670d\u52a1\u7aef\u53e3\u3002\u6bd4\u5982&#xff0c;\u4e00\u53f0\u670d\u52a1\u5668\u53ef\u80fd\u7f51\u5361\u6b63\u5e38&#xff0c;\u4f46 Nginx \u8fdb\u7a0b\u6302\u4e86&#xff0c;\u4f20\u7edf ping \u4f9d\u7136\u663e\u793a\u901a\u7545&#xff0c;\u800c TCPing \u63a2\u6d4b 80 \u7aef\u53e3\u5219\u4f1a\u7acb\u5373\u62a5\u9519&#xff0c;\u4ece\u800c\u5b9e\u73b0\u4e86\u4ece\u201c\u4e3b\u673a\u5b58\u6d3b\u201d\u5230\u201c\u670d\u52a1\u5b58\u6d3b\u201d\u7684\u76d1\u6d4b\u7c92\u5ea6\u8dc3\u5347\u3002<\/p>\n<h3>\u2461 \u7535\u5546\u5927\u4fc3\u671f\u95f4\u7aef\u53e3\u8fde\u901a\u6027\u5feb\u901f\u8bca\u65ad<\/h3>\n<p>\u5728\u201c\u53cc 11&#034;\u6216&#034;618&#034;\u8fd9\u6837\u7684\u5927\u4fc3\u9ad8\u5cf0\u671f&#xff0c;\u6d41\u91cf\u6d2a\u5cf0\u77ac\u95f4\u6d8c\u5165&#xff0c;\u8d1f\u8f7d\u5747\u8861\u5668\u3001\u7f51\u5173\u6216\u540e\u7aef\u5e94\u7528\u670d\u52a1\u5668\u6781\u6613\u51fa\u73b0\u7aef\u53e3\u62e5\u585e\u751a\u81f3\u5047\u6b7b\u3002\u6b64\u65f6&#xff0c;\u8fd0\u7ef4\u56e2\u961f\u9700\u8981\u5728\u79d2\u7ea7\u65f6\u95f4\u5185\u5224\u65ad\u662f\u7f51\u7edc\u94fe\u8def\u65ad\u4e86&#xff0c;\u8fd8\u662f\u67d0\u4e2a\u5177\u4f53\u670d\u52a1\u7aef\u53e3\u65e0\u6cd5\u63a5\u53d7\u65b0\u8fde\u63a5\u3002<\/p>\n<p>\u4f7f\u7528 TCPing \u8fdb\u884c\u5feb\u901f\u8bca\u65ad&#xff0c;\u53ef\u4ee5\u907f\u514d\u88ab ICMP \u7684\u901a\u7545\u8868\u8c61\u8bef\u5bfc\u3002\u4f8b\u5982&#xff0c;\u5f53\u7528\u6237\u53cd\u9988\u4e0b\u5355\u5931\u8d25\u65f6&#xff0c;\u6211\u4eec\u53ef\u4ee5\u7acb\u5373\u5bf9\u8ba2\u5355\u670d\u52a1\u7684 VIP&#xff08;\u865a\u62df IP&#xff09;\u53ca\u540e\u7aef\u771f\u5b9e IP \u7684\u7279\u5b9a\u4e1a\u52a1\u7aef\u53e3&#xff08;\u5982 8080&#xff09;\u8fdb\u884c\u63a2\u6d4b&#xff1a;<\/p>\n<p>tcping <span class=\"token parameter variable\">-t<\/span> <span class=\"token number\">192.168<\/span>.1.100 <span class=\"token number\">8080<\/span><\/p>\n<p>\u5982\u679c\u8f93\u51fa\u663e\u793a\u8fde\u63a5\u65f6\u95f4\u4ece\u5e73\u65f6\u7684 2ms \u98d9\u5347\u81f3 500ms \u751a\u81f3\u51fa\u73b0\u5927\u91cf No response&#xff0c;\u800c\u540c\u65f6\u5bf9\u8be5 IP \u7684\u6807\u51c6 ping \u6d4b\u8bd5\u5374\u6b63\u5e38&#xff0c;\u90a3\u4e48\u57fa\u672c\u53ef\u4ee5\u65ad\u5b9a\u662f\u5e94\u7528\u5c42\u7ebf\u7a0b\u6c60\u8017\u5c3d\u6216\u7aef\u53e3\u961f\u5217\u6ee1&#xff0c;\u800c\u975e\u5e95\u5c42\u7f51\u7edc\u4e2d\u65ad\u3002\u8fd9\u79cd\u7cbe\u51c6\u7684\u533a\u5206\u80fd\u529b&#xff0c;\u80fd\u8ba9\u7814\u53d1\u56e2\u961f\u8fc5\u901f\u5c06\u6392\u67e5\u91cd\u5fc3\u8f6c\u5411\u5e94\u7528\u65e5\u5fd7\u548c JVM \u72b6\u6001&#xff0c;\u800c\u4e0d\u662f\u6d6a\u8d39\u65f6\u95f4\u5728\u68c0\u67e5\u8def\u7531\u5668\u548c\u5149\u732b\u4e0a&#xff0c;\u6781\u5927\u7f29\u77ed\u4e86 MTTR&#xff08;\u5e73\u5747\u4fee\u590d\u65f6\u95f4&#xff09;\u3002<\/p>\n<h3>\u2462 \u5fae\u670d\u52a1\u67b6\u6784\u4e0b\u4e2d\u95f4\u4ef6\u5065\u5eb7\u72b6\u6001\u5de1\u68c0<\/h3>\n<p>\u73b0\u4ee3\u5fae\u670d\u52a1\u67b6\u6784\u4e2d&#xff0c;Redis\u3001MySQL\u3001RabbitMQ\u3001Kafka \u7b49\u4e2d\u95f4\u4ef6\u662f\u7cfb\u7edf\u7684\u547d\u8109\u3002\u8fd9\u4e9b\u7ec4\u4ef6\u901a\u5e38\u90e8\u7f72\u5728\u5bb9\u5668\u5185\u6216\u72ec\u7acb\u7684\u96c6\u7fa4\u8282\u70b9\u4e0a&#xff0c;\u5176\u7aef\u53e3\u8fde\u901a\u6027\u76f4\u63a5\u51b3\u5b9a\u4e86\u4e0a\u6e38\u4e1a\u52a1\u7684\u751f\u6b7b\u3002\u4f20\u7edf\u7684\u76d1\u63a7\u4ee3\u7406&#xff08;Agent&#xff09;\u6709\u65f6\u4f1a\u56e0\u4e3a\u8d44\u6e90\u5360\u7528\u8fc7\u9ad8\u800c\u88ab\u9650\u5236\u90e8\u7f72&#xff0c;\u6216\u8005\u5728\u67d0\u4e9b\u7cbe\u7b80\u7248\u5bb9\u5668\u4e2d\u65e0\u6cd5\u8fd0\u884c\u3002<\/p>\n<p>TCPing \u4f5c\u4e3a\u4e00\u4e2a\u5355\u4e8c\u8fdb\u5236\u6587\u4ef6&#xff0c;\u65e0\u9700\u5b89\u88c5\u4f9d\u8d56&#xff0c;\u975e\u5e38\u9002\u5408\u7528\u4e8e\u8f7b\u91cf\u7ea7\u7684\u5065\u5eb7\u5de1\u68c0\u811a\u672c\u3002\u6211\u4eec\u53ef\u4ee5\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684\u5faa\u73af&#xff0c;\u5b9a\u671f\u63a2\u6d4b\u5173\u952e\u4e2d\u95f4\u4ef6\u7684\u7aef\u53e3\u72b6\u6001\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a Bash \u811a\u672c\u7247\u6bb5&#xff0c;\u7528\u4e8e\u68c0\u67e5 Redis \u548c MySQL \u7684\u72b6\u6001&#xff1a;<\/p>\n<p><span class=\"token shebang important\">#!\/bin\/bash<\/span><\/p>\n<p><span class=\"token function-name function\">check_service<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token builtin class-name\">local<\/span> <span class=\"token assign-left variable\">host<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token variable\">$1<\/span><br \/>\n    <span class=\"token builtin class-name\">local<\/span> <span class=\"token assign-left variable\">port<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token variable\">$2<\/span><br \/>\n    <span class=\"token builtin class-name\">local<\/span> <span class=\"token assign-left variable\">name<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token variable\">$3<\/span><\/p>\n<p>    <span class=\"token comment\"># \u5c1d\u8bd5\u8fde\u63a5\u4e00\u6b21&#xff0c;\u8d85\u65f6\u8bbe\u4e3a 2 \u79d2<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> tcping <span class=\"token parameter variable\">-q<\/span> <span class=\"token parameter variable\">-w<\/span> <span class=\"token number\">1<\/span> <span class=\"token variable\">$host<\/span> <span class=\"token variable\">$port<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-q<\/span> <span class=\"token string\">&#034;succeed&#034;<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span><br \/>\n        <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;[OK] <span class=\"token variable\">$name<\/span> (<span class=\"token variable\">$host<\/span>:<span class=\"token variable\">$port<\/span>) is reachable.&#034;<\/span><br \/>\n    <span class=\"token keyword\">else<\/span><br \/>\n        <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;[CRITICAL] <span class=\"token variable\">$name<\/span> (<span class=\"token variable\">$host<\/span>:<span class=\"token variable\">$port<\/span>) connection failed!&#034;<\/span><br \/>\n        <span class=\"token comment\"># \u6b64\u5904\u53ef\u89e6\u53d1\u544a\u8b66\u901a\u77e5<\/span><br \/>\n    <span class=\"token keyword\">fi<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>check_service <span class=\"token string\">&#034;redis-cluster-01&#034;<\/span> <span class=\"token number\">6379<\/span> <span class=\"token string\">&#034;Redis-Master&#034;<\/span><br \/>\ncheck_service <span class=\"token string\">&#034;mysql-slave-02&#034;<\/span> <span class=\"token number\">3306<\/span> <span class=\"token string\">&#034;MySQL-Slave&#034;<\/span><\/p>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u4e0d\u4ec5\u964d\u4f4e\u4e86\u76d1\u63a7\u7cfb\u7edf\u7684\u4fb5\u5165\u6027&#xff0c;\u8fd8\u80fd\u5728\u4e2d\u95f4\u4ef6\u7aef\u53e3\u76d1\u542c\u5f02\u5e38\u4f46\u8fdb\u7a0b\u672a\u9000\u51fa\u7684\u6781\u7aef\u60c5\u51b5\u4e0b&#xff08;\u5982\u6b7b\u9501&#xff09;&#xff0c;\u53ca\u65f6\u53d1\u51fa\u9884\u8b66\u3002<\/p>\n<h3>\u2463 \u8de8\u56fd\u94fe\u8def\u5ef6\u8fdf\u6ce2\u52a8\u7cbe\u51c6\u6d4b\u91cf\u65b9\u6848<\/h3>\n<p>\u5bf9\u4e8e\u51fa\u6d77\u4e1a\u52a1\u6216\u8de8\u56fd\u4f01\u4e1a&#xff0c;\u4e0d\u540c\u5730\u57df\u4e4b\u95f4\u7684\u7f51\u7edc\u94fe\u8def\u8d28\u91cf\u6ce2\u52a8\u662f\u5e38\u6001\u3002\u7531\u4e8e\u56fd\u9645\u51fa\u53e3\u5e26\u5bbd\u7684\u62e5\u585e\u548c\u8fd0\u8425\u5546\u8def\u7531\u7b56\u7565\u7684\u53d8\u5316&#xff0c;\u5ef6\u8fdf\u6296\u52a8\u5f80\u5f80\u975e\u5e38\u5267\u70c8\u3002ICMP \u5305\u5728\u56fd\u9645\u94fe\u8def\u4e0a\u7ecf\u5e38\u88ab\u964d\u6743\u5904\u7406&#xff08;QoS&#xff09;&#xff0c;\u5bfc\u81f4 ping \u503c\u865a\u9ad8&#xff0c;\u65e0\u6cd5\u53cd\u6620\u771f\u5b9e TCP \u4e1a\u52a1&#xff08;\u5982 HTTPS \u8bf7\u6c42&#xff09;\u7684\u5ef6\u8fdf\u60c5\u51b5\u3002<\/p>\n<p>\u5229\u7528 TCPing \u6d4b\u91cf\u8de8\u56fd\u94fe\u8def&#xff0c;\u80fd\u5f97\u5230\u66f4\u8d34\u8fd1\u7528\u6237\u4f53\u9a8c\u7684\u6570\u636e\u3002\u56e0\u4e3a\u5b83\u6a21\u62df\u7684\u662f\u771f\u5b9e\u7684\u4e1a\u52a1\u8fde\u63a5\u8fc7\u7a0b&#xff0c;\u5305\u542b\u4e86 TCP \u63e1\u624b\u7684\u5168\u90e8\u8017\u65f6\u3002\u6211\u4eec\u53ef\u4ee5\u9009\u62e9\u591a\u4e2a\u6d77\u5916\u8282\u70b9\u7684\u76ee\u6807\u7aef\u53e3&#xff08;\u5982 443&#xff09;\u8fdb\u884c\u957f\u671f\u63a2\u6d4b&#xff0c;\u8bb0\u5f55\u5ef6\u8fdf\u5206\u5e03\u3002<\/p>\n<p>\u5728\u5b9e\u9645\u64cd\u4f5c\u4e2d&#xff0c;\u5efa\u8bae\u7ed3\u5408 cron \u5b9a\u65f6\u4efb\u52a1&#xff0c;\u6bcf\u5206\u949f\u6267\u884c\u4e00\u6b21\u63a2\u6d4b\u5e76\u5c06\u7ed3\u679c\u8ffd\u52a0\u5230\u65e5\u5fd7\u6587\u4ef6\u4e2d&#xff0c;\u540e\u7eed\u901a\u8fc7 Grafana \u7b49\u5de5\u5177\u53ef\u89c6\u5316\u5206\u6790\u3002\u91cd\u70b9\u5173\u6ce8 P95 \u548c P99 \u7684\u5ef6\u8fdf\u6570\u503c&#xff0c;\u800c\u975e\u5e73\u5747\u503c&#xff0c;\u56e0\u4e3a\u957f\u5c3e\u5ef6\u8fdf\u624d\u662f\u5bfc\u81f4\u7528\u6237\u8d85\u65f6\u7684\u5143\u51f6\u3002\u5982\u679c\u53d1\u73b0\u67d0\u6761\u7ebf\u8def\u7684 TCP \u5ef6\u8fdf\u663e\u8457\u9ad8\u4e8e ICMP \u5ef6\u8fdf&#xff0c;\u8bf4\u660e\u8be5\u94fe\u8def\u53ef\u80fd\u5b58\u5728\u9488\u5bf9 TCP \u534f\u8bae\u7684\u6574\u5f62\u6216\u5e72\u6270&#xff0c;\u9700\u8981\u53ca\u65f6\u8c03\u6574\u8def\u7531\u7b56\u7565\u6216\u5207\u6362 CDN \u670d\u52a1\u5546\u3002<\/p>\n<h3>\u2464 \u57fa\u4e8e TCPing \u7684\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b0\u6b65\u9aa4<\/h3>\n<p>\u5c06 TCPing \u96c6\u6210\u5230\u81ea\u52a8\u5316\u8fd0\u7ef4\u4f53\u7cfb\u4e2d&#xff0c;\u662f\u5b9e\u73b0\u201c\u81ea\u6108\u201d\u7cfb\u7edf\u7684\u5173\u952e\u4e00\u6b65\u3002\u9664\u4e86\u4e0a\u8ff0\u7684\u624b\u52a8\u8bca\u65ad\u548c\u7b80\u5355\u811a\u672c&#xff0c;\u6211\u4eec\u8fd8\u53ef\u4ee5\u6784\u5efa\u66f4\u590d\u6742\u7684\u903b\u8f91&#xff0c;\u6bd4\u5982\u5f53\u8fde\u7eed N \u6b21\u63a2\u6d4b\u5931\u8d25\u540e&#xff0c;\u81ea\u52a8\u6267\u884c\u91cd\u542f\u670d\u52a1\u6216\u5207\u6362 DNS \u7684\u64cd\u4f5c\u3002<\/p>\n<p>\u5b9e\u73b0\u6b65\u9aa4\u901a\u5e38\u5982\u4e0b&#xff1a;<\/p>\n<li>\u73af\u5883\u51c6\u5907&#xff1a;\u786e\u4fdd\u6240\u6709\u76ee\u6807\u670d\u52a1\u5668\u4e0a\u5df2\u7f16\u8bd1\u597d tcping \u4e8c\u8fdb\u5236\u6587\u4ef6&#xff0c;\u5e76\u8d4b\u4e88\u6267\u884c\u6743\u9650\u3002<\/li>\n<li>\u914d\u7f6e\u5b9a\u4e49&#xff1a;\u4f7f\u7528 JSON \u6216 YAML \u6587\u4ef6\u7ef4\u62a4\u9700\u8981\u76d1\u63a7\u7684\u201c\u4e3b\u673a &#8211; \u7aef\u53e3\u201d\u5217\u8868&#xff0c;\u4fbf\u4e8e\u7edf\u4e00\u7ba1\u7406\u3002<\/li>\n<li>\u903b\u8f91\u7f16\u5199&#xff1a;\u7f16\u5199\u4e3b\u63a7\u5236\u811a\u672c&#xff0c;\u8bfb\u53d6\u914d\u7f6e\u6587\u4ef6&#xff0c;\u5e76\u53d1\u6267\u884c tcping \u547d\u4ee4\u3002\u5229\u7528 shell \u7684\u8fd4\u56de\u503c\u6216\u89e3\u6790 stdout \u6765\u5224\u65ad\u72b6\u6001\u3002<\/li>\n<li>\u52a8\u4f5c\u6267\u884c&#xff1a;\u8bbe\u5b9a\u9608\u503c\u903b\u8f91\u3002\u4f8b\u5982&#xff0c;\u82e5\u8fde\u7eed 3 \u6b21\u63a2\u6d4b\u8d85\u65f6&#xff0c;\u5219\u8c03\u7528 webhook \u63a5\u53e3\u53d1\u9001\u9489\u9489\/\u4f01\u5fae\u544a\u8b66&#xff1b;\u82e5\u8fde\u7eed 10 \u6b21\u5931\u8d25&#xff0c;\u5219\u5c1d\u8bd5\u8c03\u7528\u4e91\u5382\u5546 API \u91cd\u542f\u5b9e\u4f8b\u3002<\/li>\n<li>\u65e5\u5fd7\u5f52\u6863&#xff1a;\u5c06\u6bcf\u6b21\u63a2\u6d4b\u7684\u65f6\u95f4\u6233\u3001IP\u3001\u7aef\u53e3\u3001\u8017\u65f6\u548c\u72b6\u6001\u5199\u5165\u6807\u51c6\u65e5\u5fd7\u683c\u5f0f&#xff08;\u5982 JSON Line&#xff09;&#xff0c;\u65b9\u4fbf\u63a5\u5165 ELK \u6808\u8fdb\u884c\u68c0\u7d22\u5206\u6790\u3002<\/li>\n<p>\u8fd9\u79cd\u81ea\u52a8\u5316\u95ed\u73af\u80fd\u5c06\u88ab\u52a8\u6551\u706b\u8f6c\u53d8\u4e3a\u4e3b\u52a8\u9632\u5fa1&#xff0c;\u7279\u522b\u662f\u5728\u591c\u95f4\u65e0\u4eba\u503c\u5b88\u65f6\u6bb5&#xff0c;\u4ef7\u503c\u5c24\u4e3a\u660e\u663e\u3002<\/p>\n<h3>\u2465 \u9632\u706b\u5899\u7b56\u7565\u9a8c\u8bc1\u4e0e\u7aef\u53e3\u5f00\u653e\u6d4b\u8bd5<\/h3>\n<p>\u5728\u65b0\u4e1a\u52a1\u4e0a\u7ebf\u6216\u7f51\u7edc\u67b6\u6784\u8c03\u6574\u65f6&#xff0c;\u9a8c\u8bc1\u9632\u706b\u5899\u7b56\u7565\u662f\u5426\u6309\u9884\u671f\u751f\u6548\u662f\u4e00\u9879\u7e41\u7410\u4f46\u5fc5\u8981\u7684\u5de5\u4f5c\u3002\u7ba1\u7406\u5458\u5f80\u5f80\u8ba4\u4e3a\u81ea\u5df1\u5df2\u7ecf\u653e\u884c\u4e86\u67d0\u4e2a\u7aef\u53e3&#xff0c;\u4f46\u5b9e\u9645\u6d4b\u8bd5\u65f6\u5374\u53d1\u73b0\u4e0d\u901a&#xff0c;\u539f\u56e0\u53ef\u80fd\u662f\u89c4\u5219\u987a\u5e8f\u9519\u8bef\u3001\u65b9\u5411\u914d\u7f6e\u53cd\u4e86&#xff08;\u5165\u7ad9 vs \u51fa\u7ad9&#xff09;\u6216\u662f\u4e2d\u95f4\u7ecf\u8fc7\u7684\u5176\u4ed6\u5b89\u5168\u8bbe\u5907\u62e6\u622a\u3002<\/p>\n<p>TCPing \u662f\u9a8c\u8bc1\u6b64\u7c7b\u95ee\u9898\u7684\u6700\u4f73\u5de5\u5177\u3002\u5b83\u53ef\u4ee5\u76f4\u63a5\u6a21\u62df\u5ba2\u6237\u7aef\u884c\u4e3a&#xff0c;\u4ece\u5916\u90e8\u5411\u5185\u90e8\u53d1\u8d77\u8fde\u63a5\u6d4b\u8bd5\u3002\u4f8b\u5982&#xff0c;\u4f60\u8981\u786e\u8ba4\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684 3306 \u7aef\u53e3\u662f\u5426\u4ec5\u5bf9\u5185\u7f51\u5f00\u653e&#xff0c;\u53ef\u4ee5\u5728\u5916\u7f51\u673a\u5668\u4e0a\u6267\u884c&#xff1a;<\/p>\n<p>tcping db-server-public-ip <span class=\"token number\">3306<\/span><\/p>\n<p>\u5982\u679c\u663e\u793a\u4e0d\u901a&#xff0c;\u800c\u5728\u5185\u7f51\u673a\u5668\u4e0a\u6d4b\u8bd5\u901a\u7545&#xff0c;\u5219\u8bc1\u660e\u5b89\u5168\u7ec4\u7b56\u7565\u751f\u6548\u6b63\u786e\u3002\u53cd\u4e4b&#xff0c;\u5982\u679c\u5916\u7f51\u4e5f\u80fd\u901a&#xff0c;\u5219\u5b58\u5728\u4e25\u91cd\u7684\u5b89\u5168\u6f0f\u6d1e\u3002\u6b64\u5916&#xff0c;\u5728\u6392\u67e5\u591a\u5c42\u9632\u706b\u5899&#xff08;\u5982 WAF &#043; \u4e3b\u673a\u9632\u706b\u5899 &#043; \u4e91\u5b89\u5168\u7ec4&#xff09;\u65f6&#xff0c;\u901a\u8fc7\u9010\u8df3\u4f7f\u7528 TCPing \u6d4b\u8bd5&#xff0c;\u53ef\u4ee5\u5feb\u901f\u5b9a\u4f4d\u662f\u54ea\u4e00\u5c42\u8bbe\u5907\u963b\u65ad\u4e86\u6d41\u91cf&#xff0c;\u6781\u5927\u5730\u7b80\u5316\u4e86\u7f51\u7edc\u6392\u9519\u8def\u5f84\u3002<\/p>\n<h3>\u2466 \u6e38\u620f\u670d\u52a1\u5668\u8282\u70b9\u8d28\u91cf\u5b9e\u65f6\u8bc4\u4f30\u5e94\u7528<\/h3>\n<p>\u5728\u7ebf\u6e38\u620f\u5bf9\u7f51\u7edc\u5ef6\u8fdf\u548c\u4e22\u5305\u7387\u6781\u5176\u654f\u611f&#xff0c;\u6beb\u79d2\u7ea7\u7684\u5dee\u5f02\u90fd\u53ef\u80fd\u5f71\u54cd\u73a9\u5bb6\u7684\u64cd\u4f5c\u4f53\u9a8c\u3002\u6e38\u620f\u670d\u52a1\u7aef\u901a\u5e38\u5206\u5e03\u5728\u591a\u4e2a\u533a\u57df&#xff0c;\u73a9\u5bb6\u9700\u8981\u8fde\u63a5\u5230\u5ef6\u8fdf\u6700\u4f4e\u7684\u8282\u70b9\u3002\u4f20\u7edf\u7684 ping \u6d4b\u8bd5\u7531\u4e8e\u5bb9\u6613\u88ab\u6e38\u620f\u5382\u5546\u5c4f\u853d\u6216\u65e0\u6cd5\u53cd\u6620 UDP\/TCP \u6df7\u5408\u6d41\u91cf\u7684\u771f\u5b9e\u72b6\u51b5&#xff0c;\u53c2\u8003\u4ef7\u503c\u6709\u9650\u3002<\/p>\n<p>\u6e38\u620f\u8fd0\u8425\u56e2\u961f\u53ef\u4ee5\u5229\u7528 TCPing \u5bf9\u5404\u6e38\u620f\u7f51\u5173\u8282\u70b9\u7684\u7279\u5b9a\u7aef\u53e3&#xff08;\u5982\u767b\u5f55\u670d\u3001\u6218\u6597\u670d\u7aef\u53e3&#xff09;\u8fdb\u884c\u5b9e\u65f6\u8bc4\u4f30\u3002\u901a\u8fc7\u90e8\u7f72\u5728\u4e0d\u540c ISP \u7ebf\u8def\u7684\u63a2\u9488\u8282\u70b9&#xff0c;\u6301\u7eed\u5411\u5404\u4e2a\u6e38\u620f\u670d\u53d1\u8d77 TCP \u8fde\u63a5\u63a2\u6d4b&#xff0c;\u6536\u96c6\u5ef6\u8fdf\u6570\u636e\u3002<\/p>\n<p>\u57fa\u4e8e\u8fd9\u4e9b\u6570\u636e&#xff0c;\u53ef\u4ee5\u6784\u5efa\u667a\u80fd\u8c03\u5ea6\u7cfb\u7edf&#xff1a;\u5f53\u68c0\u6d4b\u5230\u67d0\u533a\u57df\u8282\u70b9\u5ef6\u8fdf\u7a81\u589e\u6216\u4e22\u5305\u4e25\u91cd\u65f6&#xff0c;\u81ea\u52a8\u5728 DNS \u89e3\u6790\u6216\u8d1f\u8f7d\u5747\u8861\u5c42\u9762\u5c06\u8be5\u533a\u57df\u7684\u6d41\u91cf\u7275\u5f15\u81f3\u5907\u7528\u8282\u70b9\u3002\u5bf9\u4e8e\u73a9\u5bb6\u5ba2\u6237\u7aef\u800c\u8a00&#xff0c;\u4e5f\u53ef\u4ee5\u5728\u542f\u52a8\u9636\u6bb5\u5185\u7f6e\u8f7b\u91cf\u7ea7\u7684 TCPing \u903b\u8f91&#xff0c;\u81ea\u52a8\u9009\u62e9\u5f53\u524d\u7f51\u7edc\u73af\u5883\u4e0b\u54cd\u5e94\u6700\u5feb\u7684\u670d\u52a1\u5668\u5217\u8868&#xff0c;\u4ece\u800c\u663e\u8457\u63d0\u5347\u9996\u5c4f\u52a0\u8f7d\u901f\u5ea6\u548c\u64cd\u4f5c\u6d41\u7545\u5ea6\u3002<\/p>\n<h3>\u2467 \u4e91\u8d44\u6e90\u8fc1\u79fb\u524d\u540e\u7684\u7f51\u7edc\u6027\u80fd\u5bf9\u6bd4<\/h3>\n<p>\u5728\u4f01\u4e1a\u4e0a\u4e91\u6216\u4e91\u95f4\u8fc1\u79fb\u7684\u8fc7\u7a0b\u4e2d&#xff0c;\u5982\u4f55\u91cf\u5316\u8bc4\u4f30\u65b0\u73af\u5883\u7684\u7f51\u7edc\u6027\u80fd\u662f\u5426\u8fbe\u6807&#xff0c;\u662f\u4e00\u4e2a\u5e38\u89c1\u96be\u9898\u3002\u4ec5\u4ec5\u5bf9\u6bd4\u5e26\u5bbd\u5927\u5c0f\u662f\u4e0d\u591f\u7684&#xff0c;\u8fde\u63a5\u7684\u5efa\u7acb\u901f\u5ea6\u548c\u7a33\u5b9a\u6027\u540c\u6837\u5173\u952e\u3002<\/p>\n<p>\u5728\u8fc1\u79fb\u5272\u63a5\u7a97\u53e3\u671f&#xff0c;\u53ef\u4ee5\u5229\u7528 TCPing \u8fdb\u884c\u201c\u53cc\u5199\u201d\u6216\u201c\u5e76\u884c\u201d\u6d4b\u8bd5\u3002\u4fdd\u6301\u65e7\u73af\u5883\u548c\u65b0\u73af\u5883\u540c\u65f6\u8fd0\u884c&#xff0c;\u4ece\u6838\u5fc3\u4e1a\u52a1\u533a\u5411\u4e24\u8fb9\u7684\u76f8\u540c\u670d\u52a1\u7aef\u53e3\u53d1\u8d77\u9ad8\u9891\u63a2\u6d4b\u3002\u8bb0\u5f55\u4e24\u8005\u5728\u76f8\u540c\u65f6\u95f4\u6bb5\u5185\u7684\u5e73\u5747\u5ef6\u8fdf\u3001\u6700\u5927\u5ef6\u8fdf\u6296\u52a8\u4ee5\u53ca\u8fde\u63a5\u6210\u529f\u7387\u3002<\/p>\n<p>\u5982\u679c\u65b0\u73af\u5883\u7684 TCP \u63e1\u624b\u8017\u65f6\u660e\u663e\u9ad8\u4e8e\u65e7\u73af\u5883&#xff0c;\u53ef\u80fd\u610f\u5473\u7740\u65b0 VPC \u7684\u8def\u7531\u8868\u914d\u7f6e\u590d\u6742\u3001 NAT \u7f51\u5173\u6027\u80fd\u74f6\u9888\u6216\u662f\u5e95\u5c42\u7269\u7406\u94fe\u8def\u5b58\u5728\u95ee\u9898\u3002\u8fd9\u79cd\u57fa\u4e8e\u771f\u5b9e\u7aef\u53e3\u8fde\u63a5\u7684\u5bf9\u6bd4\u6570\u636e&#xff0c;\u6bd4\u5355\u7eaf\u7684\u5e26\u5bbd\u6d4b\u901f\u66f4\u5177\u8bf4\u670d\u529b&#xff0c;\u80fd\u4e3a\u662f\u5426\u6b63\u5f0f\u5272\u63a5\u63d0\u4f9b\u575a\u5b9e\u7684\u51b3\u7b56\u4f9d\u636e&#xff0c;\u907f\u514d\u76f2\u76ee\u8fc1\u79fb\u5bfc\u81f4\u7684\u4e1a\u52a1\u964d\u7ea7\u3002<\/p>\n<h3>\u2468 \u6784\u5efa\u6301\u7eed\u96c6\u6210\u4e2d\u7684\u7f51\u7edc\u4f9d\u8d56\u68c0\u67e5\u73af\u8282<\/h3>\n<p>\u5728 CI\/CD \u6d41\u6c34\u7ebf\u4e2d&#xff0c;\u6784\u5efa\u4efb\u52a1\u5f80\u5f80\u5f3a\u4f9d\u8d56\u4e8e\u5916\u90e8\u7f51\u7edc\u8d44\u6e90&#xff0c;\u5982 Maven \u4ed3\u5e93\u3001NPM \u6e90\u3001Docker Registry \u6216\u5185\u90e8\u7684 Artifactory\u3002\u5f88\u591a\u65f6\u5019&#xff0c;\u6784\u5efa\u5931\u8d25\u5e76\u975e\u4ee3\u7801\u95ee\u9898&#xff0c;\u800c\u662f\u6784\u5efa\u8282\u70b9\u4e0e\u4f9d\u8d56\u6e90\u4e4b\u95f4\u7684\u7f51\u7edc\u8fde\u901a\u6027\u51fa\u73b0\u4e86\u6ce2\u52a8\u3002<\/p>\n<p>\u53ef\u4ee5\u5728\u6d41\u6c34\u7ebf\u7684\u9884\u5904\u7406\u9636\u6bb5&#xff08;Pre-check&#xff09;\u52a0\u5165 TCPing \u68c0\u67e5\u73af\u8282\u3002\u5728\u8fd0\u884c mvn install \u6216 docker build \u4e4b\u524d&#xff0c;\u5148\u811a\u672c\u5316\u5730\u63a2\u6d4b\u5173\u952e\u4f9d\u8d56\u6e90\u7684\u7aef\u53e3\u8fde\u901a\u6027\u3002<\/p>\n<p><span class=\"token comment\"># GitLab CI \u793a\u4f8b\u7247\u6bb5<\/span><br \/>\n<span class=\"token key atrule\">before_script<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token punctuation\">&#8211;<\/span> echo &#034;Checking network dependencies<span class=\"token punctuation\">&#8230;<\/span>&#034;<br \/>\n  <span class=\"token punctuation\">&#8211;<\/span> tcping <span class=\"token punctuation\">&#8211;<\/span>q <span class=\"token punctuation\">&#8211;<\/span>w 2 repo.internal.com 8081 <span class=\"token punctuation\">|<\/span><span class=\"token punctuation\">|<\/span> exit 1<br \/>\n  <span class=\"token punctuation\">&#8211;<\/span> tcping <span class=\"token punctuation\">&#8211;<\/span>q <span class=\"token punctuation\">&#8211;<\/span>w 2 registry.docker.com 443 <span class=\"token punctuation\">|<\/span><span class=\"token punctuation\">|<\/span> exit 1<\/p>\n<p>\u5982\u679c\u63a2\u6d4b\u5931\u8d25&#xff0c;\u6d41\u6c34\u7ebf\u76f4\u63a5\u7ec8\u6b62\u5e76\u629b\u51fa\u660e\u786e\u7684\u201c\u7f51\u7edc\u4f9d\u8d56\u4e0d\u53ef\u8fbe\u201d\u9519\u8bef&#xff0c;\u800c\u4e0d\u662f\u8ba9\u6784\u5efa\u8fc7\u7a0b\u8dd1\u4e86\u4e00\u534a\u624d\u56e0\u62c9\u53d6\u8d85\u65f6\u800c\u5931\u8d25\u3002\u8fd9\u4e0d\u4ec5\u8282\u7701\u4e86\u6602\u8d35\u7684\u8ba1\u7b97\u8d44\u6e90&#xff0c;\u4e5f\u8ba9\u5f00\u53d1\u4eba\u5458\u80fd\u7b2c\u4e00\u65f6\u95f4\u610f\u8bc6\u5230\u662f\u7f51\u7edc\u73af\u5883\u95ee\u9898&#xff0c;\u800c\u975e\u53bb\u6000\u7591\u81ea\u5df1\u7684\u4ee3\u7801\u903b\u8f91\u3002<\/p>\n<h3>\u2469 \u4f01\u4e1a\u7ea7\u7f51\u7edc\u76d1\u63a7\u5927\u5c4f\u6570\u636e\u6e90\u63a5\u5165\u5b9e\u8df5<\/h3>\n<p>\u5bf9\u4e8e\u62e5\u6709\u5927\u89c4\u6a21\u57fa\u7840\u8bbe\u65bd\u7684\u4f01\u4e1a&#xff0c;\u6784\u5efa\u7edf\u4e00\u7684\u7f51\u7edc\u76d1\u63a7\u5927\u5c4f\u662f\u8fd0\u7ef4\u53ef\u89c6\u5316\u7684\u91cd\u8981\u4e00\u73af\u3002TCPing \u4ea7\u751f\u7684\u7ed3\u6784\u5316\u6570\u636e\u662f\u6781\u4f73\u7684\u6307\u6807\u6765\u6e90\u3002<\/p>\n<p>\u5b9e\u8df5\u601d\u8def\u662f\u5c06\u5206\u6563\u5728\u5404\u5904\u7684 TCPing \u63a2\u6d4b\u811a\u672c\u7edf\u4e00\u5c01\u88c5\u4e3a Exporter \u6a21\u5f0f\u3002\u7f16\u5199\u4e00\u4e2a\u5c0f\u578b\u5b88\u62a4\u8fdb\u7a0b&#xff0c;\u5b9a\u671f\u6267\u884c TCPing \u4efb\u52a1&#xff0c;\u5e76\u5c06\u7ed3\u679c\u8f6c\u6362\u4e3a Prometheus \u683c\u5f0f\u7684 Metrics \u66b4\u9732\u51fa\u6765\u3002\u6307\u6807\u53ef\u4ee5\u8bbe\u8ba1\u4e3a tcping_duration_seconds{target&#061;&#034;ip&#034;, port&#061;&#034;80&#034;} \u548c tcping_success_total{target&#061;&#034;ip&#034;, port&#061;&#034;80&#034;}\u3002<\/p>\n<p>\u968f\u540e&#xff0c;Prometheus Server \u6293\u53d6\u8fd9\u4e9b\u6307\u6807&#xff0c;\u5b58\u5165\u65f6\u5e8f\u6570\u636e\u5e93\u3002\u5728 Grafana \u5927\u5c4f\u4e0a&#xff0c;\u4e0d\u4ec5\u53ef\u4ee5\u7ed8\u5236\u5b9e\u65f6\u7684\u5ef6\u8fdf\u66f2\u7ebf\u56fe&#xff0c;\u8fd8\u53ef\u4ee5\u5229\u7528\u70ed\u529b\u56fe\u5c55\u793a\u5168\u7f51\u7aef\u53e3\u7684\u5065\u5eb7\u72b6\u6001\u5206\u5e03\u3002\u4e00\u65e6\u67d0\u533a\u57df\u51fa\u73b0\u5927\u9762\u79ef\u7ea2\u8272&#xff08;\u9ad8\u5ef6\u8fdf\u6216\u4e0d\u53ef\u8fbe&#xff09;&#xff0c;\u503c\u73ed\u4eba\u5458\u80fd\u5728\u5927\u5c4f\u4e0a\u4e00\u76ee\u4e86\u7136\u5730\u5b9a\u4f4d\u6545\u969c\u8303\u56f4\u3002\u8fd9\u79cd\u67b6\u6784\u65e2\u5229\u7528\u4e86 TCPing \u7684\u7cbe\u51c6\u6027&#xff0c;\u53c8\u878d\u5165\u4e86\u73b0\u4ee3\u5316\u76d1\u63a7\u4f53\u7cfb\u7684\u751f\u6001&#xff0c;\u5b9e\u73b0\u4e86\u4ece\u5355\u70b9\u5de5\u5177\u5230\u5168\u5c40\u89c6\u91ce\u7684\u5347\u534e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u65e5\u5e38\u8fd0\u7ef4\u548c\u5f00\u53d1\u5de5\u4f5c\u4e2d&#xff0c;\u6211\u4eec\u5e38\u5e38\u9047\u5230\u8fd9\u6837\u7684\u5c34\u5c2c\u573a\u666f&#xff1a;\u660e\u660e\u670d\u52a1\u5668\u80fd ping \u901a&#xff0c;\u4f46\u4e1a\u52a1\u7aef\u53e3\u5c31\u662f\u8fde\u4e0d\u4e0a&#xff1b;\u6216\u8005\u5728\u590d\u6742\u7684\u5fae\u670d\u52a1\u67b6\u6784\u4e2d&#xff0c;\u67d0\u4e2a\u4e2d\u95f4\u4ef6\u7a81\u7136\u201c\u5931\u8054\u201d&#xff0c;\u4f20\u7edf\u7684 ICMP \u63a2\u6d4b\u5374\u663e\u793a\u4e00\u5207\u6b63\u5e38\u3002\u8fd9\u79cd\u201c\u5047\u6027\u8fde\u901a\u201d\u5f80\u5f80\u8ba9\u6392\u67e5\u5de5\u4f5c\u9677\u5165\u50f5\u5c40&#xff0c;\u5c24\u5176\u662f\u5728\u7535\u5546\u5927\u4fc3\u3001\u6e38\u620f\u5f00\u670d\u7b49\u5bf9\u7f51\u7edc\u7a33\u5b9a\u6027\u8981\u6c42\u6781\u9ad8\u7684\u65f6\u523b&#xff0c;\u51e0\u5206\u949f\u7684\u8bef\u5224\u90fd\u53ef\u80fd\u5bfc\u81f4\u5de8\u5927\u7684\u4e1a\u52a1\u635f\u5931\u3002<br \/>\n\u5176\u5b9e&#xff0c;\u95ee\u9898\u7684\u6839\u6e90\u5728\u4e8e\u6211\u4eec\u8fc7<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[230,78,395],"topic":[],"class_list":["post-87880","post","type-post","status-publish","format-standard","hentry","category-server","tag-php","tag-78","tag-395"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>KKCE.COM\uff1aTCPing \u7f51\u7edc\u68c0\u6d4b\u4ece\u6545\u969c\u5b9a\u4f4d\u5230\u81ea\u52a8\u5316\u76d1\u63a7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/87880.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"KKCE.COM\uff1aTCPing \u7f51\u7edc\u68c0\u6d4b\u4ece\u6545\u969c\u5b9a\u4f4d\u5230\u81ea\u52a8\u5316\u76d1\u63a7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u5728\u65e5\u5e38\u8fd0\u7ef4\u548c\u5f00\u53d1\u5de5\u4f5c\u4e2d&#xff0c;\u6211\u4eec\u5e38\u5e38\u9047\u5230\u8fd9\u6837\u7684\u5c34\u5c2c\u573a\u666f&#xff1a;\u660e\u660e\u670d\u52a1\u5668\u80fd ping \u901a&#xff0c;\u4f46\u4e1a\u52a1\u7aef\u53e3\u5c31\u662f\u8fde\u4e0d\u4e0a&#xff1b;\u6216\u8005\u5728\u590d\u6742\u7684\u5fae\u670d\u52a1\u67b6\u6784\u4e2d&#xff0c;\u67d0\u4e2a\u4e2d\u95f4\u4ef6\u7a81\u7136\u201c\u5931\u8054\u201d&#xff0c;\u4f20\u7edf\u7684 ICMP \u63a2\u6d4b\u5374\u663e\u793a\u4e00\u5207\u6b63\u5e38\u3002\u8fd9\u79cd\u201c\u5047\u6027\u8fde\u901a\u201d\u5f80\u5f80\u8ba9\u6392\u67e5\u5de5\u4f5c\u9677\u5165\u50f5\u5c40&#xff0c;\u5c24\u5176\u662f\u5728\u7535\u5546\u5927\u4fc3\u3001\u6e38\u620f\u5f00\u670d\u7b49\u5bf9\u7f51\u7edc\u7a33\u5b9a\u6027\u8981\u6c42\u6781\u9ad8\u7684\u65f6\u523b&#xff0c;\u51e0\u5206\u949f\u7684\u8bef\u5224\u90fd\u53ef\u80fd\u5bfc\u81f4\u5de8\u5927\u7684\u4e1a\u52a1\u635f\u5931\u3002 \u5176\u5b9e&#xff0c;\u95ee\u9898\u7684\u6839\u6e90\u5728\u4e8e\u6211\u4eec\u8fc7\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/87880.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-30T19:48:24+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/87880.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/87880.html\",\"name\":\"KKCE.COM\uff1aTCPing \u7f51\u7edc\u68c0\u6d4b\u4ece\u6545\u969c\u5b9a\u4f4d\u5230\u81ea\u52a8\u5316\u76d1\u63a7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-30T19:48:24+00:00\",\"dateModified\":\"2026-07-30T19:48:24+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/87880.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/87880.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/87880.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"KKCE.COM\uff1aTCPing \u7f51\u7edc\u68c0\u6d4b\u4ece\u6545\u969c\u5b9a\u4f4d\u5230\u81ea\u52a8\u5316\u76d1\u63a7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"KKCE.COM\uff1aTCPing \u7f51\u7edc\u68c0\u6d4b\u4ece\u6545\u969c\u5b9a\u4f4d\u5230\u81ea\u52a8\u5316\u76d1\u63a7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/87880.html","og_locale":"zh_CN","og_type":"article","og_title":"KKCE.COM\uff1aTCPing \u7f51\u7edc\u68c0\u6d4b\u4ece\u6545\u969c\u5b9a\u4f4d\u5230\u81ea\u52a8\u5316\u76d1\u63a7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u5728\u65e5\u5e38\u8fd0\u7ef4\u548c\u5f00\u53d1\u5de5\u4f5c\u4e2d&#xff0c;\u6211\u4eec\u5e38\u5e38\u9047\u5230\u8fd9\u6837\u7684\u5c34\u5c2c\u573a\u666f&#xff1a;\u660e\u660e\u670d\u52a1\u5668\u80fd ping \u901a&#xff0c;\u4f46\u4e1a\u52a1\u7aef\u53e3\u5c31\u662f\u8fde\u4e0d\u4e0a&#xff1b;\u6216\u8005\u5728\u590d\u6742\u7684\u5fae\u670d\u52a1\u67b6\u6784\u4e2d&#xff0c;\u67d0\u4e2a\u4e2d\u95f4\u4ef6\u7a81\u7136\u201c\u5931\u8054\u201d&#xff0c;\u4f20\u7edf\u7684 ICMP \u63a2\u6d4b\u5374\u663e\u793a\u4e00\u5207\u6b63\u5e38\u3002\u8fd9\u79cd\u201c\u5047\u6027\u8fde\u901a\u201d\u5f80\u5f80\u8ba9\u6392\u67e5\u5de5\u4f5c\u9677\u5165\u50f5\u5c40&#xff0c;\u5c24\u5176\u662f\u5728\u7535\u5546\u5927\u4fc3\u3001\u6e38\u620f\u5f00\u670d\u7b49\u5bf9\u7f51\u7edc\u7a33\u5b9a\u6027\u8981\u6c42\u6781\u9ad8\u7684\u65f6\u523b&#xff0c;\u51e0\u5206\u949f\u7684\u8bef\u5224\u90fd\u53ef\u80fd\u5bfc\u81f4\u5de8\u5927\u7684\u4e1a\u52a1\u635f\u5931\u3002 \u5176\u5b9e&#xff0c;\u95ee\u9898\u7684\u6839\u6e90\u5728\u4e8e\u6211\u4eec\u8fc7","og_url":"https:\/\/www.wsisp.com\/helps\/87880.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-30T19:48:24+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/87880.html","url":"https:\/\/www.wsisp.com\/helps\/87880.html","name":"KKCE.COM\uff1aTCPing \u7f51\u7edc\u68c0\u6d4b\u4ece\u6545\u969c\u5b9a\u4f4d\u5230\u81ea\u52a8\u5316\u76d1\u63a7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-30T19:48:24+00:00","dateModified":"2026-07-30T19:48:24+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/87880.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/87880.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/87880.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"KKCE.COM\uff1aTCPing \u7f51\u7edc\u68c0\u6d4b\u4ece\u6545\u969c\u5b9a\u4f4d\u5230\u81ea\u52a8\u5316\u76d1\u63a7"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/87880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=87880"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/87880\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=87880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=87880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=87880"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=87880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}