{"id":107093,"date":"2020-05-30T10:44:34","date_gmt":"2020-05-30T02:44:34","guid":{"rendered":"http:\/\/4563.org\/?p=107093"},"modified":"2020-05-30T10:44:34","modified_gmt":"2020-05-30T02:44:34","slug":"%e4%b8%8d%e6%87%82%e5%b0%b1%e9%97%ae%ef%bc%8ccentos%e6%80%8e%e4%b9%88%e8%ae%be%e7%bd%ae%e6%ac%a2%e8%bf%8e%e9%a1%b5%e9%9d%a2%e7%9a%84%e5%8f%98%e9%87%8f%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=107093","title":{"rendered":"\u4e0d\u61c2\u5c31\u95ee\uff0ccentos\u600e\u4e48\u8bbe\u7f6e\u6b22\u8fce\u9875\u9762\u7684\u53d8\u91cf\uff1f"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>\u6715\u7684\u5927\u6e05\u5b8c\u4e86\uff1f<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>\u4e0d\u61c2\u5c31\u95ee\uff0ccentos\u600e\u4e48\u8bbe\u7f6e\u6b22\u8fce\u9875\u9762\u7684\u53d8\u91cf\uff1f<\/h3>\n<p>  \t\t\u4e4c\u73ed\u56fe \u5c45\u7136\u6709\u663e\u793a \u786c\u76d8\u5bb9\u91cf\u3002\u8fd9\u4e2a\u529f\u80fd\u6bd4\u8f83\u53cb\u597d\u554a <\/p>\n<p>  https:\/\/i.loli.net\/2020\/05\/30\/mFz9cMnL5I42hDj.png\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>shc<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tvi \/etc\/motd\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>kenshuren<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tdebian\u6b22\u8fce\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u6715\u7684\u5927\u6e05\u5b8c\u4e86\uff1f<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tshc \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-5-30 09:36<br \/>  vi \/etc\/motd<\/p>\n<p>  \u5e94\u8be5\u4e0d\u662f\u6b22\u8fce\u9875\uff0c<br \/>  \u662f\u767b\u9646\u540e \u6253\u5370\u51fa\u6765\u7684<\/p>\n<p>  \u6b22\u8fce\u9875\u91cc\u9762\u6ca1\u770b\u5230<\/p>\n<p>  Welcome to\u8fd8\u6bd4\u8f83\u540e \u6267\u884c\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>Nameless<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u52a8\u6001\u7684\u4fe1\u606f\u597d\u50cf\u4e0d\u662f \/etc\/motd<\/p>\n<p>  debian \u662f\u8fd9\u4e2a \/etc\/update-motd.d\/10-uname\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u5915\u65e5<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u53bb\u770b\u770b\u4f60ubuntu\u7684\/etc\/update-motd.d\/\u6587\u4ef6\u5939\uff0c\u4e0b\u9762\u6709\u4e00\u5806\u6587\u4ef6\uff0c\u5206\u522b\u8d1f\u8d23\u4e0d\u540c\u7684\u529f\u80fd\uff0c\u76f4\u63a5\u628a\u6587\u4ef6\u5220\u4e86\u5c31\u6ca1\u6709\u8fd9\u663e\u793a\u4e86\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u6715\u7684\u5927\u6e05\u5b8c\u4e86\uff1f<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 \u6715\u7684\u5927\u6e05\u5b8c\u4e86\uff1f \u4e8e 2020-5-30 10:05 \u7f16\u8f91 <\/p>\n<p> \u5915\u65e5 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-5-30 09:50<br \/>  \u53bb\u770b\u770b\u4f60ubuntu\u7684\/etc\/update-motd.d\/\u6587\u4ef6\u5939\uff0c\u4e0b\u9762\u6709\u4e00\u5806\u6587\u4ef6\uff0c\u5206\u522b\u8d1f\u8d23\u4e0d\u540c\u7684\u529f\u80fd\uff0c\u76f4\u63a5\u628a\u6587\u4ef6\u5220\u4e86\u5c31\u6ca1\u6709 &#8230;<\/p>\n<p>  \u53ef\u4ee5 \u53ef\u4ee5 \u8c22\u8c22\u662f50-landscape-sysinfo\u8fd9\u4e2a\u6587\u4ef6\uff0c<\/p>\n<p>  \u4f46\u662fcentos\u6709\u8fd9\u6837\u7684 \u201c\u53cb\u597d\u201d\u529f\u80fd\u5417<\/p>\n<p>  #!\/bin\/sh<br \/>  cores=$(grep -c ^processor \/proc\/cpuinfo 2&gt;\/dev\/null)<br \/>  [ &quot;$cores&quot; -eq &quot;0&quot; ] &amp;&amp; cores=1<br \/>  threshold=&quot;${cores:-1}.0&quot;<br \/>  if [ $(echo &quot;`cut -f1 -d &#8216; &#8216; \/proc\/loadavg` &lt; $threshold&quot; | bc) -eq 1 ]; then<br \/>  &nbsp; &nbsp; echo<br \/>  &nbsp; &nbsp; echo -n &quot;System information as of &quot;<br \/>  &nbsp; &nbsp; \/bin\/date<br \/>  &nbsp; &nbsp; echo<br \/>  &nbsp; &nbsp; \/usr\/bin\/landscape-sysinfo<br \/>  else<br \/>  &nbsp; &nbsp; echo<br \/>  &nbsp; &nbsp; echo &quot; System information disabled due to load higher than $threshold&quot;<br \/>  fi<\/p>\n<p>  centos \u6ca1\u6709\u8fd9\u6587\u4ef6<\/p>\n<p>  test.sh: line 10: \/usr\/bin\/landscape-sysinfo: No such file or directory\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u55f7\u55f7<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6539\u6210Hello Debian\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u6715\u7684\u5927\u6e05\u5b8c\u4e86\uff1f<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u55f7\u55f7 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-5-30 10:03<br \/>  \u6539\u6210Hello Debian<\/p>\n<p> centos \u7528\u7684\u4e60\u60ef\u5440\u3002\u6539\u4e0d\u4e86\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6715\u7684\u5927\u6e05\u5b8c\u4e86\uff1f \u5927\u4f6c\u6709\u8bdd\u8bf4 : \u4e0d&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/107093"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=107093"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/107093\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=107093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=107093"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=107093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}