{"id":63860,"date":"2023-11-23T19:17:10","date_gmt":"2023-11-23T11:17:10","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=63860"},"modified":"2023-11-23T19:17:10","modified_gmt":"2023-11-23T11:17:10","slug":"pydash-performance-tool","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/pydash-performance-tool.html","title":{"rendered":"pyDash \uff1a Linux \u6027\u80fd\u76d1\u6d4b\u5de5\u5177"},"content":{"rendered":"

pyDash<\/span> \u662f\u4e00\u4e2a\u8f7b\u91cf\u4e14\u57fa\u4e8e web \u7684 Linux \u6027\u80fd\u76d1\u6d4b\u5de5\u5177<\/a>\uff0c\u5b83\u662f\u7528 Python \u548c Django<\/a> \u52a0\u4e0a Chart.js \u6765\u5199\u7684\u3002\u7ecf\u6d4b\u8bd5\uff0c\u5728\u4e0b\u9762\u8fd9\u4e9b\u4e3b\u6d41 Linux \u53d1\u884c\u7248\u4e0a\u53ef\u8fd0\u884c\uff1aCentOS\u3001Fedora\u3001Ubuntu\u3001Debian\u3001Raspbian \u4ee5\u53ca Pidora \u3002<\/p>\n

\"pyDash\uff1a\u4e00\u4e2a\u57fa\u4e8e<\/p>\n

\u4f60\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e2a\u5de5\u5177\u6765\u76d1\u89c6\u4f60\u7684 Linux \u4e2a\u4eba\u7535\u8111\/\u670d\u52a1\u5668\u8d44\u6e90\uff0c\u6bd4\u5982 CPU\u3001\u5185\u5b58\u3001\u7f51\u7edc\u7edf\u8ba1\uff0c\u5305\u62ec\u5728\u7ebf\u7528\u6237\u7684\u8fdb\u7a0b\u4ee5\u53ca\u66f4\u591a\u3002\u4eea\u8868\u76d8\u5b8c\u5168\u7531\u4e3b\u8981\u7684 Python \u53d1\u884c\u7248\u672c\u6240\u63d0\u4f9b\u7684 Python \u5e93\u5f00\u53d1\uff0c\u56e0\u6b64\u5b83\u7684\u4f9d\u8d56\u5173\u7cfb\u5f88\u5c11\uff0c\u4f60\u4e0d\u9700\u8981\u5b89\u88c5\u8bb8\u591a\u5305\u6216\u5e93\u6765\u8fd0\u884c\u5b83\u3002<\/p>\n

\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u5c06\u5c55\u793a\u5982\u4f55\u5b89\u88c5 pyDash<\/span> \u6765\u76d1\u6d4b Linux \u670d\u52a1\u5668\u6027\u80fd\u3002<\/p>\n

\u5982\u4f55\u5728 Linux \u7cfb\u7edf\u4e0b\u5b89\u88c5 pyDash<\/strong><\/div>\n

1\u3001\u9996\u5148\uff0c\u50cf\u4e0b\u9762\u8fd9\u6837\u5b89\u88c5\u9700\u8981\u7684\u8f6f\u4ef6\u5305 git<\/span> \u548c Python pip<\/span>\uff1a<\/p>\n

-------------- \u5728 Debian\/Ubuntu \u4e0a --------------\r\n$ sudo apt-get install git python-pip\r\n-------------- \u5728 CentOS\/RHEL \u4e0a --------------\r\n# yum install epel-release\r\n# yum install git python-pip\r\n-------------- \u5728 Fedora 22+ \u4e0a --------------\r\n# dnf install git python-pip\r\n<\/pre>\n

2\u3001\u5982\u679c\u5b89\u88c5\u597d\u4e86 git \u548c Python pip\uff0c\u90a3\u4e48\u63a5\u4e0b\u6765\uff0c\u50cf\u4e0b\u9762\u8fd9\u6837\u5b89\u88c5 virtualenv<\/span>\uff0c\u5b83\u6709\u52a9\u4e8e\u5904\u7406\u9488\u5bf9 Python \u9879\u76ee\u7684\u4f9d\u8d56\u5173\u7cfb\uff1a<\/p>\n

# pip install virtualenv\r\n\u6216\r\n$ sudo pip install virtualenv\r\n<\/pre>\n

3\u3001\u73b0\u5728\uff0c\u50cf\u4e0b\u9762\u8fd9\u6837\u4f7f\u7528 git<\/span> \u547d\u4ee4\uff0c\u628a pyDash \u4ed3\u5e93\u514b\u9686\u5230 home \u76ee\u5f55\u4e2d\uff1a<\/p>\n

# git clone https:\/\/github.com\/k3oni\/pydash.git\r\n# cd pydash\r\n<\/pre>\n

4\u3001\u4e0b\u4e00\u6b65\uff0c\u4f7f\u7528\u4e0b\u9762\u7684 virtualenv<\/span> \u547d\u4ee4\u4e3a\u9879\u76ee\u521b\u5efa\u4e00\u4e2a\u53eb\u505a pydashtest<\/span> \u865a\u62df\u73af\u5883\uff1a<\/p>\n

$ virtualenv pydashtest #give a name for your virtual environment like pydashtest\r\n<\/pre>\n

\"pyDash\uff1a\u4e00\u4e2a\u57fa\u4e8e<\/p>\n

\u521b\u5efa\u865a\u62df\u73af\u5883<\/em><\/p>\n

\u91cd\u8981\uff1a\u8bf7\u6ce8\u610f\uff0c\u4e0a\u9762\u7684\u5c4f\u5e55\u622a\u56fe\u4e2d\uff0c\u865a\u62df\u73af\u5883\u7684 bin<\/span> \u76ee\u5f55\u88ab\u9ad8\u4eae\u663e\u793a\uff0c\u4f60\u7684\u53ef\u80fd\u548c\u8fd9\u4e0d\u4e00\u6837\uff0c\u53d6\u51b3\u4e8e\u4f60\u628a pyDash \u76ee\u5f55\u514b\u9686\u5230\u4ec0\u4e48\u4f4d\u7f6e\u3002<\/p>\n

5\u3001\u521b\u5efa\u597d\u865a\u62df\u73af\u5883\uff08pydashtest<\/span>\uff09\u4ee5\u540e\uff0c\u4f60\u9700\u8981\u5728\u4f7f\u7528\u524d\u50cf\u4e0b\u9762\u8fd9\u6837\u6fc0\u6d3b\u5b83\uff1a<\/p>\n

$ source \/home\/aaronkilik\/pydash\/pydashtest\/bin\/activate\r\n<\/pre>\n

\"pyDash\uff1a\u4e00\u4e2a\u57fa\u4e8e<\/p>\n

\u6fc0\u6d3b\u865a\u62df\u73af\u5883<\/em><\/p>\n

\u4ece\u4e0a\u9762\u7684\u5c4f\u5e55\u622a\u56fe\u4e2d\uff0c\u4f60\u53ef\u4ee5\u6ce8\u610f\u5230\uff0c\u63d0\u793a\u5b57\u7b26\u4e32 1\uff08PS1<\/span>\uff09\u5df2\u7ecf\u53d1\u751f\u6539\u53d8\uff0c\u8fd9\u8868\u660e\u865a\u62df\u73af\u5883\u5df2\u7ecf\u88ab\u6fc0\u6d3b\uff0c\u800c\u4e14\u53ef\u4ee5\u5f00\u59cb\u4f7f\u7528\u3002<\/p>\n

6\u3001\u73b0\u5728\uff0c\u5b89\u88c5 pydash \u9879\u76ee requirements\uff1b\u5982\u4f55\u4f60\u597d\u5947\u7684\u8bdd\uff0c\u53ef\u4ee5\u4f7f\u7528 cat \u547d\u4ee4<\/a>\u67e5\u770b requirements.txt<\/span> \u7684\u5185\u5bb9\uff0c\u7136\u540e\u50cf\u4e0b\u9762\u6240\u793a\u90a3\u6837\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n

$ cat requirements.txt\r\n$ pip install -r requirements.txt\r\n<\/pre>\n

7\u3001\u73b0\u5728\uff0c\u8fdb\u5165 pydash<\/span> \u76ee\u5f55\uff0c\u91cc\u9762\u5305\u542b\u4e00\u4e2a\u540d\u4e3a settings.py<\/span> \u7684\u6587\u4ef6\uff0c\u4e5f\u53ef\u76f4\u63a5\u8fd0\u884c\u4e0b\u9762\u7684\u547d\u4ee4\u6253\u5f00\u8fd9\u4e2a\u6587\u4ef6\uff0c\u7136\u540e\u628a SECRET_KEY<\/span> \u6539\u4e3a\u4e00\u4e2a\u7279\u5b9a\u503c\uff1a<\/p>\n

$ vi pydash\/settings.py\r\n<\/pre>\n

\"pyDash\uff1a\u4e00\u4e2a\u57fa\u4e8e<\/p>\n

\u8bbe\u7f6e\u5bc6\u5319<\/em><\/p>\n

\u4fdd\u5b58\u6587\u4ef6\u7136\u540e\u9000\u51fa\u3002<\/p>\n

8\u3001\u4e4b\u540e\uff0c\u8fd0\u884c\u4e0b\u9762\u7684\u547d\u4ee4\u6765\u521b\u5efa\u4e00\u4e2a\u9879\u76ee\u6570\u636e\u5e93\u548c\u5b89\u88c5 Django \u7684\u8eab\u4efd\u9a8c\u8bc1\u7cfb\u7edf\uff0c\u5e76\u521b\u5efa\u4e00\u4e2a\u9879\u76ee\u7684\u8d85\u7ea7\u7528\u6237\uff1a<\/p>\n

$ python manage.py syncdb\r\n<\/pre>\n

\u6839\u636e\u4f60\u7684\u60c5\u51b5\u56de\u7b54\u4e0b\u9762\u7684\u95ee\u9898\uff1a<\/p>\n

Would you like to create one now? (yes\/no): yes\r\nUsername (leave blank to use 'root'): admin\r\nEmail address: aaronkilik@gmail.com\r\nPassword: ###########\r\nPassword (again): ############\r\n<\/pre>\n

\"pyDash\uff1a\u4e00\u4e2a\u57fa\u4e8e<\/p>\n

\u521b\u5efa\u9879\u76ee\u6570\u636e\u5e93<\/em><\/p>\n

9\u3001\u8fd9\u4e2a\u65f6\u5019\uff0c\u4e00\u5207\u90fd\u8bbe\u7f6e\u597d\u4e86\uff0c\u7136\u540e\uff0c\u8fd0\u884c\u4e0b\u9762\u7684\u547d\u4ee4\u6765\u542f\u7528 Django \u5f00\u53d1\u670d\u52a1\u5668\uff1a<\/p>\n

$ python manage.py runserver\r\n<\/pre>\n

10\u3001\u63a5\u4e0b\u6765\uff0c\u6253\u5f00\u4f60\u7684 web \u6d4f\u89c8\u5668\uff0c\u8f93\u5165\u7f51\u5740\uff1ahttp:\/\/127.0.0.1:8000\/<\/span> \u8fdb\u5165 web \u63a7\u5236\u53f0\u767b\u5f55\u754c\u9762\uff0c\u8f93\u5165\u4f60\u5728\u7b2c 8 \u6b65\u4e2d\u521b\u5efa\u6570\u636e\u5e93\u548c\u5b89\u88c5 Django \u8eab\u4efd\u9a8c\u8bc1\u7cfb\u7edf\u65f6\u521b\u5efa\u7684\u8d85\u7ea7\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u7136\u540e\u70b9\u51fb\u767b\u5f55\u3002<\/p>\n

\"pyDash\uff1a\u4e00\u4e2a\u57fa\u4e8e<\/p>\n

pyDash \u767b\u5f55\u754c\u9762<\/em><\/p>\n

11\u3001\u767b\u5f55\u5230 pydash \u4e3b\u9875\u9762\u4ee5\u540e\uff0c\u4f60\u5c06\u4f1a\u53ef\u4ee5\u770b\u5230\u76d1\u6d4b\u7cfb\u7edf\u7684\u57fa\u672c\u4fe1\u606f\uff0c\u5305\u62ec CPU\u3001\u5185\u5b58\u548c\u786c\u76d8\u4f7f\u7528\u91cf\u4ee5\u53ca\u7cfb\u7edf\u5e73\u5747\u8d1f\u8f7d\u3002<\/p>\n

\u5411\u4e0b\u6eda\u52a8\u4fbf\u53ef\u67e5\u770b\u66f4\u591a\u90e8\u5206\u7684\u4fe1\u606f\u3002<\/p>\n

\"pyDash\uff1a\u4e00\u4e2a\u57fa\u4e8e<\/p>\n

pydash \u670d\u52a1\u5668\u6027\u80fd\u6982\u8ff0<\/em><\/p>\n

12\u3001\u4e0b\u4e00\u4e2a\u5c4f\u5e55\u622a\u56fe\u663e\u793a\u7684\u662f\u4e00\u6bb5 pydash \u7684\u8ddf\u8e2a\u754c\u9762\uff0c\u5305\u62ec IP \u5730\u5740\u3001\u4e92\u8054\u7f51\u6d41\u91cf\u3001\u786c\u76d8\u8bfb\/\u5199\u3001\u5728\u7ebf\u7528\u6237\u4ee5\u53ca netstats \u3002<\/p>\n

\"pyDash\uff1a\u4e00\u4e2a\u57fa\u4e8e<\/p>\n

pyDash \u7f51\u7edc\u6982\u8ff0<\/em><\/p>\n

13\u3001\u4e0b\u4e00\u4e2a pydash \u4e3b\u9875\u9762\u7684\u622a\u56fe\u663e\u793a\u4e86\u4e00\u90e8\u5206\u7cfb\u7edf\u4e2d\u88ab\u76d1\u89c6\u7684\u6d3b\u8dc3\u8fdb\u7a0b\u3002<\/p>\n

\"pyDash\uff1a\u4e00\u4e2a\u57fa\u4e8e<\/p>\n

pyDash \u76d1\u89c6\u6d3b\u8dc3 Linux \u8fdb\u7a0b<\/em><\/p>\n

\u5982\u679c\u60f3\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u5728 GitHub \u4e0a\u67e5\u770b pydash\uff1ahttps:\/\/github.com\/k3oni\/pydash<\/a><\/p>\n

\u8fd9\u5c31\u662f\u5168\u90e8\u5185\u5bb9\u4e86\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c55\u793a\u4e86\u5728 Linux \u4e2d\u5982\u4f55\u5b89\u88c5 pyDash \u5e76\u6d4b\u8bd5\u5b83\u7684\u4e3b\u8981\u7279\u6027\u3002<\/p>\n


\n

via: http:\/\/www.tecmint.com\/pydash-a-web-based-linux-performance-monitoring-tool\/<\/a><\/p>\n

\u4f5c\u8005\uff1aRavi Saive <\/a> \u8bd1\u8005\uff1aucasFL<\/a> \u6821\u5bf9\uff1ajasminepeng<\/a><\/p>\n

\u672c\u6587\u7531 LCTT<\/a> \u539f\u521b\u7f16\u8bd1\uff0cLinux\u4e2d\u56fd<\/a> \u8363\u8a89\u63a8\u51fa<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-8462-1.html<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/pydash-performance-tool.html<\/a>\u7f16\u8f91\u5458\uff1a\u9004\u589e\u5b9d\uff0c\u5ba1\u6838\u5458\uff1a\u5218\u9044<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

pyDash \u662f\u4e00\u4e2a\u8f7b\u91cf\u4e14\u57fa\u4e8e web \u7684 Linux \u6027\u80fd\u76d1\u6d4b\u5de5\u5177\uff0c\u5b83\u662f\u7528 Python \u548c Django \u52a0\u4e0a Chart.js \u6765\u5199\u7684\u3002\u7ecf\u6d4b\u8bd5\uff0c\u5728\u4e0b\u9762\u8fd9\u4e9b\u4e3b\u6d41 Linux \u53d1\u884c\u7248\u4e0a\u53ef\u8fd0\u884c\uff1aCentOS\u3001Fedora\u3001Ubuntu\u3001Debian\u3001Raspbian \u4ee5\u53ca Pidora \u3002<\/p>\n","protected":false},"author":309,"featured_media":82765,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-63860","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/63860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/309"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=63860"}],"version-history":[{"count":9,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/63860\/revisions"}],"predecessor-version":[{"id":83959,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/63860\/revisions\/83959"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/82765"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=63860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=63860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=63860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}