How to Use Glances to Monitor Remote Linux in Web Server Mode?
Last Updated :
04 Jun, 2024
Glances is a system monitoring tool for Linux machines, it is used to monitor system resources in web server mode or through the web browser. It is an alternative to top and htop monitoring tools. This tool has various features and also provides bits of information on a single screen. Glances is a cross-platform, free and open-source tool for monitoring system resources of Linux machines.Â
This is run in three modes:
- Standalone Mode: Monitoring single system and results are displayed on the terminal.
- Client/Server Mode: Monitoring multiple systems
- Web-server Mode: Monitoring single system and results displayed in Web Browser/Web Interface
Features of Glances:
- Average CPU Load
- Sleeping processes
- Monitoring 15+ metrics on the system
- Highly configurable and adaptable
- Supports exporting data to different services and databases
- System Info and Uptime
Installation
Repositories are available for Glances in Linux Distributions, execute the following commands depending on your system distribution.
Using packages:
$ sudo apt install glances # On Debian system
$ sudo yum install glances # On RedHat system
Using Curl:
$ curl -L https://bit.ly/glances | /bin/bash
Using Snap Package:
$ sudo snap install glances
Using wget:
$ wget -O- http://bit.ly/glances | /bin/bash
Glances usage
Now after the installation is complete we can edit the file in the directory /etc/default/glances and modify the value of RUN to trueÂ

To refresh value in Glances the default time intervals is 1 second, we can manually change the value using -t option followed by time in seconds
$ glances -t 5
For manually starting the tool, you can execute the command glances to use the tool and monitor the system resources. The glances show different color codes and have different meanings which are as follows,
- Green: Everything is FINE
- Blue: Color depicts CAREFUL, attention is required
- Violet: This means WARNING
- Red: This means it is CRITICAL

Here we see that the glances tool displays information about the system and also includes a sidebar that contains information on Docker container network I/O, press “2” to open the sidebar.Â
To interact more with Glances while the tool is running press “s” to view sensors on-screen.Â

Press “k” to display TCP connections:

Now press “1” to display CPU Stats to show individual threads:

There are various commands in Glances to get an overview of important commands type/press h to invoke the help screen. It will then display a list of useful commands.

For searching/filtering processes press Enter key, it will show the dialog box for filtering a particular process, where you can type the process name. Specify other parameters for better filtering such as username, password. For a root user, you can enter a username: root and hit enter to filter process and to check for more details press e.
The output for the above process is shown below, to exit press E:

Web Server Mode
To start glances in web server mode, execute the command glances followed by “-w”

The output shows that the server has started and points to a web browser http://0.0.0.0:61208/ or https://localhost:61208/. (0.0.0.0 – Server IP Address of host). Web Interface displays the information we saw in the glances tool as well, but the difference here is it opens in the browser window. For terminating web server navigate to the terminal where the command runs and press Ctrl + C.Â

Glances in Web-Server Mode
Configuring Glances
Glances configure behavior through glances.conf configuration file. For triggering warnings at your own values then default values it is explicitly stated in the configuration file. To specify some custom alert values for CPU Usage, then specify values in the CPU section. It is also possible to change the preferences and modify them like memory, I/O, network in the configuration file.

Similar Reads
How to Install and Use Scout_Realtime to Monitor Server and Process Metrics in Linux?
There are numerous free tools on Linux that are used to monitor the Linux system including hardware and software. We all may have already come across some command-line Linux performance monitoring tools such as top, htop, atop, etc. Alike that we come across another tool called Scout Realtime tool w
2 min read
Most Useful Commands to Manage Apache Web Server in Linux
Prerequisite: How do Web Servers work? Apache is one of the most widely used free, open-source Web Server applications in the world, mostly used in Unix-like operating systems but can also be used in windows. As a developer or system administrator, it will be very helpful for you to know about the A
3 min read
How to Monitor Linux Commands Executed by System Users in Real-time?
If you are a Linux system administrator then you would definitely want to monitor the interactive activity of all system users, like monitoring the Linux commands they execute in real-time. In this brief Linux system security article, we will be going to discuss how to monitor all Linux shell comman
1 min read
How to Monitor Processor, Memory, Network Performance using dstat in Linux?
Do you want to run a quick performance test on your Linux machine? You may want to check the dstat command. Dstat is a versatile and efficient command that combines the features of several older tools such as vmstat, netstat, iostat, and ifstat to provide useful insights into Linux system performanc
2 min read
How to Make a Process Monitor in Python?
A process monitor is a tool that displays the system information like processes, memory, network, and other stuff. There are plenty of tools available, but we can make our own process monitor using Python. In Python, there is a module called psutil that we can use to grab various information about o
3 min read
How to Code Your Own Port Scanner Using BASH Script and netcat Tool in Linux?
The first step of penetration testing is reconnaissance (information gathering) which involves scanning for open ports in the machine. There are various tools available on the internet to perform port scanning but, the ability to make your own port scanner is just felt amazing. So here are the steps
3 min read
How I use Cockpit for my Home's Linux Server Management
Cockpit is a free, open-source, and easy-to-use yet powerful remote manager for Linux servers that allows system administrators to quickly monitor or manage system resources, logs, storage, network, background services, and much more from one central dashboard. You can also access the Linux shell of
6 min read
How to Create Web Server On Packet Tracer?
A web server is like a computer that uses an HTTP (Hyper Text Transfer Protocol) and many other protocols. it responds when a client makes a request over the World Wide Web. The main work of the web server is to show website content that is processed, and stored, in the webserver to deliver the webp
2 min read
How to use Postman Monitors to schedule and run collections?
Postman is a popular API development tool that offers a powerful " Monitors " feature that allows you to automate the execution of collections at scheduled intervals. This article will explore the step-by-step instructions for using Postman Monitors. Prerequisites:Postman InstalledPostman AccountPos
2 min read
Monitoring Linux Users and Processes in Real Time Using whowatch
Whowatch is a console-based, interactive user and process monitoring tool. Whowatch shows the information about the user's currently logged on the machine, in real-time. It shows the information like login name, tty, host, user's processes of logging user's. whowatch shows all processes of the selec
2 min read