{"id":961,"date":"2026-08-21T07:04:07","date_gmt":"2026-08-20T23:04:07","guid":{"rendered":"http:\/\/www.tantan.ink\/index.php\/2026\/08\/21\/%e7%94%a8-netwatch-%e7%bb%99%e5%ae%b6%e9%87%8c%e5%ae%bd%e5%b8%a6%e5%81%9a%e4%b8%80%e4%bb%bd%e9%95%bf%e6%9c%9f%e4%bd%93%e6%a3%80%e6%a1%a3%e6%a1%88\/"},"modified":"2026-08-21T07:04:07","modified_gmt":"2026-08-20T23:04:07","slug":"%e7%94%a8-netwatch-%e7%bb%99%e5%ae%b6%e9%87%8c%e5%ae%bd%e5%b8%a6%e5%81%9a%e4%b8%80%e4%bb%bd%e9%95%bf%e6%9c%9f%e4%bd%93%e6%a3%80%e6%a1%a3%e6%a1%88","status":"publish","type":"post","link":"https:\/\/www.tantan.ink\/index.php\/2026\/08\/21\/%e7%94%a8-netwatch-%e7%bb%99%e5%ae%b6%e9%87%8c%e5%ae%bd%e5%b8%a6%e5%81%9a%e4%b8%80%e4%bb%bd%e9%95%bf%e6%9c%9f%e4%bd%93%e6%a3%80%e6%a1%a3%e6%a1%88\/","title":{"rendered":"\u7528 NetWatch \u7ed9\u5bb6\u91cc\u5bbd\u5e26\u505a\u4e00\u4efd\u957f\u671f\u4f53\u68c0\u6863\u6848"},"content":{"rendered":"<p>\u5bb6\u91cc\u5bbd\u5e26\u5230\u5e95\u7a33\u4e0d\u7a33\uff0c\u5149\u770b\u8fd0\u8425\u5546\u7684\u6807\u79f0\u6570\u5b57\u6ca1\u7528\u3002\u665a\u9ad8\u5cf0\u6389\u901f\u3001\u6253\u6e38\u620f\u7a81\u7136\u8df3 ping\u3001\u67d0\u53f0\u8bbe\u5907\u5077\u5077\u5360\u6ee1\u4e0a\u884c\u2014\u2014\u8fd9\u4e9b\u53ea\u6709\u5728\u4f60\u81ea\u5df1\u7684\u7f51\u7edc\u91cc\u957f\u671f\u8bb0\u5f55\u624d\u80fd\u770b\u51fa\u6765\u3002\u6700\u8fd1\u8bd5\u4e86\u4e00\u4e2a\u53eb <strong>NetWatch<\/strong> \u7684\u5c0f\u5de5\u5177\uff0c\u5b83\u5c31\u5e72\u4e00\u4ef6\u4e8b\uff1a\u5b9a\u65f6\u8dd1\u6d4b\u901f\u3001\u6d4b\u7f13\u51b2\u81a8\u80c0\uff08bufferbloat\uff09\u3001\u987a\u5e26\u628a\u5185\u7f51\u8bbe\u5907\u7684\u5c40\u57df\u7f51\u901f\u5ea6\u4e5f\u753b\u51fa\u6765\uff0c\u5168\u5b58\u672c\u5730 SQLite\uff0c\u4e0d\u4f9d\u8d56\u4efb\u4f55\u5916\u90e8\u8d26\u53f7\u3002<\/p>\n<p>\u5b83\u6ca1\u6709\u5927\u5382\u80cc\u4e66\uff0cGitHub \u4e0a star \u6570\u8fd8\u5f88\u5c11\uff0c\u5c5e\u4e8e\u4e2a\u4eba\u5f00\u53d1\u8005\u8ba4\u771f\u7ef4\u62a4\u7684\u5c0f\u800c\u7f8e\u9879\u76ee\u3002\u4f46\u5bf9\u5bb6\u5ead\u7f51\u7edc\u7528\u6237\u6765\u8bf4\uff0c\u529f\u80fd\u521a\u597d\u5361\u5728\u75db\u70b9\u4e0a\u4e86\u3002<\/p>\n<h2>\u662f\u4ec0\u4e48<\/h2>\n<p>NetWatch \u662f\u4e00\u4e2a\u7528 Python\uff08Flask\uff09\u5199\u7684\u81ea\u6258\u7ba1\u7f51\u7edc\u6027\u80fd\u76d1\u63a7\u9762\u677f\u3002\u6838\u5fc3\u80fd\u529b\u5206\u4e24\u5757\uff1a<\/p>\n<ul>\n<li><strong>\u5916\u7f51\u6027\u80fd<\/strong>\uff1a\u96c6\u6210 Ookla \u5b98\u65b9\u6d4b\u901f CLI\uff0c\u81ea\u52a8\u4e0b\u8f7d\u5bf9\u5e94\u67b6\u6784\u7684\u4e8c\u8fdb\u5236\uff1b\u6d4b\u4e0b\u884c\/\u4e0a\u884c\/\u7a7a\u95f2\u5ef6\u8fdf\/\u6296\u52a8\uff0c\u4ee5\u53ca&#8221;\u52a0\u8f7d\u5ef6\u8fdf&#8221;\uff08\u4e0a\u884c\u6216\u4e0b\u884c\u6253\u6ee1\u65f6\u7684\u5ef6\u8fdf\uff09\u3002<\/li>\n<li><strong>\u7f13\u51b2\u81a8\u80c0\u68c0\u6d4b<\/strong>\uff1a\u57fa\u4e8e iperf3 \u5728\u94fe\u8def\u6ee1\u8f7d\u65f6\u6d4b\u5ef6\u8fdf\u53d8\u5316\u2014\u2014\u8fd9\u662f\u5224\u65ad&#8221;\u4e3a\u4ec0\u4e48\u4e00\u4e0b\u8f7d\u4e1c\u897f\u6e38\u620f\u5c31\u5361&#8221;\u7684\u5173\u952e\u6307\u6807\u3002<\/li>\n<li><strong>Homenet \u5185\u7f51\u76d1\u63a7<\/strong>\uff1a\u5185\u7f6e\u4e00\u4e2a\u5c40\u57df\u7f51\u6d4b\u901f\u670d\u52a1\u7aef\uff0c\u901a\u8fc7 ARP\/ping \u53d1\u73b0\u8bbe\u5907\uff0c\u6309\u6709\u7ebf\/\u65e0\u7ebf\u5206\u522b\u7edf\u8ba1\u6bcf\u53f0\u8bbe\u5907\u7684\u901f\u5ea6\u5386\u53f2\u548c\u5230\u7f51\u5173\u7684\u5ef6\u8fdf\u3002<\/li>\n<\/ul>\n<p>\u6570\u636e\u7528 Chart.js \u753b\u6210\u65f6\u95f4\u5e8f\u5217\u56fe\uff0c\u652f\u6301 24 \u5c0f\u65f6\u30017 \u5929\u300130 \u5929\u548c\u81ea\u5b9a\u4e49\u533a\u95f4\uff0c\u8fd8\u6709\u5168\u5c40\u65f6\u95f4\u8f74\u6ed1\u5757\u80fd\u628a\u6240\u6709\u56fe\u8868\u5bf9\u9f50\u5230\u540c\u4e00\u7a97\u53e3\u3002UI \u662f\u6df1\u8272\u73bb\u7483\u62df\u6001\u98ce\u683c\uff0c\u79fb\u52a8\u7aef\u4e5f\u80fd\u770b\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/netwatch_img1-scaled.jpg\" alt=\"dashboard\" \/><\/p>\n<h2>\u4e3a\u4ec0\u4e48\u503c\u5f97\u6298\u817e<\/h2>\n<p>\u5e38\u89c1\u7684\u6d4b\u901f\u662f\u4e00\u6b21\u6027\u52a8\u4f5c\uff1a\u6253\u5f00\u7f51\u9875\u70b9\u4e00\u4e0b\uff0c\u770b\u5b8c\u5c31\u5fd8\u3002\u7f51\u7edc\u7684\u6bdb\u75c5\u5f80\u5f80\u662f<strong>\u5076\u53d1\u4e14\u65f6\u6bb5\u76f8\u5173<\/strong>\u7684\u2014\u2014\u6bd4\u5982\u6bcf\u5929 20:00-22:00 \u4e0b\u884c\u6389 30%\u3001\u5468\u672b\u4e0a\u5348\u7f13\u51b2\u81a8\u80c0\u7206\u8868\u3002\u8fd9\u4e9b\u53ea\u6709\u628a\u6d4b\u91cf\u53d8\u6210\u957f\u671f\u540e\u53f0\u4efb\u52a1\u624d\u80fd\u6293\u5230\u3002<\/p>\n<p>NetWatch \u7684\u8c03\u5ea6\u5668\u6709\u4e09\u79cd\u6a21\u5f0f\uff1a\u7b80\u5355\uff08\u56fa\u5b9a\u95f4\u9694 24\/7 \u8dd1\uff09\u3001\u6309\u661f\u671f\uff08\u9009\u7279\u5b9a\u5de5\u4f5c\u65e5\u548c\u65f6\u95f4\u7a97\uff09\u3001\u9ad8\u7ea7\uff08\u6bcf\u5929\u591a\u4e2a\u65f6\u95f4\u6bb5\uff09\u3002\u914d\u7f6e\u5b58\u5728\u670d\u52a1\u7aef\uff0c\u591a\u8bbe\u5907\u8bbf\u95ee\u540c\u6b65\u3002\u914d\u5408 CSV \u5bfc\u51fa\uff0c\u4f60\u751a\u81f3\u53ef\u4ee5\u62ff\u53bb\u753b\u81ea\u5df1\u7684&#8221;\u5bbd\u5e26\u5065\u5eb7\u5468\u62a5&#8221;\u3002<\/p>\n<p>\u53e6\u4e00\u5757 Homenet \u5bf9\u8f6f\u8def\u7531\/NAS \u73a9\u5bb6\u5b9e\u7528\uff1a\u5b83\u80fd\u5217\u51fa\u5c40\u57df\u7f51\u91cc\u6240\u6709\u88ab\u53d1\u73b0\u8bbe\u5907\u7684\u5386\u53f2\u901f\u5ea6\uff0c\u8c01\u5728\u5077\u5077\u62a2\u5e26\u5bbd\u4e00\u76ee\u4e86\u7136\uff0c\u800c\u4e14\u6d4b\u91cf\u5168\u5728\u672c\u5730\u5b8c\u6210\uff0c\u6570\u636e\u4e0d\u51fa\u95e8\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/netwatch_img2.jpg\" alt=\"charts\" \/><\/p>\n<h2>\u600e\u4e48\u90e8\u7f72<\/h2>\n<p>\u5b98\u65b9\u7ed9\u4e86\u4e00\u952e\u811a\u672c\u548c\u624b\u52a8\u4e24\u79cd\u65b9\u5f0f\uff0c\u6211\u8d70\u7684\u662f\u624b\u52a8 venv\uff0c\u66f4\u53ef\u63a7\u3002\u73af\u5883\u8981\u6c42 Python 3.10+\u3001pip\uff0cbufferbloat \u6d4b\u8bd5\u53ef\u9009\u88c5 iperf3\u3002<\/p>\n<pre><code>git clone https:\/\/github.com\/c4g7-dev\/netwatch.git\ncd netwatch\npython3 -m venv .venv\nsource .venv\/bin\/activate\npip install -r requirements.txt\npython main.py<\/code><\/pre>\n<p>\u9996\u6b21\u8fd0\u884c\u4f1a\u81ea\u52a8\u4e0b\u8f7d Ookla \u6d4b\u901f\u4e8c\u8fdb\u5236\uff0c\u9762\u677f\u8d77\u5728 <strong>http:\/\/localhost:8000<\/strong>\u3002\u8981\u5e38\u9a7b\u540e\u53f0\uff0c\u5b98\u65b9\u63d0\u4f9b\u4e86 systemd \u5355\u5143\u793a\u4f8b\uff1a<\/p>\n<pre><code>[Unit]\nDescription=NetWatch - Network Performance Monitor\nAfter=network.target\n\n[Service]\nType=simple\nUser=\u4f60\u7684\u7528\u6237\u540d\nWorkingDirectory=\/path\/to\/netwatch\nEnvironment=\"PATH=\/path\/to\/netwatch\/.venv\/bin\"\nExecStart=\/path\/to\/netwatch\/.venv\/bin\/python main.py\nRestart=always\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target<\/code><\/pre>\n<p>\u653e\u597d\u6587\u4ef6\u540e <code>systemctl daemon-reload &amp;&amp; systemctl enable --now netwatch<\/code> \u5373\u53ef\u3002\u5b83\u652f\u6301 x86_64\u3001ARM64\uff08\u6811\u8393\u6d3e 4\/5\u3001ARM \u5c0f\u4e3b\u673a\u90fd\u884c\uff09\u3001\u751a\u81f3 32 \u4f4d ARM\uff0c\u67b6\u6784\u4f1a\u81ea\u52a8\u63a2\u6d4b\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/netwatch_homenet1.jpg\" alt=\"homenet\" \/><\/p>\n<h2>\u6709\u4ec0\u4e48\u5751<\/h2>\n<ul>\n<li><strong>\u6d4b\u901f\u6e90\u662f Ookla<\/strong>\uff1a\u7ed3\u679c\u53d6\u51b3\u4e8e\u4f60\u5230\u6700\u8fd1\u6d4b\u901f\u8282\u70b9\u7684\u94fe\u8def\uff0c\u8f6f\u8def\u7531\u5982\u679c\u8d70\u4e86\u4ee3\u7406\uff0c\u6d4b\u51fa\u6765\u7684\u662f\u4ee3\u7406\u51fa\u53e3\u901f\u5ea6\u800c\u4e0d\u662f\u771f\u5b9e\u5bbd\u5e26\u3002\u9700\u8981\u8ba9\u6d4b\u901f\u6d41\u91cf\u8d70\u76f4\u8fde\uff0c\u5426\u5219\u6570\u636e\u4f1a\u5931\u771f\u3002<\/li>\n<li><strong>bufferbloat \u4f9d\u8d56\u516c\u5171 iperf3 \u670d\u52a1\u5668<\/strong>\uff1a\u9ed8\u8ba4\u914d\u7f6e\u91cc\u586b\u7684\u662f\u793a\u4f8b\u5730\u5740\uff0c\u5f97\u81ea\u5df1\u6362\u6210\u9760\u8c31\u7684\u3001\u79bb\u4f60\u8fd1\u7684\u670d\u52a1\u5668\uff0c\u5426\u5219\u5ef6\u8fdf\u6d4b\u91cf\u6ca1\u610f\u4e49\u3002README \u91cc\u8fd9\u90e8\u5206\u9700\u8981\u624b\u52a8\u6539 config.yaml\u3002<\/li>\n<li><strong>Homenet \u7684\u5185\u7f51\u6d4b\u901f\u670d\u52a1\u7aef\u8dd1\u5728 5201 \u7aef\u53e3<\/strong>\uff1a\u5982\u679c\u5c40\u57df\u7f51\u91cc\u5df2\u7ecf\u6709\u522b\u7684 iperf3 \u5b9e\u4f8b\u6216\u7aef\u53e3\u51b2\u7a81\uff0c\u5f97\u907f\u5f00\u3002<\/li>\n<li><strong>\u8fd8\u662f\u65e9\u671f\u9879\u76ee<\/strong>\uff1a\u7248\u672c\u505c\u5728 v1.3.x\uff0c\u4f5c\u8005\u66f4\u65b0\u4e0d\u9891\u7e41\uff0cissue \u54cd\u5e94\u901f\u5ea6\u672a\u77e5\u3002\u751f\u4ea7\u7528\u5efa\u8bae\u9501\u5b9a\u5f53\u524d commit\uff0c\u522b\u76f2\u76ee\u8ffd\u65b0\u3002<\/li>\n<li><strong>\u6ca1\u6709\u5185\u7f6e\u9274\u6743<\/strong>\uff1a\u9762\u677f\u9ed8\u8ba4\u76d1\u542c 0.0.0.0:8000\uff0c\u5982\u679c\u66b4\u9732\u5230\u516c\u7f51\u7b49\u4e8e\u628a\u4f60\u7684\u7f51\u7edc\u62d3\u6251\u516c\u5f00\u3002\u53ea\u5728\u5c40\u57df\u7f51\u8bbf\u95ee\uff0c\u6216\u7528\u53cd\u4ee3\u52a0\u4e00\u5c42 basic auth \/ \u653e\u5185\u7f51\u7a7f\u900f\u540e\u9762\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"http:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/netwatch_homenet2.jpg\" alt=\"homenet2\" \/><\/p>\n<h2>\u5c0f\u7ed3<\/h2>\n<p>NetWatch \u4e0d\u662f\u4f01\u4e1a\u7ea7\u76d1\u63a7\uff08\u90a3\u6709 Netdata\u3001Prometheus \u4e00\u6574\u5957\uff09\uff0c\u5b83\u7684\u4ef7\u503c\u5728\u4e8e<strong>\u6781\u4f4e\u7684\u90e8\u7f72\u6210\u672c\u548c\u6070\u597d\u591f\u7528\u7684\u5bb6\u5ead\u89c6\u89d2<\/strong>\uff1a\u4e00\u4e2a venv\u3001\u4e00\u4e2a systemd \u670d\u52a1\u3001\u4e00\u4e2a SQLite \u6587\u4ef6\uff0c\u5c31\u80fd\u7ed9\u4f60\u5bb6\u5bbd\u5e26\u505a\u957f\u8fbe\u6570\u6708\u7684&#8221;\u4f53\u68c0\u6863\u6848&#8221;\u3002\u5982\u679c\u4f60\u4e5f\u597d\u5947\u81ea\u5df1\u665a\u9ad8\u5cf0\u5230\u5e95\u6389\u6ca1\u6389\u901f\uff0c\u6216\u8005\u60f3\u9a8c\u8bc1 bufferbloat \u662f\u4e0d\u662f\u6e38\u620f\u5361\u987f\u7684\u5143\u51f6\uff0c\u82b1\u5341\u5206\u949f\u642d\u4e00\u4e0b\u633a\u503c\u3002<\/p>\n<p>\u9879\u76ee\u5730\u5740\u5728 GitHub \u641c\u7d22 &#8220;c4g7-dev\/netwatch&#8221;\uff0cMIT \u534f\u8bae\uff0c\u8de8\u5e73\u53f0\u3002\u6570\u636e\u5168\u5728\u672c\u5730\uff0c\u5220\u5e93\u5373\u6e05\uff0c\u6ca1\u6709\u540e\u987e\u4e4b\u5fe7\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5bb6\u91cc\u5bbd\u5e26\u5230\u5e95\u7a33\u4e0d\u7a33\uff0c\u5149\u770b\u8fd0\u8425\u5546\u7684\u6807\u79f0\u6570\u5b57\u6ca1\u7528\u3002\u665a\u9ad8\u5cf0\u6389\u901f\u3001\u6253\u6e38\u620f\u7a81\u7136\u8df3 ping\u3001\u67d0\u53f0\u8bbe\u5907\u5077\u5077\u5360\u6ee1\u4e0a\u884c\u2014\u2014\u8fd9\u4e9b &#8230; <a title=\"\u7528 NetWatch \u7ed9\u5bb6\u91cc\u5bbd\u5e26\u505a\u4e00\u4efd\u957f\u671f\u4f53\u68c0\u6863\u6848\" class=\"read-more\" href=\"https:\/\/www.tantan.ink\/index.php\/2026\/08\/21\/%e7%94%a8-netwatch-%e7%bb%99%e5%ae%b6%e9%87%8c%e5%ae%bd%e5%b8%a6%e5%81%9a%e4%b8%80%e4%bb%bd%e9%95%bf%e6%9c%9f%e4%bd%93%e6%a3%80%e6%a1%a3%e6%a1%88\/\" aria-label=\"\u9605\u8bfb \u7528 NetWatch \u7ed9\u5bb6\u91cc\u5bbd\u5e26\u505a\u4e00\u4efd\u957f\u671f\u4f53\u68c0\u6863\u6848\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":2,"featured_media":957,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[164,10],"tags":[],"class_list":["post-961","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-selfhost","category-software"],"_links":{"self":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts\/961","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/comments?post=961"}],"version-history":[{"count":0,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts\/961\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/media\/957"}],"wp:attachment":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/media?parent=961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/categories?post=961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/tags?post=961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}