{"id":124286,"date":"2026-11-18T20:16:35","date_gmt":"2026-11-18T12:16:35","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/124286.html"},"modified":"2026-11-18T20:16:35","modified_gmt":"2026-11-18T12:16:35","slug":"%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8cwindows%e5%ae%a2%e6%88%b7%e7%ab%af%e9%87%8d%e5%90%af%e5%90%8e%e5%8f%91%e7%8e%b0agent%e8%bf%9e%e4%b8%8d%e4%b8%8alightmem%e5%92%8chive-mcp%e4%ba%86","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/124286.html","title":{"rendered":"\u670d\u52a1\u5668\u548cwindows\u5ba2\u6237\u7aef\u91cd\u542f\u540e,\u53d1\u73b0agent\u8fde\u4e0d\u4e0alightmem\u548chive mcp\u4e86"},"content":{"rendered":"<p>        \/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/<br \/>\n        #content_views .toc,<br \/>\n        \/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/<br \/>\n        #content_views.markdown_views &gt; p:empty:has(+ .toc),<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty,<br \/>\n        \/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/<br \/>\n        #content_views.htmledit_views #main-toc,<br \/>\n        #content_views.htmledit_views #hr-toc,<br \/>\n        #content_views.htmledit_views p[id*=\\&#8221;-toc\\&#8221;] {<br \/>\n          display: none !important;<br \/>\n        }<br \/>\n        \/* \u76ee\u5f55\u53bb\u6389\u540e\uff0c\u7d27\u8ddf\u7684\u9996\u4e2a\u6807\u9898\u4e0d\u518d\u591a\u51fa\u4e00\u5757\u4e0a\u8fb9\u8ddd *\/<br \/>\n        #content_views.markdown_views &gt; .toc + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + h4,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h4 {<br \/>\n          margin-top: 0 !important;<br \/>\n        }<\/p>\n<p>\u670d\u52a1\u5668\u548cwindows\u5ba2\u6237\u7aef\u91cd\u542f\u540e,\u53d1\u73b0agent\u8fde\u4e0d\u4e0alightmem\u548chive mcp\u4e86<\/p>\n<p>\u540e\u6765\u6309\u4e86\u91cd\u8054\u540e,hive\u8fde\u4e0a\u4e86,\u4f46\u662flightmem\u8fd8\u662f\u4e0d\u884c,\u65e5\u5fd7\u4fe1\u606f:\u00a0fetch failed (connect ECONNREFUSED 192.168.0.88:18444)<\/p>\n<\/p>\n<p>\u624b\u5de5\u5f00lightmem\u4efb\u52a1:<\/p>\n<p>skywalk&#064;fb98:~\/dswork $ \u00a0sudo service lightmem start<br \/>\nlightmem: PostgreSQL 10.0.10.10:5432 \u5728 60s \u5185\u4e0d\u53ef\u8fbe<br \/>\n\u00a0<\/p>\n<p>\u770b\u770b\u8c01\u6ca1\u6709\u8d77\u6765?\u00a0<\/p>\n<p>skywalk&#064;fb98:~\/dswork $ jls<br \/>\n   JID  IP Address      Hostname                      Path<br \/>\n     1                  lims-pg                       \/usr\/jails\/lims-pg<br \/>\n     2                  lims-redis                    \/usr\/jails\/lims-redis<br \/>\n     3                  lims-rabbit                   \/usr\/jails\/lims-rabbit<br \/>\n     4                  lims-minio                    \/usr\/jails\/lims-minio<br \/>\n     5                  lims-router                   \/usr\/jails\/lims-router<\/p>\n<p>\u624b\u5de5\u5f00\u8fd9\u4e2ajail ,\u7adf\u7136\u8bf4\u5df2\u7ecfexists&#8230;.<\/p>\n<p>skywalk&#064;fb98:~\/dswork $ sudo service jail start lims-pg<br \/>\nStarting jails: cannot start jail  &#034;lims-pg&#034;:<br \/>\njail: &#034;lims-pg&#034; already exists<br \/>\n.<\/p>\n<p>\u6012\u4e86,\u8fd8\u662f\u8ba9AI\u6765\u505a\u5427,Workbuddy,\u5f00\u5de5!\u00a0<\/p>\n<h2>FreeBSD vnet jail \u4e8c\u5c42\u300c\u9759\u9ed8\u65ad\u94fe\u300d&#xff1a;bridge0 \u6210\u5458\u90fd\u5728&#xff0c;\u5305\u5c31\u662f\u4e0d\u8f6c\u53d1<\/h2>\n<p>\u4e00\u53f0 FreeBSD 15 \u4e0a\u7684\u670d\u52a1\u8d77\u4e0d\u6765&#xff0c;\u62a5\u4e86\u300cPostgreSQL 60 \u79d2\u5185\u4e0d\u53ef\u8fbe\u300d\u3002<br \/>\n\u987a\u7740\u8fd9\u4e2a\u62a5\u9519\u67e5\u4e0b\u53bb&#xff0c;PG \u662f\u6d3b\u7684\u3001jail \u662f\u8dd1\u7740\u7684\u3001bridge0 \u7684\u6210\u5458\u63a5\u53e3\u4e00\u4e2a\u4e0d\u5c11\u2014\u2014<br \/>\n\u4f46\u5bbf\u4e3b\u548c jail \u4e4b\u95f4\u5c31\u662f ping \u4e0d\u901a\u3002<br \/>\n\u8fd9\u7bc7\u6587\u7ae0\u8bb0\u5f55\u8fd9\u6b21\u6392\u9519&#xff1a;\u4e09\u4e2a\u770b\u4f3c\u5408\u7406\u7684\u5047\u8bbe\u5168\u9519&#xff0c;\u771f\u6b63\u7684\u5224\u636e\u85cf\u5728\u63a5\u53e3\u8ba1\u6570\u5668\u91cc\u3002<br \/>\n\u540e\u9762\u8fd8\u6709\u7b2c\u4e8c\u4e2a\u5751\u2014\u2014\u5b83\u5728\u5f00\u673a\u65f6\u6839\u672c\u6ca1\u6709\u5c1d\u8bd5\u542f\u52a8\u8fc7\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u73b0\u573a&#xff1a;\u4e00\u53e5\u300c60s \u5185\u4e0d\u53ef\u8fbe\u300d<\/h3>\n<p>lightmem&#xff08;\u4e00\u4e2a\u5e26 pgvector \u540e\u7aef\u7684\u8bb0\u5fc6\u670d\u52a1&#xff09;\u7684 rc \u811a\u672c\u957f\u8fd9\u6837&#xff1a;<\/p>\n<p># \u542f\u52a8\u524d\u7b49\u5f85 lims-pg jail \u7684 5432 \u5c31\u7eea<br \/>\n_i&#061;0<br \/>\nwhile [ &#034;${_i}&#034; -lt &#034;${lightmem_pg_wait}&#034; ]; do<br \/>\n    if nc -z -w 2 &#034;${lightmem_pg_host}&#034; &#034;${lightmem_pg_port}&#034; 2&gt;\/dev\/null; then<br \/>\n        return 0<br \/>\n    fi<br \/>\n    _i&#061;$((_i &#043; 1))<br \/>\n    sleep 1<br \/>\ndone<br \/>\necho &#034;lightmem: PostgreSQL ${lightmem_pg_host}:${lightmem_pg_port} \u5728 ${lightmem_pg_wait}s \u5185\u4e0d\u53ef\u8fbe&#034; &gt;&amp;2<br \/>\nreturn 1<\/p>\n<p>\u670d\u52a1\u6ca1\u8d77\u6765&#xff0c;\u5bbf\u4e3b\u00a0nc -z 10.0.10.10 5432\u00a0\u5931\u8d25\u3002\u62d3\u6251\u662f\u6807\u51c6\u7684 FreeBSD vnet jail&#xff1a;<\/p>\n<p>\u5bbf\u4e3b em0 192.168.0.88<br \/>\n  \u2514\u2500 bridge0 10.0.10.1\/24<br \/>\n       \u251c\u2500 epair10a \u2500\u2500 epair10b  lims-pg      10.0.10.10  (PostgreSQL)<br \/>\n       \u251c\u2500 epair20a \u2500\u2500 epair20b  lims-redis   10.0.10.20<br \/>\n       \u251c\u2500 epair30a \u2500\u2500 epair30b  lims-rabbit  10.0.10.30<br \/>\n       \u251c\u2500 epair40a \u2500\u2500 epair40b  lims-minio   10.0.10.40<br \/>\n       \u2514\u2500 epair50a \u2500\u2500 epair50b  lims-router  10.0.10.50<\/p>\n<h3>\u4e8c\u3001\u88ab\u6570\u636e\u63a8\u7ffb\u7684\u4e09\u4e2a\u5047\u8bbe<\/h3>\n<h4>\u5047\u8bbe 1&#xff1a;PG \u8fde\u63a5\u6253\u6ee1&#xff08;\u56e0\u4e3a\u300c\u6709 271 \u4e2a\u8fdb\u7a0b\u300d&#xff09;<\/h4>\n<p>\u4e00\u4e2a\u53ea\u8dd1 PG \u7684 jail \u6709 271 \u4e2a\u8fdb\u7a0b&#xff0c;\u786e\u5b9e\u53ef\u7591\u2014\u2014\u6b63\u5e38 PostgreSQL \u4e5f\u5c31\u5341\u6765\u4e2a\u3002\u4f46\u8fdb\u53bb\u4e00\u6570&#xff1a;<\/p>\n<p>$ sudo jexec 1 ps -ax -o comm&#061; | sort | uniq -c | sort -rn | head -6<br \/>\n   9 postgres<br \/>\n   6 syslogd<br \/>\n   2 cron<\/p>\n<p>9 \u4e2a\u3002\u90a3\u4e2a 271 \u662f\u5386\u53f2\u89c2\u6d4b&#xff0c;\u65e9\u5c31\u4e0d\u662f\u73b0\u573a\u4e86\u3002\u7528\u8fc7\u671f\u6570\u636e\u505a\u63a8\u7406&#xff0c;\u662f\u6392\u9519\u91cc\u6700\u8d35\u7684\u9519\u8bef\u3002<\/p>\n<h4>\u5047\u8bbe 2&#xff1a;\u7a7a\u58f3 jail<\/h4>\n<p>\u8fd9\u4e2a\u5047\u8bbe\u5bf9\u4e86\u4e00\u534a&#xff0c;\u4f46\u5bf9\u9519\u7684\u4e0d\u662f\u90a3\u4e2a jail\u3002\u67e5\u4e86\u4e00\u5708\u00a0\/usr\/local\/etc\/rc.d\/\u00a0\u624d\u53d1\u73b0&#xff1a;lims-redis\u3001lims-rabbit\u3001lims-minio\u3001lims-router\u00a0\u56db\u4e2a jail \u91cc\u4e00\u4e2a\u670d\u52a1\u90fd\u6ca1\u88c5&#xff0c;\u53ea\u6709 syslogd \u5728\u8dd1\u2014\u2014\u5b83\u4eec\u672c\u6765\u5c31\u662f\u5360\u4f4d\u58f3\u3002\u771f\u6b63\u6709\u4e1a\u52a1\u7684\u00a0lims-pg\u00a0\u662f\u597d\u7684\u3002<\/p>\n<h4>\u5047\u8bbe 3&#xff1a;PG \u6ca1\u542f\u52a8<\/h4>\n<p>$ sudo jexec 1 pg_isready -h 10.0.10.10 -p 5432 -t 3<br \/>\n10.0.10.10:5432 &#8211; accepting connections<\/p>\n<p>\u6d3b\u7740&#xff0c;\u800c\u4e14\u00a0sockstat\u00a0\u663e\u793a\u5b83\u8001\u8001\u5b9e\u5b9e\u76d1\u542c\u5728\u00a010.0.10.10:5432\u3002\u6240\u4ee5\u95ee\u9898\u4e0d\u5728 PG&#xff0c;\u5728\u300c\u5bbf\u4e3b\u80fd\u4e0d\u80fd\u8d70\u5230 jail\u300d\u8fd9\u4e00\u5c42\u3002<\/p>\n<h4>\u987a\u5e26\u4e24\u4e2a\u5047\u8b66\u62a5&#xff0c;\u522b\u88ab\u5b83\u4eec\u5e26\u504f<\/h4>\n<p>\u8b66\u62a5 A&#xff1a;pg_isready -h 127.0.0.1\u00a0\u5728 jail \u91cc\u8fd4\u56de\u00a0no response\u3002<\/p>\n<p>\u7b2c\u4e00\u53cd\u5e94\u662f\u300cPG \u6ca1\u76d1\u542c\u56de\u73af\u300d\u3002\u4f46\u00a0sockstat\u00a0\u91cc\u90a3\u4e2a\u00a0127.0.0.1:5432\u00a0\u5176\u5b9e\u5c5e\u4e8e\u5bbf\u4e3b\u81ea\u5df1\u53e6\u88c5\u7684\u4e00\u4e2a postgres&#xff08;jid 0&#xff09;\u3002jail \u6709\u72ec\u7acb vnet&#xff0c;\u5b83\u7684\u00a0127.0.0.1\u00a0\u662f\u53e6\u4e00\u5957\u56de\u73af\u2014\u2014jail \u7684 PG \u53ea\u7ed1\u4e86\u00a010.0.10.10&#xff0c;\u5728 jail \u5185\u67e5\u00a0127.0.0.1\u00a0\u672c\u6765\u5c31\u4e0d\u8be5\u901a\u3002<\/p>\n<p>\u8b66\u62a5 B&#xff1a;jail \u91cc\u00a0ps -o lstart\u00a0\u663e\u793a\u8fdb\u7a0b\u542f\u52a8\u65f6\u95f4\u6bd4\u5bbf\u4e3b\u8bb0\u5f55\u65e9 8 \u5c0f\u65f6&#xff0c;\u770b\u7740\u50cf\u300c\u8fdb\u7a0b\u8de8\u91cd\u542f\u5b58\u6d3b\u300d\u8fd9\u79cd\u7075\u5f02\u4e8b\u4ef6\u3002\u5b9e\u9645\u662f jail \u91cc\u00a0\/etc\/localtime\u00a0\u662f UTC\u3001\u5bbf\u4e3b\u662f CST\u3002\u65f6\u533a\u5dee&#xff0c;\u4e0d\u662f\u6b8b\u7559\u3002<\/p>\n<h3>\u4e09\u3001\u771f\u5224\u636e&#xff1a;\u522b\u4fe1\u300c\u72b6\u6001\u300d&#xff0c;\u53bb\u6570\u300c\u5305\u300d<\/h3>\n<p>\u6000\u7591\u94fe\u8def\u7684\u7b2c\u4e00\u4e2a\u52a8\u4f5c\u901a\u5e38\u662f\u00a0ifconfig\u3002\u4f46\u8fd9\u6b21\u00a0ifconfig\u00a0\u662f\u6700\u4f1a\u9a97\u4eba\u7684\u90a3\u4e2a&#xff1a;<\/p>\n<p>$ ifconfig epair10a<br \/>\nepair10a: flags&#061;1008942&lt;BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOWER_UP&gt;<br \/>\nstatus: active          # \u2190 \u770b\u7740\u5b8c\u5168\u6b63\u5e38<\/p>\n<p>$ ifconfig bridge0 | grep member<br \/>\nmember: epair10a flags&#061;143&lt;LEARNING,DISCOVER,AUTOEDGE,AUTOPTP&gt;<br \/>\nmember: epair20a &#8230;    # \u2190 \u4e94\u4e2a\u6210\u5458\u4e00\u4e2a\u4e0d\u5c11<\/p>\n<p>UP\u3001RUNNING\u3001member \u9f50\u5168\u3002\u4f46\u771f\u6b63\u8bf4\u660e\u95ee\u9898\u7684\u662f\u8fd9\u4e24\u6761&#xff1a;<\/p>\n<p>$ netstat -I epair10a -b<br \/>\nName       Mtu Network   Address              Ipkts Ierrs Idrop  Ibytes Opkts Oerrs  Obytes Coll<br \/>\nepair10a* 1500 &lt;Link#4&gt;  58:9c:fc:10:55:c6        0     0     0       0     0   383       0    0<br \/>\n#                                                    \u2191\u6536 0        \u2191\u53d1 0  \u2191\u9519\u8bef 383 \u4e14\u5728\u6da8<\/p>\n<p>$ ifconfig bridge0 addr<br \/>\n# \u7a7a\u3002MAC \u8f6c\u53d1\u8868\u91cc\u4e00\u6761\u8bb0\u5f55\u90fd\u6ca1\u6709\u3002<\/p>\n<p>$ ping -c 3 10.0.10.10<br \/>\n100.0% packet loss<br \/>\n$ arp -an | grep 10.0.10.10<br \/>\n? (10.0.10.10) at (incomplete) on bridge0 expired [bridge]<\/p>\n<p>Ipkts&#061;0 \/ Opkts&#061;0 \/ Oerrs\u00a0\u6301\u7eed\u9012\u589e&#xff0c;\u8fd9\u4e2a\u7ec4\u5408\u57fa\u672c\u53ea\u6709\u4e00\u79cd\u89e3\u91ca&#xff1a;\u6865\u628a\u5e27\u4ea4\u7ed9\u00a0epair10a\u00a0\u8f93\u51fa&#xff0c;epair_output()\u00a0\u6bcf\u6b21\u90fd\u8fd4\u56de\u9519\u8bef\u2014\u2014\u5bf9\u7aef\u7684 softc \u5df2\u7ecf\u4e0d\u5728\u4e86\u3002<\/p>\n<p>\u518d\u7528\u00a0tcpdump\u00a0\u786e\u8ba4\u4e00\u6b21&#xff1a;<\/p>\n<p>$ sudo tcpdump -i bridge0 -n -c 20 arp    # \u53e6\u4e00\u7a97\u53e3\u540c\u65f6 ping<br \/>\n08:08:12.673564 ARP, Request who-has 10.0.10.10 tell 10.0.10.1, length 28<br \/>\n08:08:13.673922 ARP, Request who-has 10.0.10.10 tell 10.0.10.1, length 28<br \/>\n08:08:14.674933 ARP, Request who-has 10.0.10.10 tell 10.0.10.1, length 28<br \/>\n# \u53ea\u6709 request \u51fa\u53bb&#xff0c;\u6ca1\u6709\u4e00\u4e2a reply<\/p>\n<h4>jail \u91cc\u6293\u4e0d\u4e86\u5305\u600e\u4e48\u529e<\/h4>\n<p>\u60f3\u5728 jail \u4fa7\u5bf9\u7167&#xff0c;tcpdump\u00a0\u76f4\u63a5\u62d2\u7edd&#xff1a;<\/p>\n<p>tcpdump: epair10b: Packet capture is not supported on that device<br \/>\n((there are no BPF devices))<\/p>\n<p>jail \u7684 devfs \u91cc\u6ca1\u7ed9\u00a0bpf\u3002\u8fd9\u65f6\u5019\u4e0d\u7528\u6298\u817e devfs \u89c4\u5219&#xff0c;\u7528\u4e24\u7aef\u8ba1\u6570\u5668\u5bf9\u7167\u5c31\u591f\u4e86&#xff1a;<\/p>\n<p>$ jexec lims-pg netstat -I epair10b -b<br \/>\nepair10b  &#8230;  0  0  0  0   5  0  168  0<br \/>\n#                            \u2191jail \u786e\u5b9e\u53d1\u51fa\u53bb\u4e86 5 \u4e2a\u5305<\/p>\n<p>$ netstat -I epair10a -b    # \u5bbf\u4e3b\u4fa7 a \u53e3<br \/>\nepair10a* &#8230;  0  &#8230;      0  0  0  0<br \/>\n#              \u2191 \u4e00\u4e2a\u90fd\u6ca1\u6536\u5230<\/p>\n<p>\u5355\u5411\u4e22\u5305\u53ef\u80fd\u662f\u8def\u7531\u95ee\u9898&#xff0c;\u53cc\u5411\u90fd\u4e22\u3001\u4e14\u53d1\u7aef\u8ba1\u6570\u5728\u6da8\u3001\u6536\u7aef\u8ba1\u6570\u662f 0&#xff0c;\u5c31\u53ea\u80fd\u662f\u8fd9\u5bf9 epair \u672c\u8eab\u4e0d\u901a\u3002<\/p>\n<h3>\u56db\u3001\u6839\u56e0&#xff1a;vnet jail \u7684 epair \u4e0d\u80fd\u300c\u4e8c\u6b21\u5165\u72f1\u300d<\/h3>\n<p>epair\u00a0\u662f\u4e00\u5bf9\u80cc\u9760\u80cc\u7684\u865a\u62df\u7f51\u5361&#xff08;a \u7aef\u7559\u5bbf\u4e3b\u3001b \u7aef\u585e\u8fdb jail \u7684 vnet&#xff09;\u3002\u6b63\u5e38\u751f\u547d\u5468\u671f\u662f&#xff1a;\u5efa\u5bf9 \u2192 b \u7aef move \u8fdb vnet \u4e00\u6b21\u3002<\/p>\n<p>\u95ee\u9898\u51fa\u5728\u300c\u518d\u6765\u4e00\u6b21\u300d\u3002\u53ea\u8981 jail \u8d70\u8fc7\u00a0restart&#xff08;\u6216\u00a0stop\u00a0&#043;\u00a0start&#xff09;&#xff0c;jail(8)\u00a0\u4f1a\u628a\u5df2\u7ecf\u5b58\u5728\u7684\u90a3\u5bf9 epair\u00a0\u518d\u6b21 move \u8fdb vnet\u2014\u2014\u8fd9\u4e00\u6b21\u4e4b\u540e&#xff0c;\u8de8 vnet \u7684\u8f6c\u53d1\u901a\u9053\u5c31\u5e9f\u4e86&#xff1a;<\/p>\n<ul>\n<li>\u4e24\u7aef\u00a0ifconfig\u00a0\u90fd\u662f\u00a0UP\/RUNNING<\/li>\n<li>bridge0\u00a0\u7684 member \u5217\u8868\u7167\u65e7<\/li>\n<li>jls\u00a0\u91cc jail \u597d\u597d\u5730\u8dd1\u7740<\/li>\n<li>\u4f46\u5e27\u5230\u4e86\u00a0epairXa\u00a0\u5c31\u62a5\u9519&#xff0c;\u51fa\u4e0d\u53bb<\/li>\n<\/ul>\n<p>\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u5b83\u7279\u522b\u96be\u67e5&#xff1a;\u6240\u6709\u300c\u770b\u72b6\u6001\u300d\u7684\u547d\u4ee4\u90fd\u5728\u544a\u8bc9\u4f60\u6ca1\u4e8b\u3002<\/p>\n<p>\u6709\u4e2a\u53cd\u76f4\u89c9\u7684\u73b0\u8c61\u53ef\u4ee5\u4f50\u8bc1\u914d\u5bf9\u5173\u7cfb\u6ca1\u4e71&#xff1a;<\/p>\n<p>$ sudo service jail stop lims-pg<br \/>\n$ ifconfig -l | tr &#039; &#039; &#039;\\\\n&#039; | grep epair10<br \/>\nepair10a<br \/>\nepair10b        # \u2190 \u505c jail \u540e b \u7aef\u201c\u56de\u5230\u201d\u5bbf\u4e3b vnet<br \/>\n$ sudo ifconfig epair10a destroy<br \/>\n$ ifconfig -l | tr &#039; &#039; &#039;\\\\n&#039; | grep epair10<br \/>\n# epair10b \u8ddf\u7740\u4e00\u8d77\u6d88\u5931\u4e86 \u2192 \u8bc1\u660e a\/b \u786e\u5b9e\u662f\u540c\u4e00\u5bf9&#xff0c;\u4e0d\u662f\u914d\u5bf9\u9519\u4e71<\/p>\n<p>\u540c\u4e00\u5bf9\u3001\u6ca1\u914d\u9519\u3001\u5c31\u662f\u4e0d\u8f6c\u53d1\u3002\u00a0\u6240\u4ee5\u4fee\u6cd5\u53ea\u6709\u4e00\u4e2a&#xff1a;\u6574\u5bf9\u9500\u6bc1\u91cd\u5efa\u3002<\/p>\n<h3>\u4e94\u3001\u4fee\u6cd5&#xff1a;\u56db\u6b65\u91cd\u5efa<\/h3>\n<p>NAME&#061;lims-pg; N&#061;10<\/p>\n<p>sudo service jail stop $NAME<br \/>\nsudo ifconfig epair${N}a destroy          # a \u7aef\u4e00\u9500\u6bc1&#xff0c;b \u7aef\u8fde\u5e26\u6d88\u5931<br \/>\nsudo ifconfig epair${N} create            # \u5efa\u51fa\u5168\u65b0\u7684 a\/b \u5bf9<br \/>\nsudo ifconfig epair${N}a up               # \u5c11\u8fd9\u4e00\u6b65\u4f1a\u56e0\u4e3a\u7f3a IFF_UP \u5b8c\u5168\u4e0d\u901a<br \/>\nsudo ifconfig bridge0 addm epair${N}a<br \/>\nsudo service jail start $NAME<\/p>\n<p>\u9a8c\u8bc1&#xff1a;<\/p>\n<p>$ ping -c 2 10.0.10.10<br \/>\n2 packets transmitted, 2 packets received, 0.0% packet loss<br \/>\nround-trip min\/avg\/max\/stddev &#061; 0.071\/0.071\/0.071\/0.000 ms<\/p>\n<p>$ nc -z -w 2 10.0.10.10 5432 &amp;&amp; echo PG-REACHABLE<br \/>\nPG-REACHABLE<\/p>\n<h4>\u4e24\u4e2a\u5751<\/h4>\n<p>\u5751\u4e00&#xff1a;bridge0 deletem\u00a0\/\u00a0addm\u00a0\u6ca1\u7528\u3002\u00a0\u8fd9\u662f\u7f51\u4e0a\u6700\u5e38\u89c1\u7684\u5efa\u8bae&#xff08;\u6211\u81ea\u5df1\u7684\u65e7\u7b14\u8bb0\u91cc\u4e5f\u8fd9\u4e48\u5199\u8fc7&#xff09;&#xff0c;\u4f46\u6210\u5458\u5173\u7cfb\u672c\u6765\u5c31\u662f\u5bf9\u7684&#xff0c;\u91cd\u7f6e\u6210\u5458\u6cbb\u4e0d\u4e86\u300c\u5bf9\u7aef\u5df2\u6b7b\u300d\u3002\u5fc5\u987b\u9500\u6bc1\u91cd\u5efa\u3002<\/p>\n<p>\u5751\u4e8c&#xff1a;\u522b\u5fd8\u4e86\u00a0ifconfig epairXa up\u3002\u00a0\u65b0\u5efa\u51fa\u6765\u7684 a \u7aef\u9ed8\u8ba4\u4e0d\u662f UP&#xff0c;\u53ea\u00a0addm\u00a0\u5230 bridge \u800c\u4e0d\u00a0up&#xff0c;\u73b0\u8c61\u548c\u6ca1\u4fee\u4e00\u6837\u2014\u2014\u5f88\u5bb9\u6613\u8bef\u5224\u6210\u300c\u91cd\u5efa\u4e5f\u6ca1\u7528\u300d\u3002<\/p>\n<h3>\u516d\u3001\u628a\u4e00\u6b21\u6027\u4fee\u590d\u53d8\u6210\u673a\u5236<\/h3>\n<p>\u624b\u5de5\u4fee\u4e94\u4e2a jail \u53ea\u662f\u6b62\u8840\u3002\u4e0b\u6b21\u8c01\u518d\u00a0service jail restart&#xff0c;\u540c\u6837\u7684\u5751\u8fd8\u5728\u3002\u6240\u4ee5\u628a\u300c\u91cd\u5efa\u300d\u6302\u8fdb jail \u7684\u751f\u547d\u5468\u671f&#xff1a;<\/p>\n<p>#!\/bin\/sh<br \/>\n# \/usr\/local\/sbin\/jail_epair.sh up|down &lt;base&gt;   \u4f8b&#xff1a;jail_epair.sh up epair10<br \/>\nset -u<br \/>\nACTION&#061;&#034;$1&#034;; BASE&#061;&#034;$2&#034;<\/p>\n<p>case &#034;${ACTION}&#034; in<br \/>\nup)<br \/>\n    if ifconfig &#034;${BASE}a&#034; &gt;\/dev\/null 2&gt;&amp;1; then<br \/>\n        exit 0                      # \u5f00\u673a\u65f6 rc.conf \u5df2\u5efa\u597d&#xff0c;\u76f4\u63a5\u7528<br \/>\n    fi<br \/>\n    ifconfig &#034;${BASE}&#034; create || exit 1<br \/>\n    ifconfig &#034;${BASE}a&#034; up       || exit 1<br \/>\n    ifconfig bridge0 addm &#034;${BASE}a&#034;<br \/>\n    ;;<br \/>\ndown)<br \/>\n    # \u505c jail \u540e b \u7aef\u4f1a\u56de\u5230\u5bbf\u4e3b vnet&#xff0c;\u9500\u6bc1 a \u7aef\u5373\u8fde\u5e26\u9500\u6bc1 b \u7aef&#xff0c;<br \/>\n    # \u4fdd\u8bc1\u4e0b\u6b21 start \u4e00\u5b9a\u8d70 up \u5206\u652f\u5efa\u51fa\u300c\u5168\u65b0\u7684\u5bf9\u300d<br \/>\n    ifconfig &#034;${BASE}a&#034; destroy &gt;\/dev\/null 2&gt;&amp;1 || true<br \/>\n    ;;<br \/>\nesac<\/p>\n<p>\/etc\/jail.conf\u00a0\u91cc\u6bcf\u4e2a\u6210\u5458\u52a0\u4e24\u884c&#xff1a;<\/p>\n<p>lims-pg {<br \/>\n    vnet;<br \/>\n    vnet.interface &#061; epair10b;<br \/>\n    exec.prestart &#061; &#034;\/usr\/local\/sbin\/jail_epair.sh up epair10&#034;;<br \/>\n    exec.poststop &#061; &#034;\/usr\/local\/sbin\/jail_epair.sh down epair10&#034;;<br \/>\n    &#8230;<br \/>\n}<\/p>\n<p>\u4e3a\u4ec0\u4e48\u662f poststop \u9500\u6bc1&#xff0c;\u800c\u4e0d\u662f prestart \u91cc\u5224\u65ad\u300c\u65e7\u7684\u662f\u4e0d\u662f\u574f\u4e86\u300d&#xff1f;\u00a0\u56e0\u4e3a\u574f\u6389\u7684\u90a3\u5bf9\u5728\u7528\u6237\u6001\u6839\u672c\u770b\u4e0d\u51fa\u5f02\u5e38&#xff08;\u8fd9\u6b63\u662f\u8fd9\u6b21\u6392\u9519\u7684\u5168\u90e8\u96be\u70b9&#xff09;\u3002\u65e2\u7136\u5224\u65ad\u4e0d\u53ef\u9760&#xff0c;\u5c31\u4e0d\u8981\u5224\u65ad\u2014\u2014\u6bcf\u6b21\u505c\u673a\u90fd\u9500\u6bc1&#xff0c;\u6bcf\u6b21\u542f\u52a8\u90fd\u65b0\u5efa&#xff0c;\u8ba9\u300c\u590d\u7528\u65e7\u5bf9\u300d\u8fd9\u6761\u8def\u6839\u672c\u4e0d\u5b58\u5728\u3002<\/p>\n<p>\u6539\u5b8c\u5b9e\u6d4b&#xff1a;<\/p>\n<p>$ sudo service jail restart lims-redis<br \/>\n$ netstat -I epair20a -b | tail -1<br \/>\nepair20a  1500 &lt;Link#6&gt;  58:9c:fc:10:22:0e   6  0  0  364   3  0  238  0<br \/>\n#                                            \u2191\u6536 6      \u2191\u53d1 3  \u2191Oerrs&#061;0<br \/>\n$ ping -c 2 10.0.10.20<br \/>\n2 packets transmitted, 2 packets received, 0.0% packet loss<\/p>\n<p>\u987a\u4fbf\u628a\u8fd9\u4e2a\u300c\u5f00\u673a\u8def\u5f84\u300d\u5355\u72ec\u9a8c\u4e86\u4e00\u904d&#xff08;\u4e0d\u52a8\u751f\u4ea7 jail&#xff09;&#xff1a;\u65b0\u5efa\u4e00\u5bf9\u00a0epair99\u3001\u6302 bridge\u3001\u518d\u8d77\u4e00\u4e2a\u4e34\u65f6 jail \u628a b \u7aef\u585e\u8fdb\u53bb\u2014\u2014Oerrs&#061;0\u3001ping \u901a\u3002\u8fd9\u8bf4\u660e\u9996\u6b21\u5efa\u94fe\u6ca1\u95ee\u9898&#xff0c;\u95ee\u9898\u53ea\u5728\u590d\u7528&#xff0c;\u548c\u4e0a\u9762\u7684\u7ed3\u8bba\u5bf9\u5f97\u4e0a\u3002<\/p>\n<h3>\u4e03\u3001\u7b2c\u4e8c\u4e2a\u5751&#xff1a;\u5b83\u5f00\u673a\u65f6\u538b\u6839\u6ca1\u5c1d\u8bd5\u542f\u52a8<\/h3>\n<p>\u94fe\u8def\u4fee\u597d\u540e\u00a0service lightmem start\u00a0\u4e24\u79d2\u5c31\u8d77\u6765\u4e86&#xff08;\u4e0d\u518d\u7b49 60 \u79d2&#xff09;\u3002\u4f46\u95ee\u9898\u8fd8\u6ca1\u5b8c&#xff1a;\u4e0b\u6b21\u91cd\u542f\u673a\u5668&#xff0c;\u5b83\u8fd8\u4f1a\u81ea\u52a8\u8d77\u6765\u5417&#xff1f;<\/p>\n<p>\u7ffb\u65e5\u5fd7&#xff1a;<\/p>\n<p>$ grep &#039;\\\\[boot\\\\]&#039; \/var\/log\/lightmem.log | tail -3<br \/>\n2026\/10\/27 10:14:41 [boot] profile&#061;family backend&#061;pgvector tier&#061;family<br \/>\n2026\/10\/27 10:14:41 [boot] listening on :18443<br \/>\n2026\/11\/06 08:12:12 [boot] &#8230;        # \u2190 \u8fd9\u662f\u6211\u624b\u5de5\u8d77\u7684<\/p>\n<p>11-05 \u90a3\u6b21\u5f00\u673a&#xff08;kern.boottime\u00a0&#061; 07:43:18&#xff09;\u4e00\u6761\u00a0[boot]\u00a0\u90fd\u6ca1\u6709\u3002\u4e5f\u5c31\u662f\u8bf4&#xff1a;\u4e8c\u8fdb\u5236\u4ece\u672a\u88ab\u62c9\u8d77&#xff0c;\u5b83\u662f\u5361\u5728\u300c\u7b49 PG\u300d\u90a3\u4e00\u6b65\u5c31\u9000\u51fa\u4e86&#xff0c;\u8fde\u65e5\u5fd7\u90fd\u6765\u4e0d\u53ca\u5199&#xff08;\u8d85\u65f6\u6d88\u606f\u8d70\u7684\u662f stderr\/console&#xff09;\u3002\u800c\u4e14\u8d85\u65f6\u540e\u4e0d\u91cd\u8bd5\u3002<\/p>\n<p>\u518d\u770b\u542f\u52a8\u987a\u5e8f&#xff0c;\u95ee\u9898\u7684\u5168\u8c8c\u5c31\u51fa\u6765\u4e86&#xff1a;<\/p>\n<p>$ rcorder \/etc\/rc.d\/* \/usr\/local\/etc\/rc.d\/* | grep -nE &#039;\/(jail|lightmem|NETWORKING)$&#039;<br \/>\n85:\/etc\/rc.d\/NETWORKING<br \/>\n86:\/usr\/local\/etc\/rc.d\/lightmem      # \u2190 \u7b2c 86 \u4f4d<br \/>\n216:\/etc\/rc.d\/jail                   # \u2190 \u7b2c 216 \u4f4d<\/p>\n<p>lightmem \u6bd4 jail \u65e9\u542f\u52a8 130 \u4e2a\u670d\u52a1\u3002\u00a0\u800c\u5b83\u7684\u7b49\u5f85\u7a97\u53e3\u53ea\u6709 60 \u79d2\u2014\u201411-05 \u90a3\u5929\u4ece\u5f00\u673a&#xff08;07:43:18&#xff09;\u5230 jail \u8d77\u6765&#xff08;07:49:36&#xff09;\u7528\u4e86\u00a06 \u5206 18 \u79d2\u3002\u7a97\u53e3\u6c38\u8fdc\u7b49\u4e0d\u5230&#xff0c;\u8fd9\u5c31\u662f\u300c\u5fc5\u7136\u5931\u8d25\u300d\u800c\u4e0d\u662f\u300c\u5076\u53d1\u5931\u8d25\u300d\u3002<\/p>\n<h4>\u51b7\u77e5\u8bc6&#xff1a;.bak\u00a0\u811a\u672c\u4f1a\u88ab\u5f00\u673a\u6267\u884c<\/h4>\n<p>\u987a\u624b\u53d1\u73b0\u00a0rc.d\u00a0\u91cc\u8eba\u7740\u51e0\u4e2a\u5386\u53f2\u5907\u4efd&#xff1a;lightmem.bak.r28\u3001lightmem.bak.r29\u3001lightmem_mcp.bak.r29\u2014\u2014\u5168\u90e8\u53ef\u6267\u884c&#xff0c;\u4e14\u90fd\u5e26\u00a0# PROVIDE: lightmem\u3002<\/p>\n<p>FreeBSD \u7684\u00a0\/etc\/rc\u00a0\u662f\u628a\u00a0\/usr\/local\/etc\/rc.d\/*\u00a0\u6574\u4e2a glob \u5582\u7ed9\u00a0rcorder\u00a0\u7684&#xff0c;.bak\u00a0\u4e0d\u4f1a\u88ab\u8df3\u8fc7\u3002\u4e5f\u5c31\u662f\u8bf4\u4ee5\u524d\u6bcf\u6b21\u5f00\u673a&#xff0c;\u53ef\u80fd\u6709\u591a\u4e2a\u300clightmem \u542f\u52a8\u811a\u672c\u300d\u4e00\u8d77\u8dd1\u3002<\/p>\n<p>\u7ed3\u8bba&#xff1a;\u5728\u00a0rc.d\u00a0\u91cc\u7559\u5907\u4efd&#xff0c;\u7b49\u4e8e\u7559\u4e86\u4e2a\u4f1a\u5728\u5f00\u673a\u65f6\u6267\u884c\u7684\u5e7d\u7075\u3002\u5907\u4efd\u8bf7\u632a\u5230\u00a0rc.d\u00a0\u76ee\u5f55\u4e4b\u5916\u3002<\/p>\n<h3>\u516b\u3001\u4e09\u5c42\u515c\u5e95<\/h3>\n<p>\u4fee\u5b8c\u4e4b\u540e\u662f\u8fd9\u6837\u4e00\u5957\u7ec4\u5408&#xff0c;\u800c\u4e0d\u662f\u5355\u70b9&#xff1a;<\/p>\n<p>\u7b2c\u4e00\u5c42&#xff1a;\u6539\u4f9d\u8d56\u987a\u5e8f\u3002\u00a0\u8ba9 lightmem \u6392\u5728 jail \u4e4b\u540e\u3002<\/p>\n<p># REQUIRE: NETWORKING jail<\/p>\n<p>\u6539\u540e rcorder&#xff1a;jail 212 \u2192 lightmem 217 \u2192 lightmem_mcp 219\u3002\u8fd9\u91cc\u6709\u4e2a\u5173\u952e\u524d\u63d0\u2014\u2014jail \u7684\u00a0exec.start\u00a0\u662f\u540c\u6b65\u6267\u884c\u00a0\/bin\/sh \/etc\/rc\u00a0\u7684&#xff0c;\u6240\u4ee5\u00a0service jail start\u00a0\u8fd4\u56de\u65f6&#xff0c;PG \u5df2\u7ecf\u5728\u76d1\u542c&#xff0c;\u4e0d\u9700\u8981\u9760 sleep \u731c\u3002<\/p>\n<p>\u7b2c\u4e8c\u5c42&#xff1a;\u653e\u5bbd\u7b49\u5f85\u7a97\u53e3\u3002\u00a0lightmem_pg_wait\u00a0\u4ece\u9ed8\u8ba4 60 \u63d0\u5230 180&#xff0c;\u7eaf\u7cb9\u5f53\u5b89\u5168\u57ab&#xff08;\u6bd4\u5982 PG \u8981\u505a WAL \u56de\u653e\u65f6&#xff09;\u3002<\/p>\n<p>\u7b2c\u4e09\u5c42&#xff1a;watchdog\u3002\u00a0\u6bcf 2 \u5206\u949f\u4e00\u6b21&#xff0c;\u903b\u8f91\u523b\u610f\u505a\u5f97\u300c\u4fdd\u5b88\u300d&#xff1a;<\/p>\n<p># PG \u4e0d\u53ef\u8fbe \u2192 \u53ea\u8bb0\u65e5\u5fd7&#xff0c;\u7edd\u4e0d\u52a8\u624b<br \/>\nif ! nc -z -w 2 &#034;${PG_HOST}&#034; &#034;${PG_PORT}&#034; 2&gt;\/dev\/null; then<br \/>\n    if fetch -q -T 2 -o &#8211; &#034;${KERNEL_URL}&#034; &gt;\/dev\/null 2&gt;&amp;1; then<br \/>\n        log &#034;WARN PG \u4e0d\u53ef\u8fbe&#xff0c;\u4f46 kernel \u4ecd\u5728\u670d\u52a1&#xff08;PG \u53ef\u80fd\u6302\u4e86&#xff09;&#034;<br \/>\n    fi<br \/>\n    exit 0<br \/>\nfi<\/p>\n<p># PG \u53ef\u8fbe\u4f46 18443 \u4e0d\u5065\u5eb7 \u2192 \u624d\u62c9\u8d77<br \/>\nfetch -q -T 3 -o &#8211; &#034;${KERNEL_URL}&#034; &gt;\/dev\/null 2&gt;&amp;1 || service lightmem start<\/p>\n<p>\u4e3a\u4ec0\u4e48 PG \u6302\u4e86\u53cd\u800c\u4e0d\u52a8\u624b&#xff1f;\u00a0\u4e24\u4e2a\u539f\u56e0&#xff1a;<\/p>\n<li>\u5f3a\u884c\u62c9\u8d77\u53ea\u4f1a\u8ba9\u8fdb\u7a0b\u53cd\u590d\u542f\u52a8\u5931\u8d25\u3001\u628a\u65e5\u5fd7\u5237\u6ee1&#xff0c;\u63a9\u76d6\u771f\u6b63\u7684\u6545\u969c\u70b9&#xff1b;<\/li>\n<li>\u300cPG \u4e0d\u53ef\u8fbe\u300d\u548c\u300clightmem \u6302\u4e86\u300d\u662f\u4e24\u4e2a\u6545\u969c&#xff0c;watchdog \u4e0d\u8be5\u628a\u524d\u8005\u4f2a\u88c5\u6210\u540e\u8005\u3002<\/li>\n<p>\u8fd9\u4e2a\u8bbe\u8ba1\u7684\u4ef7\u503c\u5728\u786c\u5173\u673a\u573a\u666f&#xff1a;\u65ad\u7535\u540e PG \u8981\u8d70 WAL \u5d29\u6e83\u6062\u590d&#xff0c;\u53ef\u80fd\u8fdc\u8d85 180 \u79d2\u3002\u8fd9\u65f6 rc \u90a3\u4e00\u8f6e\u4f1a\u653e\u5f03&#xff0c;\u4f46 watchdog \u4f1a\u5728 PG \u5c31\u7eea\u540e\u7684 2 \u5206\u949f\u5185\u628a\u670d\u52a1\u62c9\u8d77\u6765\u2014\u2014\u628a\u300c\u5f00\u673a\u4e00\u6b21\u6027\u673a\u4f1a\u300d\u53d8\u6210\u4e86\u300c\u6301\u7eed\u6536\u655b\u300d\u3002<\/p>\n<p>\u5b9e\u6d4b&#xff08;\u4e0d\u662f\u770b\u7740\u65e5\u5fd7\u731c&#xff09;&#xff1a;<\/p>\n<p>$ \/usr\/local\/sbin\/lightmem-watchdog.sh          # \u5065\u5eb7\u65f6&#xff1a;\u96f6\u52a8\u4f5c&#xff0c;\u65e5\u5fd7\u90fd\u6ca1\u751f\u6210<br \/>\n$ sudo service lightmem stop &amp;&amp; sudo service lightmem_mcp stop<br \/>\n$ \/usr\/local\/sbin\/lightmem-watchdog.sh<br \/>\n$ cat \/var\/log\/lightmem-watchdog.log<br \/>\n09:14:48 [watchdog] kernel 18443 \u4e0d\u5065\u5eb7&#xff0c;\u6267\u884c service lightmem start<br \/>\n09:14:52 [watchdog] kernel \u5df2\u6062\u590d&#xff08;pid 38046&#xff09;<br \/>\n09:14:52 [watchdog] mcp 18444 \u4e0d\u5065\u5eb7&#xff0c;\u6267\u884c service lightmem_mcp start<br \/>\n09:14:55 [watchdog] mcp \u5df2\u6062\u590d<\/p>\n<h3>\u4e5d\u3001\u53ef\u4ee5\u6284\u8d70\u7684\u4e03\u6761<\/h3>\n<li>\u72b6\u6001\u7c7b\u547d\u4ee4&#xff08;ifconfig\/jls\/service status&#xff09;\u4f1a\u9a97\u4eba&#xff0c;\u8ba1\u6570\u5668\u4e0d\u4f1a\u3002\u00a0\u94fe\u8def\u6000\u7591\u65f6\u5148\u00a0netstat -I &lt;if&gt; -b&#xff0c;\u770b\u00a0Ipkts\/Opkts\/Oerrs&#xff0c;\u522b\u53ea\u770b\u00a0status: active\u3002<\/li>\n<li>bridge0 addr\u00a0\u7684 MAC \u8868\u4e3a\u7a7a&#xff0c;\u662f\u4e2a\u6781\u5f3a\u7684\u8d1f\u5411\u4fe1\u53f7\u3002\u00a0\u6865\u8fde\u81ea\u5df1\u7684\u6210\u5458\u90fd\u6ca1\u5b66\u5230\u4e1c\u897f&#xff0c;\u8bf4\u660e\u5e27\u6839\u672c\u6ca1\u8fdb\u51fa\u3002<\/li>\n<li>\u6293\u4e0d\u4e86\u5305\u5c31\u6bd4\u8ba1\u6570\u3002\u00a0\u4e24\u7aef\u00a0netstat -I\u00a0\u7684\u6536\u53d1\u5dee&#xff0c;\u7b49\u4ef7\u4e8e\u4e00\u6b21\u5355\u5411 tcpdump&#xff0c;\u8fd8\u4e0d\u7528\u78b0 devfs\/BPF \u6743\u9650\u3002<\/li>\n<li>vnet jail \u7684 epair \u662f\u4e00\u6b21\u6027\u7528\u54c1\u3002\u00a0\u53ea\u8981\u8d70\u8fc7\u00a0restart&#xff0c;\u5c31\u91cd\u5efa&#xff1b;\u5224\u65ad\u300c\u574f\u6ca1\u574f\u300d\u4e0d\u5982\u76f4\u63a5\u91cd\u5efa\u4fbf\u5b9c\u3002<\/li>\n<li>\u9a8c\u8bc1\u670d\u52a1\u522b\u53ea\u770b\u7aef\u53e3\u3002\u00a0healthz\u00a0\u8bf4\u00a0status: ok\u00a0\u53ef\u80fd\u53ea\u8bfb\u4e86\u914d\u7f6e&#xff1b;\u8dd1\u4e00\u6b21\u771f\u5b9e\u7684\u4e1a\u52a1\u8bf7\u6c42&#xff08;\u8fd9\u91cc\u662f\u00a0POST \/tools\/memory\/recall\u00a0\u62ff\u5230\u547d\u4e2d&#xff09;\u624d\u7b97\u6570\u3002<\/li>\n<li>\u300c\u8d77\u4e0d\u6765\u300d\u548c\u300c\u6ca1\u542f\u52a8\u300d\u662f\u4e24\u4ef6\u4e8b\u3002\u00a0\u5148\u770b\u65e5\u5fd7\u91cc\u6709\u6ca1\u6709\u542f\u52a8\u8bb0\u5f55&#xff08;[boot]\u00a0\u4e4b\u7c7b&#xff09;&#xff0c;\u6ca1\u6709\u5c31\u8bf4\u660e\u5b83\u5361\u5728\u542f\u52a8\u524d\u7684\u68c0\u67e5\u91cc&#xff0c;\u65b9\u5411\u5b8c\u5168\u76f8\u53cd\u3002<\/li>\n<li>\u6392\u9519\u7b14\u8bb0\u8981\u5199\u300c\u600e\u4e48\u5224\u65ad\u300d&#xff0c;\u4e0d\u8981\u53ea\u5199\u300c\u600e\u4e48\u4fee\u300d\u3002\u00a0\u8fd9\u6b21\u80fd\u4e00\u6b21\u5b9a\u4f4d&#xff0c;\u9760\u7684\u662f\u65e7\u8bb0\u5fc6\u91cc\u90a3\u6761\u300cepairXa\u00a0\u8ba1\u6570\u5f02\u5e38\u300d\u7684\u7ebf\u7d22&#xff1b;\u800c\u65e7\u8bb0\u5fc6\u91cc\u300cbridge0 deletem\/addm\u00a0\u53ef\u4fee\u300d\u90a3\u6761\u662f\u9519\u7684\u2014\u2014\u9519\u7684\u7ed3\u8bba\u4f1a\u539f\u6837\u4f20\u7ed9\u81ea\u5df1\u4e0b\u4e00\u6b21&#xff0c;\u6240\u4ee5\u4fee\u5b8c\u8981\u56de\u53bb\u6539\u6389\u5b83\u3002<\/li>\n<hr \/>\n<p>\u6574\u4ef6\u4e8b\u6700\u503c\u5f97\u8bb0\u7684\u4e0d\u662f\u90a3\u56db\u6b65\u547d\u4ee4&#xff0c;\u800c\u662f\u4e00\u4e2a\u6559\u8bad&#xff1a;<\/p>\n<p>\u5f53\u6240\u6709\u300c\u72b6\u6001\u300d\u90fd\u6b63\u5e38\u3001\u53ea\u6709\u300c\u884c\u4e3a\u300d\u4e0d\u6b63\u5e38\u65f6&#xff0c;\u8bf4\u660e\u4f60\u5728\u770b\u9519\u7684\u4e1c\u897f\u3002<\/p>\n<p>ifconfig\u00a0\u770b\u7684\u662f\u914d\u7f6e&#xff0c;ping\u00a0\u770b\u7684\u662f\u884c\u4e3a\u3002\u8fd9\u6b21\u914d\u7f6e\u5168\u5bf9\u3001\u884c\u4e3a\u5168\u9519&#xff0c;\u5dee\u7684\u5c31\u662f\u90a3\u4e24\u884c\u4e0d\u8be5\u4e3a 0 \u7684\u8ba1\u6570\u5668\u3002<\/p>\n<\/p>\n<p>      <span id=\"quality-guide-article-end\" aria-hidden=\"true\" style=\"display:block;height:1px;margin-bottom:-1px\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content<\/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":[482,43,44],"topic":[],"class_list":["post-124286","post","type-post","status-publish","format-standard","hentry","category-server","tag-hive","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u670d\u52a1\u5668\u548cwindows\u5ba2\u6237\u7aef\u91cd\u542f\u540e,\u53d1\u73b0agent\u8fde\u4e0d\u4e0alightmem\u548chive mcp\u4e86 - \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\/124286.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u670d\u52a1\u5668\u548cwindows\u5ba2\u6237\u7aef\u91cd\u542f\u540e,\u53d1\u73b0agent\u8fde\u4e0d\u4e0alightmem\u548chive mcp\u4e86 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/124286.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-18T12:16:35+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=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/124286.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/124286.html\",\"name\":\"\u670d\u52a1\u5668\u548cwindows\u5ba2\u6237\u7aef\u91cd\u542f\u540e,\u53d1\u73b0agent\u8fde\u4e0d\u4e0alightmem\u548chive mcp\u4e86 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-11-18T12:16:35+00:00\",\"dateModified\":\"2026-11-18T12:16:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/124286.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/124286.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/124286.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u670d\u52a1\u5668\u548cwindows\u5ba2\u6237\u7aef\u91cd\u542f\u540e,\u53d1\u73b0agent\u8fde\u4e0d\u4e0alightmem\u548chive mcp\u4e86\"}]},{\"@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":"\u670d\u52a1\u5668\u548cwindows\u5ba2\u6237\u7aef\u91cd\u542f\u540e,\u53d1\u73b0agent\u8fde\u4e0d\u4e0alightmem\u548chive mcp\u4e86 - \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\/124286.html","og_locale":"zh_CN","og_type":"article","og_title":"\u670d\u52a1\u5668\u548cwindows\u5ba2\u6237\u7aef\u91cd\u542f\u540e,\u53d1\u73b0agent\u8fde\u4e0d\u4e0alightmem\u548chive mcp\u4e86 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content","og_url":"https:\/\/www.wsisp.com\/helps\/124286.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-11-18T12:16:35+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/124286.html","url":"https:\/\/www.wsisp.com\/helps\/124286.html","name":"\u670d\u52a1\u5668\u548cwindows\u5ba2\u6237\u7aef\u91cd\u542f\u540e,\u53d1\u73b0agent\u8fde\u4e0d\u4e0alightmem\u548chive mcp\u4e86 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-11-18T12:16:35+00:00","dateModified":"2026-11-18T12:16:35+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/124286.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/124286.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/124286.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u670d\u52a1\u5668\u548cwindows\u5ba2\u6237\u7aef\u91cd\u542f\u540e,\u53d1\u73b0agent\u8fde\u4e0d\u4e0alightmem\u548chive mcp\u4e86"}]},{"@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\/124286","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=124286"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/124286\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=124286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=124286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=124286"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=124286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}