Python and Django with Chart.js make up pydash, a lightweight web-based monitoring application for Linux. It has been tested and can run on CentOS, Fedora, Ubuntu, Debian, Arch Linux, Raspbian, and Pidora, among other popular Linux distributions.
You can use it to monitor the resources on your Linux PC/server, such as CPUs, RAM, network statistics, processes, online users, and more. The dashboard was built entirely with Python libraries from the main Python distribution, so it only has a few dependencies and doesn’t require the installation of many packages or libraries.
Installing Pydash in Linux
First, we need to install pip3 and git if you already have you can skip this step:
$ sudo apt-get install python-pip
Now install git using the below command:
$ sudo apt-get install git
Now we need to install virtualenv:
Virtualenv: When it comes to dealing with dependencies in your Python projects, virtualenv is the tool to use.
$ pip install virtualenv
Now clone the pydash directory using the git command:
$ git clone https://gitlab.com/k3oni/pydash
Change directory to pydash:
The next move is to use the virtualenv command to create a virtual environment for our project:
$ virtualenv pydashenv
Now we need to activate our virtual environment using the below command:
$ source /home/ubuntu/paydash/pydashenv/bin/activate
Now, use the following command to install your project’s specifications. It will search in your project for a file called requirements.txt. This is the file in which the creator specifies the packages that must be installed in order for the project to run.
$ pip install -r requirements.txt
Now we need to change the SECRET_KEY to a custom value, navigate to the pydash directory containing settings.py or simply run the command below to open this file:
$ nano pydash/pydash/settings.py
Search for the SECRET_KEY string and change it to a custom value. Save the file and exit:
Run the Django command using the below command:
$ python manage.py syncdb
When it asks if you want to build a superuser, make sure you choose yes. Then, with the following instruction, run the app.
Now that all is ready, run the following command to start the Django development server:
$ python manage.py runserver
To access the site dashboard login GUI, open your web browser and type http://127.0.0.1:8000/ into the address bar. Sign in with the super user name and password you created when you created the database and installed Django’s authentication system.
When you first log in to the pydash main interface, you’ll see a section for tracking general system information, CPU, memory, and disc use, as well as the average system load.
For the time being, that’s all there is to it! We demonstrated how to install pydash in Linux in this post. Please let us know your thoughts in the comments section below, and if you know of any other useful and related resources, please let us know as well.