{"id":12106,"date":"2019-03-22T10:20:05","date_gmt":"2019-03-22T10:20:05","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=12106"},"modified":"2019-03-22T10:20:05","modified_gmt":"2019-03-22T10:20:05","slug":"pydash-a-web-based-linux-performance-monitoring-tool","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/22\/pydash-a-web-based-linux-performance-monitoring-tool\/","title":{"rendered":"pyDash \u2013 A Web Based Linux Performance Monitoring Tool"},"content":{"rendered":"<p><strong>pydash<\/strong>\u00a0is a lightweight\u00a0<a href=\"https:\/\/www.tecmint.com\/command-line-tools-to-monitor-linux-performance\/\" target=\"_blank\" rel=\"noopener\">web-based monitoring tool for Linux<\/a>\u00a0written in\u00a0<strong>Python<\/strong>\u00a0and\u00a0<a href=\"https:\/\/www.tecmint.com\/install-and-configure-django-web-framework-in-centos-debian-ubuntu\/\" target=\"_blank\" rel=\"noopener\">Django<\/a>\u00a0plus\u00a0<strong>Chart.js<\/strong>. It has been tested and can run on the following mainstream Linux distributions: CentOS, Fedora, Ubuntu, Debian, Arch Linux, Raspbian as well as Pidora.<\/p>\n<p>You can use it to keep an eye on your Linux PC\/server resources such as CPUs, RAM, network stats, processes including online users and more. The dashboard is developed entirely using Python libraries provided in the main Python distribution, therefore it has a few dependencies; you don\u2019t need to install many packages or libraries to run it.<\/p>\n<p>In this article, we will show you how to install\u00a0<strong>pyda<\/strong>sh to monitor Linux server performance.<\/p>\n<h3>How to Install pyDash in Linux System<\/h3>\n<p><strong>1.<\/strong>\u00a0First install required packages:\u00a0<strong>git<\/strong>\u00a0and\u00a0<strong>Python pip<\/strong>\u00a0as follows:<\/p>\n<pre><strong>-------------- On Debian\/Ubuntu --------------<\/strong> \r\n$ sudo apt-get install git python-pip\r\n\r\n<strong>-------------- On CentOS\/RHEL --------------<\/strong> \r\n# yum install epel-release\r\n# yum install git python-pip\r\n\r\n<strong>-------------- On Fedora 22+ --------------<\/strong>\r\n# dnf install git python-pip<\/pre>\n<p><strong>2.<\/strong>\u00a0If you have git and Python pip installed, next, install\u00a0<strong>virtualenv<\/strong>\u00a0which helps to deal with dependency issues for Python projects, as below:<\/p>\n<pre># pip install virtualenv\r\nOR\r\n$ sudo pip install virtualenv\r\n<\/pre>\n<p><strong>3.<\/strong>\u00a0Now using git command, clone the pydash directory into your home directory like so:<\/p>\n<pre># git clone https:\/\/github.com\/k3oni\/pydash.git\r\n# cd pydash\r\n<\/pre>\n<p><strong>4.<\/strong>\u00a0Next, create a virtual environment for your project called\u00a0<strong>pydashtest<\/strong>\u00a0using the\u00a0<strong>virtualenv<\/strong>\u00a0command below.<\/p>\n<pre>$ virtualenv pydashtest #give a name for your virtual environment like pydashtest\r\n<\/pre>\n<div id=\"attachment_25276\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/create-virtual-environment.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-25276\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/create-virtual-environment.png\" alt=\"Create Virtual Environment\" width=\"716\" height=\"59\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Create Virtual Environment<\/p>\n<\/div>\n<p><strong>Important<\/strong>: Take note the virtual environment\u2019s bin directory path highlighted in the screenshot above, yours could be different depending on where you cloned the pydash folder.<\/p>\n<p><strong>5.<\/strong>\u00a0Once you have created the virtual environment (<strong>pydashtest<\/strong>), you must activate it before using it as follows.<\/p>\n<pre>$ source \/home\/aaronkilik\/pydash\/pydashtest\/bin\/activate\r\n<\/pre>\n<div id=\"attachment_25277\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/after-activating-virtualenv.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-25277\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/after-activating-virtualenv.png\" sizes=\"auto, (max-width: 854px) 100vw, 854px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/after-activating-virtualenv.png 854w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/after-activating-virtualenv-768x53.png 768w\" alt=\"Active Virtual Environment\" width=\"854\" height=\"59\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Active Virtual Environment<\/p>\n<\/div>\n<p>From the screenshot above, you\u2019ll note that the\u00a0<strong>PS1<\/strong>\u00a0prompt changes indicating that your virtual environment has been activated and is ready for use.<\/p>\n<p><strong>6.<\/strong>\u00a0Now install the pydash project requirements; if you are curious enough, view the contents of\u00a0<strong>requirements.txt<\/strong>using the\u00a0<a href=\"https:\/\/www.tecmint.com\/13-basic-cat-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">cat command<\/a>\u00a0and the install them using as shown below.<\/p>\n<pre>$ cat requirements.txt\r\n$ pip install -r requirements.txt\r\n<\/pre>\n<p><strong>7.<\/strong>\u00a0Now move into the pydash directory containing\u00a0<strong>settings.py<\/strong>\u00a0or simple run the command below to open this file to change the\u00a0<strong>SECRET_KEY<\/strong>\u00a0to a custom value.<\/p>\n<pre>$ vi pydash\/settings.py\r\n<\/pre>\n<div id=\"attachment_25278\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/change-secret-key.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-25278\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/change-secret-key.png\" alt=\"Set Secret Key\" width=\"758\" height=\"458\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Set Secret Key<\/p>\n<\/div>\n<p>Save the file and exit.<\/p>\n<p><strong>8.<\/strong>\u00a0Afterward, run the django command below to create the project database and install Django\u2019s auth system and create a project super user.<\/p>\n<pre>$ python manage.py syncdb\r\n<\/pre>\n<p>Answer the questions below according to your scenario:<\/p>\n<pre>Would you like to create one now? (yes\/no): <strong>yes<\/strong>\r\nUsername (leave blank to use 'root'): <strong>admin<\/strong>\r\nEmail address: <strong>aaronkilik@gmail.com<\/strong>\r\nPassword: <strong>###########<\/strong>\r\nPassword (again): <strong>############<\/strong>\r\n<\/pre>\n<div id=\"attachment_25279\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/python-manage.py-syncdb.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-25279\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/python-manage.py-syncdb.png\" alt=\"Create Project Database\" width=\"758\" height=\"439\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Create Project Database<\/p>\n<\/div>\n<p><strong>9.<\/strong>\u00a0At this point, all should be set, now run the following command to start the Django development server.<\/p>\n<pre>$ python manage.py runserver\r\n<\/pre>\n<p><strong>10.<\/strong>\u00a0Next, open your web browser and type the URL:\u00a0<strong>http:\/\/127.0.0.1:8000\/<\/strong>\u00a0to get the web dashboard login interface. Enter the super user name and password you created while creating the database and installing Django\u2019s auth system in step 8 and click Sign In.<\/p>\n<div id=\"attachment_25280\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-web-login-interface.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-25280\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-web-login-interface.png\" sizes=\"auto, (max-width: 1023px) 100vw, 1023px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-web-login-interface.png 1023w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-web-login-interface-768x423.png 768w\" alt=\"pyDash Login Interface\" width=\"1023\" height=\"564\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">pyDash Login Interface<\/p>\n<\/div>\n<p><strong>11.<\/strong>\u00a0Once you login into pydash main interface, you will get a section for monitoring general system info, CPU, memory and disk usage together with system load average.<\/p>\n<p>Simply scroll down to view more sections.<\/p>\n<div id=\"attachment_25282\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-Server-Performance-Overview.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-25282\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-Server-Performance-Overview.png\" sizes=\"auto, (max-width: 993px) 100vw, 993px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-Server-Performance-Overview.png 993w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-Server-Performance-Overview-768x631.png 768w\" alt=\"pyDash Server Performance Overview\" width=\"993\" height=\"816\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">pyDash Server Performance Overview<\/p>\n<\/div>\n<p><strong>12.<\/strong>\u00a0Next, screenshot of the pydash showing a section for keeping track of interfaces, IP addresses, Internet traffic, disk read\/writes, online users and netstats.<\/p>\n<div id=\"attachment_25283\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-Network-Overview.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-25283\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-Network-Overview.png\" sizes=\"auto, (max-width: 993px) 100vw, 993px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-Network-Overview.png 993w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-Network-Overview-768x631.png 768w\" alt=\"pyDash Network Overview\" width=\"993\" height=\"816\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">pyDash Network Overview<\/p>\n<\/div>\n<p><strong>13.<\/strong>\u00a0Next is a screenshot of the pydash main interface showing a section to keep an eye on active processes on the system.<\/p>\n<div id=\"attachment_25284\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-Active-Linux-Processes.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-25284\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-Active-Linux-Processes.png\" sizes=\"auto, (max-width: 1071px) 100vw, 1071px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-Active-Linux-Processes.png 1071w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/pyDash-Active-Linux-Processes-768x585.png 768w\" alt=\"pyDash Active Linux Processes\" width=\"1071\" height=\"816\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">pyDash Active Linux Processes<\/p>\n<\/div>\n<p>For more information, check out pydash on Github:\u00a0<a href=\"https:\/\/github.com\/k3oni\/pydash\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/github.com\/k3oni\/pydash<\/a>.<\/p>\n<p>That\u2019s it for now!<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/pydash-a-web-based-linux-performance-monitoring-tool\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>pydash\u00a0is a lightweight\u00a0web-based monitoring tool for Linux\u00a0written in\u00a0Python\u00a0and\u00a0Django\u00a0plus\u00a0Chart.js. It has been tested and can run on the following mainstream Linux distributions: CentOS, Fedora, Ubuntu, Debian, Arch Linux, Raspbian as well as Pidora. You can use it to keep an eye on your Linux PC\/server resources such as CPUs, RAM, network stats, processes including online users &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/22\/pydash-a-web-based-linux-performance-monitoring-tool\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;pyDash \u2013 A Web Based Linux Performance Monitoring Tool&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12106","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=12106"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12106\/revisions"}],"predecessor-version":[{"id":12107,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12106\/revisions\/12107"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=12106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=12106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=12106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}