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.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Ravi Saive
I am an experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

17 Comments

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

    Reply
  2. Error running –

    (pydashtest) [harneesi@oc6435377758 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’

    Reply
  3. 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

    Reply
  4. 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.

    Reply
  5. 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?

    Reply
    • @Samar

      I suppose it only monitors a single Linux system, however, it allows remote data retrieval but this may not necessarily mean monitoring other systems.

      Reply
    • @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).

      Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.