pyDash – A Web Based Linux Performance Monitoring Tool

pydash is a lightweight web-based monitoring tool for Linux written in Python and Django plus Chart.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 and more. The dashboard is developed entirely using Python libraries provided in the main Python distribution, therefore it has a few dependencies; you don’t need to install many packages or libraries to run it.

In this article, we will show you how to install pydash to monitor Linux server performance.

How to Install pyDash in Linux System

1. First install required packages: git and Python pip as follows:

-------------- On Debian/Ubuntu -------------- 
$ sudo apt-get install git python-pip

-------------- On CentOS/RHEL -------------- 
# yum install epel-release
# yum install git python-pip

-------------- On Fedora 22+ --------------
# dnf install git python-pip

2. If you have git and Python pip installed, next, install virtualenv which helps to deal with dependency issues for Python projects, as below:

# pip install virtualenv
OR
$ sudo pip install virtualenv

3. Now using git command, clone the pydash directory into your home directory like so:

# git clone https://github.com/k3oni/pydash.git
# cd pydash

4. Next, create a virtual environment for your project called pydashtest using the virtualenv command below.

$ virtualenv pydashtest #give a name for your virtual environment like pydashtest
Create Virtual Environment

Create Virtual Environment

Important: Take note the virtual environment’s bin directory path highlighted in the screenshot above, yours could be different depending on where you cloned the pydash folder.

5. Once you have created the virtual environment (pydashtest), you must activate it before using it as follows.

$ source /home/aaronkilik/pydash/pydashtest/bin/activate
Active Virtual Environment

Active Virtual Environment

From the screenshot above, you’ll note that the PS1 prompt changes indicating that your virtual environment has been activated and is ready for use.

6. Now install the pydash project requirements; if you are curious enough, view the contents of requirements.txt using the cat command and the install them using as shown below.

$ cat requirements.txt
$ pip install -r requirements.txt

7. Now move into the pydash directory containing settings.py or simple run the command below to open this file to change the SECRET_KEY to a custom value.

$ vi pydash/settings.py
Set Secret Key

Set Secret Key

Save the file and exit.

8. Afterward, run the django command below to create the project database and install Django’s auth system and create a project super user.

$ python manage.py syncdb

Answer the questions below according to your scenario:

Would you like to create one now? (yes/no): yes
Username (leave blank to use 'root'): admin
Email address: [email protected]
Password: ###########
Password (again): ############
Create Project Database

Create Project Database

9. At this point, all should be set, now run the following command to start the Django development server.

$ python manage.py runserver

10. Next, open your web browser and type the URL: http://127.0.0.1:8000/ to get the web dashboard login interface. Enter the super user name and password you created while creating the database and installing Django’s auth system in step 8 and click Sign In.

pyDash Login Interface

pyDash Login Interface

11. Once 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.

Simply scroll down to view more sections.

pyDash Server Performance Overview

pyDash Server Performance Overview

12. Next, screenshot of the pydash showing a section for keeping track of interfaces, IP addresses, Internet traffic, disk read/writes, online users and netstats.

pyDash Network Overview

pyDash Network Overview

13. Next is a screenshot of the pydash main interface showing a section to keep an eye on active processes on the system.

pyDash Active Linux Processes

pyDash Active Linux Processes

For more information, check out pydash on Github: https://github.com/k3oni/pydash.

That’s it for now! In this article, we showed you how to setup and test the main features of pydash in Linux. Share any thoughts with us via the feedback section below and in case you know of any useful and similar tools out there, let us know as well in the comments.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

17 Responses

  1. mani says:

    It is running successfully but I am not getting result of memory, cpu in browser please help me anybody if i may miss anything?

  2. lazaro says:

    How can you retrieve data from a remote server with this program??

  3. HARNEET says:

    Error running –

    (pydashtest) [[email protected] pydash]$ python manage.py syncdb
    Traceback (most recent call last):
    File “manage.py”, line 10, in
    execute_from_command_line(sys.argv)
    File “/tmp/pydash/pydashtest/lib/python3.6/site-packages/django/core/management/__init__.py”, line 399, in execute_from_command_line
    utility.execute()
    File “/tmp/pydash/pydashtest/lib/python3.6/site-packages/django/core/management/__init__.py”, line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
    File “/tmp/pydash/pydashtest/lib/python3.6/site-packages/django/core/management/__init__.py”, line 261, in fetch_command
    commands = get_commands()
    File “/tmp/pydash/pydashtest/lib/python3.6/site-packages/django/core/management/__init__.py”, line 107, in get_commands
    apps = settings.INSTALLED_APPS
    File “/tmp/pydash/pydashtest/lib/python3.6/site-packages/django/conf/__init__.py”, line 54, in __getattr__
    self._setup(name)
    File “/tmp/pydash/pydashtest/lib/python3.6/site-packages/django/conf/__init__.py”, line 50, in _setup
    self._configure_logging()
    File “/tmp/pydash/pydashtest/lib/python3.6/site-packages/django/conf/__init__.py”, line 72, in _configure_logging
    from django.utils.log import DEFAULT_LOGGING
    File “/tmp/pydash/pydashtest/lib/python3.6/site-packages/django/utils/log.py”, line 7, in
    from django.views.debug import ExceptionReporter, get_exception_reporter_filter
    File “/tmp/pydash/pydashtest/lib/python3.6/site-packages/django/views/debug.py”, line 12, in
    from django.template import Template, Context, TemplateDoesNotExist
    File “/tmp/pydash/pydashtest/lib/python3.6/site-packages/django/template/__init__.py”, line 53, in
    from django.template.base import (ALLOWED_VARIABLE_CHARS, BLOCK_TAG_END,
    File “/tmp/pydash/pydashtest/lib/python3.6/site-packages/django/template/base.py”, line 19, in
    from django.utils.html import escape
    File “/tmp/pydash/pydashtest/lib/python3.6/site-packages/django/utils/html.py”, line 14, in
    from .html_parser import HTMLParser, HTMLParseError
    File “/tmp/pydash/pydashtest/lib/python3.6/site-packages/django/utils/html_parser.py”, line 12, in
    HTMLParseError = _html_parser.HTMLParseError
    AttributeError: module ‘html.parser’ has no attribute ‘HTMLParseError’

  4. Earnest Redwood says:

    Traceback (most recent call last):
    File “manage.py”, line 8, in
    when I run: python manage.py sysncdb

    from django.core.management import execute_from_command_line
    ImportError: No module named django.core.management
    (pydashtest)

    What am I doing wrong I follow the step to the tee. I am running Ubuntu 16.04 Server

  5. Luis Nabais says:

    This project is very old, stalled for two years.

    I tried to use it with Python 3.6 and Django 1.11, doesn’t work.

  6. Samar says:

    Is there a way to use it as a command center & monitor multiple linux terminals at one place or is it a singular host monitoring software?

  7. Thenraja says:

    Hi,

    How can i change the port number & when i visit following URL

    http://mydomainname.com:8000/

    i get following error

    This site can’t be reached

    • Aaron Kili says:

      @Thenraja

      Run the command like so:

      $ sudo ./manage.py runserver 0.0.0.0:1000

      Where 1000 is your test port, make sure the port is being used.

      And open the link from the terminal(this will open automatically in the browser).

  8. Zach says:

    It’s hard to beat netdata these days, but it’s always nice to have alternatives.

  9. Saeed says:

    Thanks for sharing this, can we manage Number of servers from this tool? Like central monitoring server?

    Thanks
    Saeed

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.