Linux performance monitoring tool: pyDash
pyDash is a lightweight, web-based Linux performance monitoring tool written in Python and Django plus Chart.js. After testing, it can run on the following mainstream Linux distributions: CentOS, Fedora, Ubuntu, Debian, Raspbian and Pidora.
You can use this tool to monitor your Linux PC/Server resources such as CPU, memory, network statistics, processes including online users and more. The dashboard is developed entirely with Python libraries provided by major Python distributions, so it has very few dependencies and you don't need to install many packages or libraries to run it.
In this article, I will show you how to install pyDash to monitor Linux server performance.
How to install pyDash under Linux system1. First, install the required software packages git and Python pip as follows:
-------------- 在 Debian/Ubuntu 上 -------------- $ sudo apt-get install git python-pip -------------- 在 CentOS/RHEL 上 -------------- # yum install epel-release # yum install git python-pip -------------- 在 Fedora 22+ 上 -------------- # dnf install git python-pip
2. If git and Python pip are installed, then install virtualenv as follows, which helps to handle dependencies for Python projects:
# pip install virtualenv 或 $ sudo pip install virtualenv
3. Now, use the git command as follows to clone the pyDash warehouse to the home directory:
# git clone https://github.com/k3oni/pydash.git # cd pydash
4. Next, use the following virtualenv command to create a virtual environment called pydashtest for the project:
$ virtualenv pydashtest #give a name for your virtual environment like pydashtest
Create virtual environment
Important: Please note that in the screenshot above, the bin directory of the virtual environment is highlighted, yours may be different depending on where you clone the pyDash directory.
5. After creating the virtual environment (pydashtest), you need to activate it before use as follows:
$ source /home/aaronkilik/pydash/pydashtest/bin/activate
Activate virtual environment
From the screenshot above, you can notice that prompt string 1 (PS1) has changed, which indicates that the virtual environment has been activated and can be used.
6. Now, install the pydash project requirements; if you are curious, you can use the cat command to view the contents of requirements.txt, and then install it as shown below:
$ cat requirements.txt $ pip install -r requirements.txt
7. Now, enter the pydash directory, which contains a file named settings.py. You can also directly run the following command to open this file, and then SECRET_KEY Change to a specific value:
$ vi pydash/settings.py
Set the key
Save the file and exit.
8. After that, run the following commands to create a project database and install Django’s authentication system, and create a superuser for the project:
$ python manage.py syncdb
Answer the following questions based on your situation:
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
9、这个时候,一切都设置好了,然后,运行下面的命令来启用 Django 开发服务器:
$ python manage.py runserver
10、接下来,打开你的 web 浏览器,输入网址:http://127.0.0.1:8000/ 进入 web 控制台登录界面,输入你在第 8 步中创建数据库和安装 Django 身份验证系统时创建的超级用户名和密码,然后点击登录。
pyDash 登录界面
11、登录到 pydash 主页面以后,你将会可以看到监测系统的基本信息,包括 CPU、内存和硬盘使用量以及系统平均负载。
向下滚动便可查看更多部分的信息。
pydash 服务器性能概述
12、下一个屏幕截图显示的是一段 pydash 的跟踪界面,包括 IP 地址、互联网流量、硬盘读/写、在线用户以及 netstats 。
pyDash 网络概述
13、下一个 pydash 主页面的截图显示了一部分系统中被监视的活跃进程。
pyDash 监视活跃 Linux 进程
如果想了解更多信息,请在 GitHub 上查看 pydash:https://github.com/k3oni/pydash
这就是全部内容了。在这篇文章中,我们展示了在 Linux 中如何安装 pyDash 并测试它的主要特性。
The above is the detailed content of Linux performance monitoring tool: pyDash. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



How to use Docker Desktop? Docker Desktop is a tool for running Docker containers on local machines. The steps to use include: 1. Install Docker Desktop; 2. Start Docker Desktop; 3. Create Docker image (using Dockerfile); 4. Build Docker image (using docker build); 5. Run Docker container (using docker run).

The key differences between CentOS and Ubuntu are: origin (CentOS originates from Red Hat, for enterprises; Ubuntu originates from Debian, for individuals), package management (CentOS uses yum, focusing on stability; Ubuntu uses apt, for high update frequency), support cycle (CentOS provides 10 years of support, Ubuntu provides 5 years of LTS support), community support (CentOS focuses on stability, Ubuntu provides a wide range of tutorials and documents), uses (CentOS is biased towards servers, Ubuntu is suitable for servers and desktops), other differences include installation simplicity (CentOS is thin)

Troubleshooting steps for failed Docker image build: Check Dockerfile syntax and dependency version. Check if the build context contains the required source code and dependencies. View the build log for error details. Use the --target option to build a hierarchical phase to identify failure points. Make sure to use the latest version of Docker engine. Build the image with --t [image-name]:debug mode to debug the problem. Check disk space and make sure it is sufficient. Disable SELinux to prevent interference with the build process. Ask community platforms for help, provide Dockerfiles and build log descriptions for more specific suggestions.

Docker process viewing method: 1. Docker CLI command: docker ps; 2. Systemd CLI command: systemctl status docker; 3. Docker Compose CLI command: docker-compose ps; 4. Process Explorer (Windows); 5. /proc directory (Linux).

Docker uses Linux kernel features to provide an efficient and isolated application running environment. Its working principle is as follows: 1. The mirror is used as a read-only template, which contains everything you need to run the application; 2. The Union File System (UnionFS) stacks multiple file systems, only storing the differences, saving space and speeding up; 3. The daemon manages the mirrors and containers, and the client uses them for interaction; 4. Namespaces and cgroups implement container isolation and resource limitations; 5. Multiple network modes support container interconnection. Only by understanding these core concepts can you better utilize Docker.

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

VS Code To switch Chinese mode: Open the settings interface (Windows/Linux: Ctrl, macOS: Cmd,) Search for "Editor: Language" settings Select "Chinese" in the drop-down menu Save settings and restart VS Code

VS Code is the full name Visual Studio Code, which is a free and open source cross-platform code editor and development environment developed by Microsoft. It supports a wide range of programming languages and provides syntax highlighting, code automatic completion, code snippets and smart prompts to improve development efficiency. Through a rich extension ecosystem, users can add extensions to specific needs and languages, such as debuggers, code formatting tools, and Git integrations. VS Code also includes an intuitive debugger that helps quickly find and resolve bugs in your code.
