{"id":946,"date":"2019-04-19T16:37:26","date_gmt":"2019-04-19T08:37:26","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=946"},"modified":"2023-05-01T14:16:11","modified_gmt":"2023-05-01T06:16:11","slug":"watch","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/watch","title":{"rendered":"watch\u547d\u4ee4 &#8211; \u5468\u671f\u6027\u6267\u884c\u4efb\u52a1\u547d\u4ee4"},"content":{"rendered":"\n<p>watch\u547d\u4ee4\u6765\u81ea\u82f1\u6587\u5355\u8bcd\u201c\u89c2\u5bdf\u3001\u76d1\u89c6\u201d\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u5468\u671f\u6027\u6267\u884c\u4efb\u52a1\u547d\u4ee4\u3002watch\u547d\u4ee4\u4f1a\u4ee5\u5468\u671f\u6027\u7684\u65b9\u5f0f\u6267\u884c\u6307\u5b9a\u547d\u4ee4\uff0c\u4f8b\u5982\u6bcf\u9694\u51e0\u79d2\u949f\u3001\u51e0\u5206\u949f\u6267\u884c\u4e00\u6b21\uff0c\u6301\u7eed\u5173\u6ce8\u67d0\u4e2a\u547d\u4ee4\u7684\u8fd0\u884c\u7ed3\u679c\uff0c\u514d\u53bb\u8fd0\u7ef4\u4eba\u5458\u4e00\u904d\u904d\u5730\u624b\u52a8\u8fd0\u884c\u3002<\/p>\n\n\n\n<p><strong>\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>watch [\u53c2\u6570] \u4efb\u52a1\u547d\u4ee4<\/p>\n\n\n\n<p><strong>\u5e38\u7528\u53c2\u6570\uff1a\ufeff<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>-b<\/td><td>\u4efb\u52a1\u547d\u4ee4\u5931\u8d25\u65f6\u53d1\u51fa\u8b66\u62a5\u58f0<\/td><\/tr><tr><td>-d<\/td><td>\u9ad8\u4eae\u663e\u793a\u53d8\u5316\u5185\u5bb9<\/td><\/tr><tr><td>-e<\/td><td>\u4efb\u52a1\u547d\u4ee4\u9519\u8bef\u65f6\u505c\u6b62\u66f4\u65b0<\/td><\/tr><tr><td>-g<\/td><td>\u4efb\u52a1\u547d\u4ee4\u53d8\u5316\u65f6\u505c\u6b62\u66f4\u65b0<\/td><\/tr><tr><td>-h<\/td><td>\u663e\u793a\u5e2e\u52a9\u4fe1\u606f<\/td><\/tr><tr><td>-n<\/td><td>\u8bbe\u7f6e\u95f4\u9694\u65f6\u95f4<\/td><\/tr><tr><td>-t<\/td><td>\u4e0d\u663e\u793a\u9876\u90e8\u7684\u683c\u5f0f<\/td><\/tr><tr><td>-v<\/td><td>\u663e\u793a\u7248\u672c\u4fe1\u606f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>\u53c2\u8003\u793a\u4f8b<\/strong><\/p>\n\n\n\n<p>\u8bbe\u5b9a\u6bcf\u95f4\u96941\u79d2\u949f\u6267\u884c\u4e00\u6b21\u6307\u5b9a\u547d\u4ee4\uff0c\u7528\u4e8e\u76d1\u89c6\u7cfb\u7edf\u8d1f\u8f7d\u60c5\u51b5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]#<strong> watch -n 1 uptime<\/strong><\/pre>\n\n\n\n<p>\u9ed8\u8ba4\u6bcf\u95f4\u96942\u79d2\u949f\u6267\u884c\u4e00\u6b21\u6307\u5b9a\u547d\u4ee4\uff0c\u7528\u4e8e\u76d1\u89c6\u7f51\u7edc\u94fe\u63a5\u60c5\u51b5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]# <strong>watch \"netstat -ant\"<\/strong><\/pre>\n\n\n\n<p>\u9ed8\u8ba4\u6bcf\u95f4\u96942\u79d2\u949f\u6267\u884c\u4e00\u6b21\u6307\u5b9a\u547d\u4ee4\uff0c\u7528\u4e8e\u76d1\u89c6\u78c1\u76d8\u4f7f\u7528\u60c5\u51b5\uff0c\u5e76\u9ad8\u4eae\u663e\u793a\u53d8\u5316\u4fe1\u606f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]# <strong>watch -d \"df -h\"<\/strong><\/pre>\n\n\n\n<p>\u8bbe\u5b9a\u6bcf\u95f4\u96942\u5206\u949f\u6267\u884c\u4e00\u6b21\u6307\u5b9a\u547d\u4ee4\uff0c\u7528\u4e8e\u89c2\u5bdf\u6587\u4ef6\u5185\u5bb9\u53d8\u5316\u60c5\u51b5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]# <strong>watch -n 120 \"cat File.cfg\"<\/strong><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>watch\u547d\u4ee4\u6765\u81ea\u82f1\u6587\u5355\u8bcd\u201c\u89c2\u5bdf\u3001\u76d1\u89c6\u201d\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u5468\u671f\u6027\u6267\u884c\u4efb\u52a1\u547d\u4ee4\u3002watch\u547d\u4ee4\u4f1a\u4ee5\u5468\u671f\u6027\u7684\u65b9\u5f0f\u6267\u884c\u6307 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-946","post","type-post","status-publish","format-standard","hentry","category-system"],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=946"}],"version-history":[{"count":12,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/946\/revisions"}],"predecessor-version":[{"id":14603,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/946\/revisions\/14603"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}