﻿{"id":3546,"date":"2020-11-29T14:01:22","date_gmt":"2020-11-29T06:01:22","guid":{"rendered":"https:\/\/www.linuxmi.com\/?p=3546"},"modified":"2020-11-29T16:29:25","modified_gmt":"2020-11-29T08:29:25","slug":"linux-sysmon","status":"publish","type":"post","link":"https:\/\/www.linuxmi.com\/linux-sysmon.html","title":{"rendered":"Sysmon &#8211; \u7528\u4e8eLinux\u7684\u56fe\u5f62\u7cfb\u7edf\u6d3b\u52a8\u76d1\u89c6\u5668"},"content":{"rendered":"<p>Sysmon\u662f\u7c7b\u4f3c\u4e8eWindows\u4efb\u52a1\u7ba1\u7406\u5668\u7684Linux\u6d3b\u52a8\u76d1\u89c6\u5de5\u5177\uff0c\u5b83\u662f\u7528Python\u7f16\u5199\u7684\uff0c\u5e76\u6839\u636eGPL-3.0\u8bb8\u53ef\u53d1\u5e03\u3002\u8fd9\u662f\u4e00\u4e2a\u56fe\u5f62\u5316\u7684\u53ef\u89c6\u5316\u5de5\u5177\uff0c\u7528\u4e8e\u53ef\u89c6\u5316\u4ee5\u4e0b\u6570\u636e\u3002<\/p>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u50cfUbuntu\u8fd9\u6837\u7684\u53d1\u884c\u7248\u90fd\u5e26\u6709\u7cfb\u7edf\u76d1\u89c6\u5de5\u5177\uff0c\u4f46\u662f\u9ed8\u8ba4\u76d1\u89c6\u5de5\u5177\u7684\u7f3a\u70b9\u662f\u5b83\u4e0d\u663e\u793aHDD\uff0cSSD\u548cGPU\u8d1f\u8f7d\u3002<\/p>\n<p>Sysmon\u5c06\u6240\u6709\u7279\u6027\u6dfb\u52a0\u5230\u4e00\u4e2a\u5355\u72ec\u7684\u4f4d\u7f6e\uff0c\u7c7b\u4f3c\u4e8eWindows\u4efb\u52a1\u7ba1\u7406\u5668\u3002<\/p>\n<ul>\n<li>CPU \/ GPU\u5229\u7528\u7387\u548c\u6bcf\u6838\u65f6\u949f\u901f\u5ea6\u3002<\/li>\n<li>\u5185\u5b58\u548c\u4ea4\u6362\u5229\u7528\u7387\u3002<\/li>\n<li>\u7f51\u7edc\u5229\u7528\u7387\uff08WLAN\u548c\u4ee5\u592a\u7f51\uff09\u3002WLAN\u94fe\u8def\u5e26\u5bbd\u4f1a\u4e0d\u65ad\u66f4\u65b0\u3002<\/li>\n<li>SSD \/ HDD\u5229\u7528\u7387\u3002<\/li>\n<li>\u8fd0\u884c\u8fc7\u7a0b\u6982\u8ff0\u3002<\/li>\n<\/ul>\n<p>\u5728\u672c\u6587\u4e2d\uff0c\u60a8\u5c06\u5b66\u4e60\u5982\u4f55\u5728Linux\u684c\u9762\u7cfb\u7edf\u4e2d\u5b89\u88c5\u548c\u4f7f\u7528Sysmon\u76d1\u89c6\u5de5\u5177\u3002<\/p>\n<p><strong>\u5b89\u88c5Sysmon Linux Monitor\u5de5\u5177<\/strong><\/p>\n<p>\u7531\u4e8esysmon\u662f\u7528python\u7f16\u5199\u7684\uff0c\u56e0\u6b64\u60a8\u9700\u8981\u5728\u8ba1\u7b97\u673a\u4e2d\u5b89\u88c5python\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668PIP\u3002Sysmon\u4f9d\u8d56\u4e8e\u4ee5\u4e0b\u8f6f\u4ef6\u5305pyqtgraph\uff0cnumpy\u548cpyqt5\u3002<\/p>\n<p><strong>\u4f7f\u7528PIP\u5b89\u88c5Sysmon<\/strong><\/p>\n<p>\u4f7f\u7528PIP\u5b89\u88c5sysmon\u65f6\uff0c\u5c06\u81ea\u52a8\u5b89\u88c5\u4f9d\u8d56\u9879\u3002<\/p>\n<p>linuxmi@linuxmi:~\/www.linuxmi.com$ pip install sysmon [\u5bf9\u4e8ePython2 ]<br \/>\nlinuxmi@linuxmi:~\/www.linuxmi.com$ pip3 install sysmon [\u5bf9\u4e8e Python3 ]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4352\" src=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-1.png\" alt=\"\" width=\"866\" height=\"425\" \/><\/p>\n<p>\u6ce8\u610f\uff1a\u6839\u636e\u60a8\u914d\u7f6ePIP\u7684\u65b9\u5f0f\uff0c\u60a8\u9700\u8981\u4f7f\u7528PIP\u6216PIP3\uff0c\u6709\u65f6PIP3\u5c06\u662f\u6307\u5411PIP\u7684\u7b26\u53f7\u94fe\u63a5\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5177\u6709Nvidia GPU\uff0c\u5219\u5fc5\u987b\u5b89\u88c5nvidia-smi\u8fdb\u884c\u76d1\u89c6\u3002<\/p>\n<p><strong>\u4f7f\u7528GitHub Repo\u5b89\u88c5Sysmon<\/strong><\/p>\n<p>\u6216\u8005\uff0c\u60a8\u53ef\u4ee5\u4eceGithub\u4e2d\u63d0\u53d6\u5b58\u50a8\u5e93\u5e76\u5b89\u88c5\u8f6f\u4ef6\u5305\u3002\u4f46\u662f\uff0c\u5f53\u91c7\u7528\u8fd9\u79cd\u65b9\u6cd5\u65f6\uff0c\u60a8\u5fc5\u987b\u786e\u4fdd\u72ec\u7acb\u5b89\u88c5\u4e86\u76f8\u5173\u8f6f\u4ef6\u5305\uff08numpy\uff0cpyqtgraph\uff0cpyqt5\uff09\u3002<\/p>\n<p>linuxmi@linuxmi:~\/www.linuxmi.com$ pip install pyqtgraph pyqt5 numpy [\u5bf9\u4e8e Python2 ]<br \/>\nlinuxmi@linuxmi:~\/www.linuxmi.com$ pip3 install pyqtgraph pyqt5 numpy [\u5bf9\u4e8e Python3 ]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4353 size-full\" src=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-2.png\" alt=\"\" width=\"866\" height=\"271\" \/><\/p>\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4ecepip\u68c0\u67e5\u5df2\u5b89\u88c5\u8f6f\u4ef6\u5305\u7684\u5217\u8868\u3002<\/p>\n<p>&#8212;&#8212;&#8212;- Python 2 &#8212;&#8212;&#8212;-<br \/>\nlinuxmi@linuxmi:~\/www.linuxmi.com$ pip list #\u5217\u51fa\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305<br \/>\nlinuxmi@linuxmi:~\/www.linuxmi.com$ pip show pyqt5 numpy pyqtgraph #\u663e\u793a\u6709\u5173\u8f6f\u4ef6\u5305\u7684\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<p>&#8212;&#8212;&#8212;- Python 3 &#8212;&#8212;&#8212;-<br \/>\nlinuxmi@linuxmi:~\/www.linuxmi.com$ pip3 list #\u5217\u51fa\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4354\" src=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-3.png\" alt=\"\" width=\"866\" height=\"623\" \/><\/p>\n<p>linuxmi@linuxmi:~\/www.linuxmi.com$ pip3 show pyqt5 numpy pyqtgraph #\u663e\u793a\u6709\u5173\u8f6f\u4ef6\u5305\u7684\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4355 size-full\" src=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-4.png\" alt=\"\" width=\"866\" height=\"887\" \/><\/p>\n<p>\u73b0\u5728\uff0c\u901a\u8fc7\u4eceGitHub\u590d\u5236\u5b58\u50a8\u5e93\uff0c\u6ee1\u8db3\u4e86\u4f9d\u8d56\u6027\u5e76\u5f88\u597d\u5730\u5b89\u88c5sysmon\u3002<\/p>\n<p>linuxmi@linuxmi:~\/www.linuxmi.com$ git clone https:\/\/github.com\/MatthiasSchinzel\/sysmon.git<br \/>\nlinuxmi@linuxmi:~\/www.linuxmi.com$ cd sysmon\/src\/sysmon<br \/>\nlinuxmi@linuxmi:~\/www.linuxmi.com\/sysmon\/src\/sysmon$ python3 sysmon.py<\/p>\n<p>\u9996\u9009\u65b9\u6cd5\u662f\u4f7f\u7528PIP\u5b89\u88c5\u8f6f\u4ef6\u5305\uff0c\u56e0\u4e3aPIP\u5904\u7406\u6240\u6709\u4f9d\u8d56\u5173\u7cfb\u5e76\u4fdd\u6301\u5b89\u88c5\u7b80\u5355\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Linux\u4e2d\u4f7f\u7528Sysmon<\/strong><\/p>\n<p>\u8981\u542f\u52a8sysmon\uff0c\u53ea\u9700\u5728\u7ec8\u7aef\u4e0a\u952e\u5165sysmon\u5373\u53ef\u3002<\/p>\n<p>linuxmi@linuxmi:~\/www.linuxmi.com$ sysmon<\/p>\n<p>\u6240\u6709\u6570\u636e\u70b9\u90fd\u4ece\/proc\u76ee\u5f55\u4e2d\u83b7\u53d6\u3002<\/p>\n<ul>\n<li>CPU\u6570\u636e\u4ece\/proc\/cpuinfo\u548c\/proc\/stat\u4e2d\u83b7\u53d6\u3002<\/li>\n<li>\u5185\u5b58\u6570\u636e\u662f\u4ece\/proc\/meminfo\u83b7\u53d6\u3002<\/li>\n<li>\u78c1\u76d8\u6570\u636e\u4ece\/proc\/diskstats\u83b7\u53d6\u3002<\/li>\n<li>\u7f51\u7edc\u6570\u636e\u4ece\/proc\/net\/dev\u548ciwconfig (Wlan)\u4e2d\u83b7\u53d6\u3002<\/li>\n<li>\u8fdb\u7a0b\u6570\u636e\u4ece\u201cps -aux\u201d\u547d\u4ee4\u4e2d\u83b7\u53d6\u3002<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-1-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4357 size-large\" src=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-1-1-1024x576.png\" alt=\"\" width=\"731\" height=\"411\" srcset=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-1-1-1024x576.png 1024w, https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-1-1.png 1920w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">Sysmon Linux\u8fdb\u7a0b\u76d1\u89c6\u5668<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-2-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4358 size-large\" src=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-2-1-1024x576.png\" alt=\"\" width=\"731\" height=\"411\" srcset=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-2-1-1024x576.png 1024w, https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-2-1.png 1920w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">Sysmon Linux\u7f51\u7edc\u548c\u78c1\u76d8\u76d1\u89c6\u5668<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-3-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4359 size-large\" src=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-3-1-1024x576.png\" alt=\"\" width=\"731\" height=\"411\" srcset=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-3-1-1024x576.png 1024w, https:\/\/www.linuxmi.com\/wp-content\/uploads\/2020\/11\/Sysmon-3-1.png 1920w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">Sysmon Linux CPU\u548c\u5185\u5b58\u76d1\u89c6\u5668<\/p>\n<p>\u672c\u6587\u5c31\u662f\u8fd9\u6837\u3002 \u8be5\u5de5\u5177\u76ee\u524d\u8fd8\u5904\u4e8e\u6700\u521d\u9636\u6bb5\uff0c\u8fd8\u6709\u8bb8\u591a\u529f\u80fd\uff0c\u5982IOWait\uff0c\u5bf9Intel\u548cAMD GPU\u7684\u652f\u6301\uff0c\u6697\u6a21\u5f0f\uff0c\u7ec8\u6b62\u8fdb\u7a0b\uff0c\u6392\u5e8f\u7b49\uff0c\u90fd\u5c06\u6dfb\u52a0\u3002 \u8ba9\u6211\u4eec\u62ed\u76ee\u4ee5\u5f85\uff0c\u770b\u770b\u8be5\u5de5\u5177\u5728\u4ee5\u540e\u7684\u65e5\u5b50\u91cc\u4f1a\u4e0d\u4f1a\u53d8\u5f97\u66f4\u6210\u719f\u3002<\/p>\n<p>\u9879\u76ee\u5730\u5740\uff1a<a href=\"https:\/\/github.com\/MatthiasSchinzel\/sysmon\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/MatthiasSchinzel\/sysmon<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sysmon\u662f\u7c7b\u4f3c\u4e8eWindows\u4efb\u52a1\u7ba1\u7406\u5668\u7684Linux\u6d3b\u52a8\u76d1\u89c6\u5de5\u5177\uff0c\u5b83\u662f\u7528Python\u7f16\u5199\u7684\uff0c\u5e76\u6839 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":4358,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[394],"class_list":["post-3546","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-sysmon"],"aioseo_notices":[],"views":2108,"_links":{"self":[{"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/posts\/3546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/comments?post=3546"}],"version-history":[{"count":13,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/posts\/3546\/revisions"}],"predecessor-version":[{"id":4361,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/posts\/3546\/revisions\/4361"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/media\/4358"}],"wp:attachment":[{"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/media?parent=3546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/categories?post=3546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/tags?post=3546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}