### Setup Development Environment with uv Source: https://github.com/nicolargo/glances/wiki/How-to-contribute-to-Glances-? Install project dependencies using uv and create a development virtual environment. ```bash make uv ``` ```bash make venv-dev ``` ```bash make venv ``` -------------------------------- ### Start Home Assistant Docker Container Source: https://github.com/nicolargo/glances/blob/develop/tests-data/issues/issue3333-homeassistant/README.txt Navigate to the specified directory and execute the shell script to start the Home Assistant Docker container. Ensure Docker is installed and prerequisites are met. ```shell cd ./tests-data/issues/issue3333-homeassistant/ sh ./run-homeassistant.sh ``` -------------------------------- ### Setup Glances Server Mode Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Configures and starts Glances in server mode, handling arguments and mode settings. ```python setup_server_mode(args, mode) ``` -------------------------------- ### Installation: Full Feature Set Source: https://github.com/nicolargo/glances/blob/develop/README.rst Install Glances with all dependencies for every feature using the '[all]' extra. ```console pip install 'glances[all]' ``` -------------------------------- ### Install Setuptools in Virtual Environment Source: https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version Install the setuptools package within the activated virtual environment. This is a prerequisite for installing other Python packages. ```bash ./pip install setuptools ``` -------------------------------- ### Install Glances from Ports Source: https://github.com/nicolargo/glances/blob/develop/README.rst Navigate to the sysutils/py-glances directory and run 'make install clean' to install Glances using the Ports system. ```console # cd /usr/ports/sysutils/py-glances/ # make install clean ``` -------------------------------- ### Installation: Web Interface Dependencies Source: https://github.com/nicolargo/glances/blob/develop/README.rst Install Glances with web interface dependencies using the '[web]' extra. ```console pip install 'glances[web]' ``` -------------------------------- ### Complete JWT Token Authentication Example Source: https://github.com/nicolargo/glances/blob/develop/docs/api/restful.md A comprehensive bash script to get a JWT token and then use it to fetch CPU statistics. ```bash # Get token and extract access_token TOKEN=$(curl -s -X POST http://localhost:61208/api/4/token \ -H "Content-Type: application/json" \ -d '{"username": "glances", "password": "mypassword"}' \ | grep -o '"access_token":"[^"]*"' \ | cut -d'"' -f4) # Use the token to get CPU stats curl -H "Authorization: Bearer $TOKEN" \ http://localhost:61208/api/4/cpu ``` -------------------------------- ### Installation: Basic PyPI Install Source: https://github.com/nicolargo/glances/blob/develop/README.rst Install the latest stable version of Glances using pip within a virtual environment. ```console cd ~ python3 -m venv ~/.venv source ~/.venv/bin/activate pip install glances ``` -------------------------------- ### Install NodeJS on Ubuntu Source: https://github.com/nicolargo/glances/blob/develop/glances/outputs/static/README.md Use this command to install NodeJS and NPM on Ubuntu systems. ```bash sudo apt install nodejs npm ``` -------------------------------- ### Install Glances from Source Source: https://github.com/nicolargo/glances/blob/develop/README.rst Install Glances directly from its GitHub repository using pip. This method requires Python headers for psutil installation. ```console $ pip install https://github.com/nicolargo/glances/archive/vX.Y.tar.gz ``` -------------------------------- ### Install Profiling Tools Source: https://github.com/nicolargo/glances/blob/develop/docs/dev/README.txt Installs Graphviz for diagram generation and gprof2dot for converting profiling data. ```bash apt install graphviz pip install gprof2dot ``` -------------------------------- ### Install Glances with MCP and Web Extras Source: https://github.com/nicolargo/glances/blob/develop/tests/HOW_TO_TEST_MCP.md Install Glances with the necessary extras for web and MCP functionality. This is a prerequisite for testing. ```bash pip install 'glances[web,mcp]' ``` ```bash pip install -e '.[web,mcp]' ``` -------------------------------- ### Install Glances with PipX Source: https://github.com/nicolargo/glances/blob/develop/README-pypi.rst Install Glances with all features using PipX, an alternative installation method that isolates environments. Ensure PipX is installed first. ```console pipx install 'glances[all]' ``` -------------------------------- ### Install Glances with All Optional Features Source: https://github.com/nicolargo/glances/blob/develop/docs/install.md Install Glances along with all optional features, such as the web interface and export modules, by using the '[all]' extra. ```console pip install glances[all] ``` -------------------------------- ### Install and Run Glances with uvx Source: https://github.com/nicolargo/glances/blob/develop/README.rst Install and run Glances directly using a single command with uvx. Ensure uvx is installed on your system. ```console uvx glances ``` -------------------------------- ### Install Glances with Container Support Source: https://github.com/nicolargo/glances/blob/develop/docs/aoa/containers.md Install the necessary package to enable container monitoring features in Glances. ```console pip install glances[containers] ``` -------------------------------- ### Retrieve Available Plugins via REST API Source: https://context7.com/nicolargo/glances/llms.txt After starting Glances in web server mode, you can retrieve a list of all available plugins by making a GET request to `http://localhost:61208/api/4/pluginslist`. ```bash # Get list of all available plugins curl http://localhost:61208/api/4/pluginslist # ["alert", "amps", "cloud", "connections", "containers", "core", "cpu", # "diskio", "folders", "fs", "gpu", "help", "ip", "irq", "load", "mem", # "memswap", "network", "now", "percpu", "ports", "processcount", ``` -------------------------------- ### Install WebUI Dependencies Source: https://github.com/nicolargo/glances/blob/develop/glances/outputs/static/README.md Install all project dependencies using npm ci for a clean and reproducible build. ```bash npm ci ``` -------------------------------- ### Install Glances using Pip Source: https://github.com/nicolargo/glances/blob/develop/README-pypi.rst Use this command to install the latest stable version of Glances. The --user flag installs it for the current user. ```console pip install --user glances ``` -------------------------------- ### Install Glances with All Features using Pip Source: https://github.com/nicolargo/glances/blob/develop/README-pypi.rst Install Glances with all available dependencies for every feature. This is a comprehensive installation for full functionality. ```console pip install --user 'glances[all]' ``` -------------------------------- ### ArgumentParser Setup Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Initializes an ArgumentParser for command-line argument parsing. ```python parser = argparse.ArgumentParser( ``` -------------------------------- ### Python Client for NATS Stats Source: https://github.com/nicolargo/glances/blob/develop/docs/gw/nats.md A Python client example demonstrating how to subscribe to Glances statistics published on NATS subjects. Ensure you have the 'nats-client' library installed. ```python import asyncio import nats async def main(): nc = nats.NATS() await nc.connect(servers=["nats://localhost:4222"]) future = asyncio.Future() async def cb(msg): nonlocal future future.set_result(msg) await nc.subscribe("glances.cpu", cb=cb) # Wait for message to come in print("Waiting (max 30 seconds) for a message on ‘glances’ subject…") msg = await asyncio.wait_for(future, 30) print(msg.subject, msg.data.decode()) if __name__ == '__main__': asyncio.run(main()) ``` ```python await nc.subscribe("glances.*", cb=cb) ``` -------------------------------- ### Install Glances using pip Source: https://github.com/nicolargo/glances/wiki/Glances-3.0-Release-Note Use this command to install Glances on your system. Ensure pip is available. ```bash pip install glances ``` -------------------------------- ### Install Python Development Libraries (Redhat) Source: https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version On Red Hat-based systems, install the Python development libraries using dnf. ```bash dnf install python-develop ``` -------------------------------- ### Install pipx on Ubuntu/Debian Source: https://github.com/nicolargo/glances/blob/develop/README.rst Install the pipx package manager on Ubuntu or Debian systems. This is a prerequisite for using pipx to install Glances. ```console sudo apt install pipx ``` -------------------------------- ### Start Thread Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Starts a thread, likely for concurrent execution. ```python self._thread.start()\n ``` -------------------------------- ### CPython Installation Path Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Path to a specific CPython installation. ```text /home/nicolargo/.local/share/uv/python/cpython-3.14.0-linux-x86_64-gnu/lib/python3.14/ ``` -------------------------------- ### Start Glances Service Source: https://github.com/nicolargo/glances/wiki/Start-Glances-through-Systemd Manually start the Glances service. ```bash sudo systemctl start glances.service ``` -------------------------------- ### Start Glances MCP Server with Custom Path Source: https://github.com/nicolargo/glances/blob/develop/docs/api/mcp.md Start the Glances web server with the '--enable-mcp' flag and specify a custom mount path for the MCP server using '--mcp-path'. ```bash glances -w --enable-mcp --mcp-path /monitoring/mcp ``` -------------------------------- ### Install Glances with Brew Source: https://github.com/nicolargo/glances/blob/develop/README.rst Install Glances on Linux or macOS using the Homebrew package manager. ```console brew install glances ``` -------------------------------- ### Install Glances Offline with easy_install Source: https://github.com/nicolargo/glances/wiki/Glances-offline-installation On the offline computer, extract the downloaded files and use easy_install with the local Basket repository to install Glances. Ensure the necessary directories and configuration file are in place. ```bash cd ~ tar zxvf glances-offline.tgz sudo mkdir /etc/glances sudo touch /etc/glances/glances.conf sudo easy_install -f ~/.basket -H None glances ``` -------------------------------- ### Start Joinable Thread Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Starts a joinable thread with a specific bootstrap function and OS thread handle. ```python _start_joinable_thread(self._bootstrap, handle=self._os_thread_handle,\n ``` -------------------------------- ### Docker Compose Example for Glances Source: https://context7.com/nicolargo/glances/llms.txt A Docker Compose configuration to deploy Glances. This example sets up Glances to run in web server mode and restart automatically. ```yaml version: '3' services: glances: image: nicolargo/glances:latest-full restart: always ports: - "61208:61208" environment: - GLANCES_OPT=-w - TZ=${TZ} volumes: - /var/run/docker.sock:/var/run/docker.sock:ro pid: host ``` -------------------------------- ### Get Attributes Starting With Prefix Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-pyinstrument.html Retrieves all attributes of a frame that start with a given prefix, returning an array of objects containing the attribute data and time. ```javascript getAttributes(e){return Object.keys(this.attributes).filter(n=>n.startsWith(e)).map(n=>({data:n.slice(1),time:this.attributes[n]}))} ``` -------------------------------- ### Start Event Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Sets an event object to the 'started' state. ```python self._started = Event() ``` -------------------------------- ### Install Python Development Libraries (Debian) Source: https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version On Debian-based systems, install the Python development libraries using apt. ```bash apt install python-dev ``` -------------------------------- ### Run Webserver Source: https://github.com/nicolargo/glances/wiki/How-to-create-a-new-plugin-? Test the web interface with your new plugin by running the webserver using the `make run-webserver` command. ```bash make run-webserver ``` -------------------------------- ### Import Glances API Source: https://github.com/nicolargo/glances/blob/develop/glances.ipynb Import the necessary API module from the glances library to get started. ```python from glances import api ``` -------------------------------- ### Build HTML Documentation Source: https://github.com/nicolargo/glances/blob/develop/docs/README.txt Execute this command to generate the HTML version of the documentation. ```bash make html ``` -------------------------------- ### Get Attribute Value Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-pyinstrument.html Finds the value of an attribute that starts with the given prefix. It returns the data from the attribute with the latest timestamp. ```javascript getAttributeValue(e){const t=this.getAttributes(e);if(!t||t.length==0)return null;let n=0;for(let s=0;st[n].time&&(n=s);return t[n].data} ``` -------------------------------- ### Initialize Glances Configuration and Arguments Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Sets up the Glances environment by retrieving configuration and command-line arguments. ```python start(config=core.get_config(), args=core.get_args()) ``` -------------------------------- ### Glances Server Systemd Unit Source: https://github.com/nicolargo/glances/wiki/Start-Glances-through-Systemd Use this unit to start Glances in server mode. Ensure the ExecStart path is correct for your installation. ```systemd [Unit] Description=Glances After=network.target [Service] ExecStart=/usr/local/bin/glances -s Restart=always RemainAfterExit=no [Install] WantedBy=multi-user.target ``` -------------------------------- ### Start Central Glances Browser (WebUI) Source: https://github.com/nicolargo/glances/blob/develop/docs/quickstart.md To start the Web User Interface (WebUI) for the Central Glances Browser, use the '--browser' and '-w' options. This provides a web-based interface for monitoring multiple Glances servers. ```bash client$ glances --browser -w ``` -------------------------------- ### Install Shtab in Virtual Environment (Non-Windows) Source: https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version Install the 'shtab' package, which is required for shell tab completion, on systems other than Windows. ```bash ./pip install shtab ``` -------------------------------- ### Client/Server Mode (XML-RPC) Source: https://context7.com/nicolargo/glances/llms.txt Sets up Glances in client/server mode. Use 'glances -s' to start the server and 'glances -c ' to connect as a client. ```bash glances -s ``` ```bash glances -c 192.168.1.100 ``` -------------------------------- ### Initialize Plugins Method Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Initializes plugins based on provided arguments. Used in application startup or configuration. ```python self.init_plugins(self.args) ``` ```python init_plugins ``` -------------------------------- ### Get Network IO Counters Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Retrieves network I/O counters for each network interface using psutil. Requires the psutil library to be installed. ```python net_io_counters = psutil.net_io_counters(pernic=True) ``` -------------------------------- ### Get Python Version Source: https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version Check the installed Python version using 'python -V'. This information is useful for bug reporting and ensuring compatibility. ```bash python -V ``` -------------------------------- ### Python MCP Client: List Resources, Read CPU, and Run Prompt Source: https://github.com/nicolargo/glances/blob/develop/docs/api/mcp.md This snippet shows how to initialize the MCP client, list available resources, read CPU statistics, and execute a system health summary prompt. Ensure the Glances server is running at http://localhost:61208/mcp/sse. ```python import asyncio from mcp.client.sse import sse_client from mcp import ClientSession async def main(): async with sse_client("http://localhost:61208/mcp/sse") as (read, write): async with ClientSession(read, write) as session: await session.initialize() # List available resources resources = await session.list_resources() print([str(r.uri) for r in resources.resources]) # Read CPU stats from pydantic import AnyUrl result = await session.read_resource(AnyUrl("glances://stats/cpu")) print(result.contents[0].text) # Run a health-summary prompt prompt = await session.get_prompt("system_health_summary") print(prompt.messages[0].content.text[:200]) asyncio.run(main()) ``` -------------------------------- ### Install/Upgrade Sphinx and RTD Theme Source: https://github.com/nicolargo/glances/blob/develop/docs/README.txt Use these make commands to set up or update the Python virtual environment with necessary documentation tools. ```bash make venv ``` ```bash make venv-upgrade ``` -------------------------------- ### Clone and Set Up Remote Repository Source: https://github.com/nicolargo/glances/blob/develop/CONTRIBUTING.md Clone your fork of the Glances repository and set up the upstream remote to track the main project. This is the initial step for contributing. ```bash git clone https://github.com//glances.git cd glances git remote add upstream https://github.com/nicolargo/glances.git ``` -------------------------------- ### Consume Kafka Glances Data with Python Source: https://github.com/nicolargo/glances/blob/develop/docs/gw/kafka.md Python code example using Kafka-Python library to consume statistics from the 'glances' topic. Requires the 'kafka-python' package to be installed. ```python from kafka import KafkaConsumer import json consumer = KafkaConsumer('glances', value_deserializer=json.loads) for s in consumer: print(s) ``` -------------------------------- ### Enable Glances Service Source: https://github.com/nicolargo/glances/wiki/Start-Glances-through-Systemd Enable the Glances service to start automatically on boot. ```bash sudo systemctl enable glances.service ``` -------------------------------- ### Get Psutil Version from Glances API Source: https://github.com/nicolargo/glances/blob/develop/docs/api/restful.md Retrieve the installed psutil library version using this API endpoint. This is useful for checking compatibility or understanding the underlying library version. ```bash # curl http://localhost:61208/api/4/psutilversion "7.2.2" ``` -------------------------------- ### Start Glances with Custom Logging Configuration Source: https://github.com/nicolargo/glances/blob/develop/docs/config.md Command to start Glances using a custom JSON logging configuration file. Replace `` with the actual directory of your `glances.json` file. ```console LOG_CFG=/glances.json glances ``` -------------------------------- ### Install Glances with Web Interface using Pip Source: https://github.com/nicolargo/glances/blob/develop/README-pypi.rst Install Glances along with dependencies required for the Web UI and Web API. Use this if you plan to use the web-based features. ```console pip install --user 'glances[web]' ``` -------------------------------- ### Start Glances MCP Server Source: https://github.com/nicolargo/glances/blob/develop/docs/api/mcp.md Start the Glances web server with the '--enable-mcp' flag to activate the MCP server. The MCP server will be available at the default path '/mcp'. ```bash glances -w --enable-mcp ``` -------------------------------- ### Hide mount points using regular expressions Source: https://github.com/nicolargo/glances/blob/develop/docs/aoa/fs.md You can hide specific mount points by providing a comma-separated list of regular expressions in the 'hide' option under the [fs] section. For example, to hide all mount points starting with /boot and /snap, use 'hide=/boot.*,/snap.*'. ```ini [fs] hide=/boot.*,/snap.* ``` -------------------------------- ### Install Glances package on FreeBSD Source: https://github.com/nicolargo/glances/blob/develop/README.rst Install the Glances package on FreeBSD, specifying the version based on the Python version (e.g., pyXY-glances). ```console # pkg install pyXY-glances ``` -------------------------------- ### Glances API Server Setup Source: https://github.com/nicolargo/glances/blob/develop/docs/api/restful.md Instructions on how to run the Glances API server and enable features like the Glances Central Browser. ```APIDOC ## Run the Glances API server The Glances Restful/API server could be ran using the following command line: ```bash # glances -w --disable-webui ``` It is also ran automatically when Glances is started in Web server mode (-w). If you want to enable the Glances Central Browser, use: ```bash # glances -w --browser --disable-webui ``` ``` -------------------------------- ### Install Develop Version of Glances using Pip Source: https://github.com/nicolargo/glances/blob/develop/README-pypi.rst Install the latest development version from the test PyPI server. This version might be unstable. ```console pip install --user -i https://test.pypi.org/simple/ Glances ``` -------------------------------- ### Install Glances on Android using Termux Source: https://github.com/nicolargo/glances/blob/develop/README.rst Install necessary packages and Glances on Android via Termux. This includes updating apt, installing clang and python, and then installing required Python packages. ```console $ apt update $ apt upgrade $ apt install clang python $ pip install fastapi uvicorn jinja2 $ pip install glances ``` -------------------------------- ### Run Tests with Make Source: https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version Execute the test suite for Glances using the 'make test' command in the project directory. ```bash cd ~/tmp/glances make test ``` -------------------------------- ### Install hddtemp package Source: https://github.com/nicolargo/glances/blob/develop/docs/aoa/hddtemp.md Use this command to install the hddtemp package on CentOS/Redhat Linux systems. This is a prerequisite for the HDD temperature sensor plugin. ```bash $ sudo yum install hddtemp ``` -------------------------------- ### Create Test Environment with Make Source: https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version Use the 'make venv' command within the Glances project directory to set up the necessary virtual environment for testing. ```bash cd ~/tmp/glances make venv ``` -------------------------------- ### Run Glances to Display Host OS Information Source: https://github.com/nicolargo/glances/blob/develop/docs/docker.md Mount the host's /etc/os-release file into the container to display the host's OS information instead of the container's. ```console docker run -v /etc/os-release:/etc/os-release:ro docker.io/nicolargo/glances ``` -------------------------------- ### Run Glances with Docker Compose Source: https://github.com/nicolargo/glances/blob/develop/README.rst Start a Glances server with the WebUI using a Docker Compose file. Navigate to the docker-compose directory and run 'docker-compose up'. ```console cd ./docker-compose docker-compose up ``` -------------------------------- ### Connect with Basic Authentication Header Source: https://github.com/nicolargo/glances/blob/develop/tests/HOW_TO_TEST_MCP.md Python code example demonstrating how to construct and use Basic Authentication headers for connecting to the Glances MCP SSE endpoint. ```python import base64 creds = base64.b64encode(b"myuser:mypassword").decode() headers = {"Authorization": f"Basic {creds}"} async with sse_client(MCP_SSE, headers=headers) as (read, write): ... ``` -------------------------------- ### Define Examples Class Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Class for managing examples. ```python class Examples:\n ``` -------------------------------- ### Run Glances Server Source: https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version Start the Glances server component in a terminal using 'make run-server'. This is the first step for client/server mode. ```bash cd ~/tmp/glances make run-server ``` -------------------------------- ### Build WebUI Assets Source: https://github.com/nicolargo/glances/blob/develop/glances/outputs/static/README.md Execute this command to build the static assets for the Glances Web UI. ```bash npm run build ``` -------------------------------- ### Initialize Glances API Source: https://github.com/nicolargo/glances/blob/develop/docs/api/python.md Demonstrates how to import the API module and create an instance of the GlancesAPI class to access system metrics. ```APIDOC ## Initialize Glances API ### Description Initialize the Glances API by importing the `api` module and creating an instance of the `GlancesAPI` class. This instance provides access to all Glances plugins and their fields. ### Method ```python from glances import api gl = api.GlancesAPI() ``` ### Endpoint N/A (Python module) ``` -------------------------------- ### Install Glances Offline with pip Source: https://github.com/nicolargo/glances/wiki/Glances-offline-installation Alternatively, use pip with the --no-index and -f file:// options to install Glances from the local Basket repository on the offline machine. ```bash cd ~ tar zxvf glances-offline.tgz sudo mkdir /etc/glances sudo touch /etc/glances/glances.conf sudo pip install --no-index -f file://~/.basket glances ``` -------------------------------- ### Run Glances Webserver Source: https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version Start the Glances web server using 'make run-webserver'. This allows access to Glances data through a web interface. ```bash cd ~/tmp/glances make run-webserver ``` -------------------------------- ### Install Glances with MCP support Source: https://github.com/nicolargo/glances/blob/develop/docs/api/mcp.md Install the 'glances' package with the 'mcp' extra to enable MCP server functionality. This command installs the necessary dependencies for the MCP server. ```bash pip install 'glances[mcp]' ``` -------------------------------- ### Build Man Page Documentation Source: https://github.com/nicolargo/glances/blob/develop/docs/README.txt Build the man page documentation. Ensure the locale is set to C for consistent output. ```bash LC_ALL=C make man ``` -------------------------------- ### Initialize Configuration Variables Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Initializes configuration variables, potentially merging system and default configurations. ```python _init_config_vars() ``` ```python vars.update(_get_sysconfigdata() | vars) ``` ```python _init_posix(_CONFIG_VARS) ``` -------------------------------- ### Logging Get Logger Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Gets a logger instance by name from the logging system. ```python log = logging.getLogger(__name__) ``` -------------------------------- ### Install Glances using Python Package Manager Source: https://github.com/nicolargo/glances/blob/develop/README.rst Use this command to install Glances for a specific Python version, like Python 3.11.3. Ensure your system has the correct Python version installed. ```console # Example for Python 3.11.3: pkg install py311-glances ``` -------------------------------- ### GET /api/4/system Source: https://github.com/nicolargo/glances/blob/develop/docs/api/restful.md Retrieves system plugin stats and detailed system information. ```APIDOC ## GET /api/4/system ### Description Get system plugin stats. ### Method GET ### Endpoint /api/4/system ### Response #### Success Response (200) - **os_name** (string) - Operating system name. - **hostname** (string) - Hostname of the system. - **platform** (string) - Platform information (e.g., "64bit"). - **linux_distro** (string) - Linux distribution name. - **os_version** (string) - Operating system version. - **hr_name** (string) - Human-readable operating system name. ### Response Example ```json { "hostname": "nicolargo-xps15", "hr_name": "Ubuntu 24.04 64bit / Linux 6.17.0-19-generic", "linux_distro": "Ubuntu 24.04", "os_name": "Linux", "os_version": "6.17.0-19-generic", "platform": "64bit" } ``` ``` -------------------------------- ### Get Scroll Position Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Gets the scrollLeft and scrollTop of an element. Differentiates between window/document and other elements. ```javascript function nt(t){if("html"===T(t))return t;const n=t.assignedSlot||t.parentNode||P(t)&&t.host||z(t);return P(n)?n.host:n} ``` -------------------------------- ### Import Podman Client and From Env Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Imports PodmanClient and from_env from the podman.client module. Facilitates creating and configuring Podman client instances. ```python from podman.client import PodmanClient, from_env ``` -------------------------------- ### Get All Available Plugins (Python) Source: https://github.com/nicolargo/glances/wiki/The-Glances-XML-RPC-API-How-to Retrieve a list of all available plugins on the Glances server. This helps in understanding what data can be fetched. ```python s.getAllPlugins() ``` -------------------------------- ### Build Docker Image Source: https://github.com/nicolargo/glances/blob/develop/docker-files/README.md Use this command to build the Docker image for the project. Ensure you have Make installed. ```bash make docker ``` -------------------------------- ### Configure Web UI Allowed Hosts Source: https://github.com/nicolargo/glances/blob/develop/docs/api/restful.md Example configuration for setting allowed hostnames/IPs to protect against DNS rebinding attacks. ```ini [outputs] # Comma-separated list of allowed hostnames/IPs. ``` -------------------------------- ### Podman Client Initialization Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Initializes and configures the Podman client, including setting up API clients and handling Podman socket connections. ```python self.watchers['podman'] = PodmanExtension(podman_sock=self._podman_sock()) ``` ```python self.client = PodmanClient(base_url=self.podman_sock) ``` -------------------------------- ### Check Glances Version Source: https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version Verify the installed Glances version and related API and PsUtil versions after installation. ```bash ./glances -V ``` -------------------------------- ### Flip Start/End in Position String Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Reverses 'start' to 'end' and 'end' to 'start' within a positioning string. ```javascript function b(t){return t.replace(/start|end/g,t=>l[t])} ``` -------------------------------- ### Run Glances in Client/Server Mode (XML-RPC) Source: https://github.com/nicolargo/glances/blob/develop/README-pypi.rst Set up Glances for remote monitoring. Run the server on the machine to be monitored and the client to connect to it. ```console $ glances -s ``` ```console $ glances -c ``` -------------------------------- ### Trim Whitespace from Start of String Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Removes whitespace from the start of a string. Optionally, specify characters to trim. ```javascript Me.trimStart=function(t,n,e){if((t=ma(t))&&(e||n===i))return t.replace(ut,"");if(!t|!(n=li(n)))return t;var r=de(t);return xi(r,re(r,de(n))).join("")} ``` -------------------------------- ### Connect Glances to a Server (Client Mode) Source: https://github.com/nicolargo/glances/blob/develop/docs/glances.md Connect a Glances client to a running Glances server. Replace `` with the IP address of the server. ```console $ glances -c ``` -------------------------------- ### Get First Element of Collection Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Gets the first element of the collection. Returns undefined if the collection is empty. ```javascript Me.first=Zo ``` -------------------------------- ### Define glances.plugins.wifi.__init__ Module Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Imports the Wifi plugin from the Glances plugin system. ```python from glances.plugins.wifi import * ``` -------------------------------- ### Build Process List Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-pyinstrument.html Constructs a list of processes by iterating through them and extracting relevant details using psutil. ```python processes.py ``` ```python __init__.py ``` -------------------------------- ### Install Virtualenv Package Source: https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version Install the 'virtualenv' package using pip. This tool is used to create isolated Python environments. ```bash pip install --user virtualenv ``` -------------------------------- ### Get Available Quicklook Keys Source: https://github.com/nicolargo/glances/blob/develop/docs/api/python.md Lists all available keys for the quicklook data. Use this to understand what system metrics can be accessed via the quicklook interface. ```python ['cpu_name', 'cpu_hz_current', 'cpu_hz', 'cpu', 'percpu', 'mem', 'swap', 'cpu_log_core', 'cpu_phys_core', 'load'] ``` -------------------------------- ### Japanese Hyphen Example Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html A list containing a Japanese hyphen character. This might be used in localization or text processing examples. ```python "Japanese—": [ ``` -------------------------------- ### Get Specific Memory Metric Source: https://github.com/nicolargo/glances/blob/develop/glances.ipynb Retrieve a specific memory metric, like available memory, using the get() method. ```python gl.mem.get('available') ``` -------------------------------- ### Initialize Glances API and Access CPU Stats Source: https://github.com/nicolargo/glances/blob/develop/docs/api/python.md Import the Glances API and create an instance to access system metrics. Use the instance to retrieve data from plugins like 'cpu'. ```python >>> from glances import api >>> gl = api.GlancesAPI() >>> gl.cpu {'cpucore': 16, 'ctx_switches': 222088453, 'guest': 0.0, 'idle': 88.4, 'interrupts': 127887483, 'iowait': 0.4, 'irq': 0.0, 'nice': 0.0, 'soft_interrupts': 62068085, 'steal': 0.0, 'syscalls': 0, 'system': 5.6, 'total': 9.1, 'user': 5.5} ``` -------------------------------- ### Get Specific CPU Metric Source: https://github.com/nicolargo/glances/blob/develop/glances.ipynb Retrieve a specific CPU metric, such as the total CPU usage, by using the get() method. ```python gl.cpu.get('total') ``` -------------------------------- ### Configure Glances Server List Source: https://github.com/nicolargo/glances/blob/develop/docs/quickstart.md Example configuration for the '[serverlist]' section in Glances. This allows you to define columns to display and statically list servers with their aliases and ports for the Central Glances Browser. ```ini [serverlist] # Define columns (comma separated list of ::()) # Default is: system:hr_name,load:min5,cpu:total,mem:percent # You can also add stats with key, like sensors:value:Ambient (key is case sensitive) columns=system:hr_name,load:min5,cpu:total,mem:percent,memswap:percent # Define the static servers list server_1_name=xps server_1_alias=xps server_1_port=61209 server_2_name=win server_2_port=61235 ``` -------------------------------- ### Initialize LxdClient Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Initializes an LxdClient instance. ```python self.client = LxdClient()\n ``` -------------------------------- ### Install Glances using Homebrew on macOS Source: https://github.com/nicolargo/glances/blob/develop/README.rst For macOS users, install Glances easily using the Homebrew package manager with this command. ```console $ brew install glances ``` -------------------------------- ### Retrieve System Information via REST API Source: https://context7.com/nicolargo/glances/llms.txt Fetch system details such as hostname, OS name and version, platform, and distribution. Also includes endpoints for load averages, quicklook summary, uptime, and current time. ```bash curl http://localhost:61208/api/4/system ``` ```json # {"hostname": "myserver", "os_name": "Linux", ...} ``` ```bash curl http://localhost:61208/api/4/load ``` ```json # {"min1": 2.12, "min5": 1.78, "min15": 1.81, "cpucore": 16} ``` ```bash curl http://localhost:61208/api/4/quicklook ``` ```json # {"cpu": 9.8, "cpu_name": "13th Gen Intel(R) Core(TM) i7-13620H", ...} ``` ```bash curl http://localhost:61208/api/4/uptime ``` ```string # "3 days, 2:44:47" ``` ```bash curl http://localhost:61208/api/4/now ``` ```json # {"custom": "2026-04-21 11:32:29 CEST", "iso": "2026-04-21T11:32:29+02:00"} ``` -------------------------------- ### Get Annotations Function Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html A function or method stub for getting annotations, possibly related to Python's typing or metadata introspection. ```python get_annotations ``` -------------------------------- ### Configure Glances Services in Homepage Source: https://github.com/nicolargo/glances/blob/develop/tests-data/issues/issue3322-homepage/README.txt Define specific Glances metrics as services in your ./config/services.yaml file. This example shows how to configure CPU, Memory, and Network Usage widgets. Ensure the 'url' points to your Glances instance. ```yaml - Glances: - CPU Usage: widget: type: glances url: http://192.168.1.26:61208 version: 4 # required only if running glances v4 or higher, defaults to 3 metric: cpu - MEM Usage: widget: type: glances url: http://192.168.1.26:61208 version: 4 # required only if running glances v4 or higher, defaults to 3 metric: memory - Network Usage: widget: type: glances url: http://192.168.1.26:61208 version: 4 # required only if running glances v4 or higher, defaults to 3 metric: network:wlp0s20f3 ``` -------------------------------- ### Get All GPU Stats Source: https://github.com/nicolargo/glances/blob/develop/docs/api/restful.md Retrieves statistics for all detected GPUs. Use this endpoint to get a comprehensive overview of GPU usage and status. ```default # curl http://localhost:61208/api/4/gpu [{"fan_speed": None, "gpu_id": "intel0", "key": "gpu_id", "mem": None, "name": "UHD Graphics", "proc": 0, "temperature": None}, {"fan_speed": None, "gpu_id": "intel1", "key": "gpu_id", "mem": None, "name": "Arc A370M", "proc": 0, "temperature": None}] ``` -------------------------------- ### Create Docker Client from Environment Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Creates a Docker client instance by reading configuration from the environment. This is a convenient way to connect to the Docker daemon. ```python self.client = docker.from_env() ``` -------------------------------- ### Install Glances using MacPorts on macOS Source: https://github.com/nicolargo/glances/blob/develop/README.rst Alternatively, macOS users can install Glances via MacPorts using the provided sudo command. ```console $ sudo port install glances ``` -------------------------------- ### Run Glances Development Commands Source: https://github.com/nicolargo/glances/blob/develop/CONTRIBUTING.md Utilize the Makefile for common development tasks such as formatting code, running Glances, starting the web server, running tests, updating documentation, and compiling the Web UI. ```bash make format make run make run-webserver make test make docs make webui ``` -------------------------------- ### Show specific devices using a white list Source: https://github.com/nicolargo/glances/blob/develop/docs/aoa/fs.md To configure a white list of devices to display, use the 'show' option under the [fs] section with a regular expression. For example, to only show /dev/sdb mount points, use 'show=/dev/sdb.*'. ```ini [fs] show=/dev/sdb.* ``` -------------------------------- ### Format Docstring with Code Examples Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Appends formatted docstrings for sorted code examples to the existing __doc__ string, ensuring newlines for readability. ```python __doc__ + "\n" + "\n".join(doc(code) for code in sorted(_codes)) ``` -------------------------------- ### Start Glances with Password for Authentication Source: https://github.com/nicolargo/glances/blob/develop/tests/HOW_TO_TEST_MCP.md Use this command to start Glances with password protection enabled for MCP. You will be prompted to create a username and password. ```bash glances -w --enable-mcp --username ``` -------------------------------- ### Build and Add Opener Handler Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Demonstrates building an opener with urllib3 and adding a custom handler. This is typically used for customizing HTTP request handling. ```python _opener = opener = build_opener() ``` ```python opener.add_handler(klass()) ``` -------------------------------- ### Upgrade Glances Offline with easy_install Source: https://github.com/nicolargo/glances/wiki/Glances-offline-installation To upgrade Glances on an offline machine using easy_install, back up the existing configuration, extract the new files, and then run easy_install with the --upgrade flag, pointing to the local Basket repository. ```bash cd ~ tar zxvf glances-offline.tgz sudo mv /etc/glances /etc/glances.old sudo mkdir /etc/glances sudo touch /etc/glances/glances.conf sudo easy_install --upgrade -f ~/.basket -H None * ``` -------------------------------- ### Get and Convert Configuration Value in Python Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Internal helper function to get a configuration value and convert it to a specified type (e.g., float). ```python return self._get_conv(section, option, float, raw=raw, vars=vars, ``` -------------------------------- ### HTTP Client Get Response Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-pyinstrument.html This snippet shows the process of getting an HTTP response from a connection. It involves reading the status and headers before the body. ```python self.getresponse() ``` -------------------------------- ### Upgrade Glances using pip Source: https://github.com/nicolargo/glances/wiki/Glances-3.0-Release-Note Use this command to upgrade an existing Glances installation to the latest version. Requires a previous installation via pip. ```bash pip install --upgrade glances ``` -------------------------------- ### Run Glances Client Source: https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version Start the Glances client component in a separate terminal using 'make run-client'. This connects to a running Glances server. ```bash cd ~/tmp/glances make run-client ``` -------------------------------- ### Configure Filesystem Warning Action with Variables Source: https://github.com/nicolargo/glances/blob/develop/docs/aoa/actions.md Trigger a script when filesystem usage reaches a warning threshold. Pass mount point, used space, and total size as arguments. ```ini [fs] warning=70 warning_action=python /path/to/fs-warning.py {{mnt_point}} {{used}} {{size}} ``` -------------------------------- ### Example CouchDB Document for Load Stats Source: https://github.com/nicolargo/glances/blob/develop/docs/gw/couchdb.md This is an example of a CouchDB document generated by Glances for load statistics. It includes type, time, and load-related metrics. ```json { "_id": "36cbbad81453c53ef08804cb2612d5b6", "_rev": "1-382400899bec5615cabb99aa34df49fb", "min15": 0.33, "time": "2016-09-24T16:39:08.524Z", "min5": 0.4, "cpucore": 4, "load_warning": 1, "min1": 0.5, "history_size": 28800, "load_critical": 5, "type": "load", "load_careful": 0.7 } ``` -------------------------------- ### Initialize Glances Mode Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Sets up the Glances operating mode with custom configuration and arguments. ```python mode = GlancesMode(config=config, args=args) ``` -------------------------------- ### Execute HTTP GET Request Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Executes an HTTP GET request to a specified URL and returns the result as JSON. Used for fetching data from an API. ```python return self._result(self._get(url), json=True) ``` -------------------------------- ### Get Key Input in Curses Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-pyinstrument.html This snippet demonstrates how to get key input from the curses window. It's used for interactive elements in the terminal UI. ```python window.getch\u0000\u00000 ``` -------------------------------- ### Configure MQTT Export in Glances Source: https://github.com/nicolargo/glances/blob/develop/docs/gw/mqtt.md Define MQTT connection details in the Glances configuration file. Ensure the host, port, and authentication are correctly set. ```ini [mqtt] host=localhost # Overwrite device name in the topic (see detail in PR#2701) #devicename=localhost port=883 tls=true user=glances password=glances topic=glances topic_structure=per-metric callback_api_version=2 ``` -------------------------------- ### Run Glances in Docker (Web Server Mode) Source: https://context7.com/nicolargo/glances/llms.txt Deploy Glances using Docker to run as a web server. This allows remote monitoring via a web browser. Ensure ports are correctly mapped. ```bash # Run in web server mode docker run -d --restart="always" \ -p 61208-61209:61208-61209 \ -e TZ="${TZ}" \ -e GLANCES_OPT="-w" \ -v /var/run/docker.sock:/var/run/docker.sock:ro \ --pid host \ nicolargo/glances:latest-full ``` -------------------------------- ### Get CPU Stats Source: https://github.com/nicolargo/glances/blob/develop/docs/api/python.md Retrieves a dictionary containing various CPU utilization metrics. Use this to get real-time CPU usage percentages and counts. ```python >>> type(gl.cpu) ``` ```python >>> gl.cpu {'cpucore': 16, 'ctx_switches': 222088453, 'guest': 0.0, 'idle': 88.4, 'interrupts': 127887483, 'iowait': 0.4, 'irq': 0.0, 'nice': 0.0, 'soft_interrupts': 62068085, 'steal': 0.0, 'syscalls': 0, 'system': 5.6, 'total': 9.1, 'user': 5.5} ``` ```python >>> gl.cpu.keys() ['total', 'user', 'nice', 'system', 'idle', 'iowait', 'irq', 'steal', 'guest', 'ctx_switches', 'interrupts', 'soft_interrupts', 'syscalls', 'cpucore'] ``` ```python >>> gl.cpu.get("total") 9.1 ``` -------------------------------- ### Get Specific Network Metric Source: https://github.com/nicolargo/glances/blob/develop/glances.ipynb Extract a specific network metric, such as the receive rate per second for an interface, using chained get() calls. ```python gl.network.get('wlp0s20f3').get('bytes_recv_rate_per_sec') ``` -------------------------------- ### Run Glances with Custom Configuration File Source: https://github.com/nicolargo/glances/blob/develop/docs/docker.md Run the Glances container and mount a local glances.conf file to the container's configuration directory. Ensure `pwd` points to the directory containing your glances.conf. ```console docker run -v `pwd`/glances.conf:/etc/glances/glances.conf -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host -it docker.io/nicolargo/glances ``` -------------------------------- ### Get All Stats from Glances Server (Python) Source: https://github.com/nicolargo/glances/wiki/The-Glances-XML-RPC-API-How-to Fetch all system statistics from the Glances server in a single dictionary. This is a comprehensive way to get system data. ```python s.getAll() ``` -------------------------------- ### Glances Command Line Export Example Source: https://github.com/nicolargo/glances/blob/develop/docs/aoa/ps.md Command to run Glances, specifying a configuration file, enabling CSV export to a specific file, disabling all plugins except processlist, and running quietly. ```bash glances -C ./conf/glances.conf --export csv --export-csv-file /tmp/glances.csv --disable-plugin all --enable-plugin processlist --quiet ``` -------------------------------- ### Example MongoDB Document for Load Stats Source: https://github.com/nicolargo/glances/blob/develop/docs/gw/mongodb.md An example of a MongoDB document structure storing load statistics. Documents are stored in collections corresponding to Glances plugins. ```json { _id: ObjectId('63d78ffee5528e543ce5af3a'), min1: 1.46337890625, min5: 1.09619140625, min15: 1.07275390625, cpucore: 4, history_size: 1200, load_disable: 'False', load_careful: 0.7, load_warning: 1, load_critical: 5 } ``` -------------------------------- ### Initialize NVML with Flags Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Initializes the NVIDIA Management Library (NVML) with specified flags. This allows for more control over the initialization process. ```python nvmlInitWithFlags(flags) ``` -------------------------------- ### Glances CSV Export Output Example Source: https://github.com/nicolargo/glances/blob/develop/docs/aoa/ps.md Example of the CSV output generated by Glances when exporting process data. It includes timestamp and various process metrics. ```csv timestamp,845992.memory_percent,845992.status,845992.num_threads,845992.cpu_timesuser,845992.cpu_timessystem,845992.cpu_timeschildren_user,845992.cpu_timeschildren_system,845992.cpu_timesiowait,845992.memory_inforss,845992.memory_infovms,845992.memory_infoshared,845992.memory_infotext,845992.memory_infolib,845992.memory_infodata,845992.memory_infodirty,845992.name,845992.io_counters,845992.nice,845992.cpu_percent,845992.pid,845992.gidsreal,845992.gidseffective,845992.gidssaved,845992.key,845992.time_since_update,845992.cmdline,845992.username,total,running,sleeping,thread,pid_max 2024-04-03 18:39:55,3.692938041968513,S,138,1702.88,567.89,1752.79,244.18,0.0,288919552,12871561216,95182848,856064,0,984535040,0,firefox,1863281664,0,0.5,845992,1000,1000,1000,pid,2.2084147930145264,/snap/firefox/3836/usr/lib/firefox/firefox,nicolargo,403,1,333,1511,0 2024-04-03 18:39:57,3.692938041968513,S,138,1702.88,567.89,1752.79,244.18,0.0,288919552,12871561216,95182848,856064,0,984535040,0,firefox,1863281664,0,0.5,845992,1000,1000,1000,pid,2.2084147930145264,/snap/firefox/3836/usr/lib/firefox/firefox,nicolargo,403,1,333,1511,0 ``` -------------------------------- ### Get Stats Display (Model Plugin) Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-pyinstrument.html This snippet illustrates getting statistics for display from the model plugin, including 'cProgramlistPlugin', 'cProcesslistPlugin', and 'l1101' attributes, with timing. ```python "identifier": "get_stats_display\u0000/home/nicolargo/dev/glances/glances/plugins/plugin/model.py\u00001082","time": 0.053990,"attributes": {"cProgramlistPlugin": 0.02199167900107568, "l1101": 0.05398981100006495, "cProcesslistPlugin": 0.031998131998989265} ``` -------------------------------- ### Rockchip NPU Initialization Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html Initializes the RockchipNPU with a specified root folder. Used for Rockchip NPU hardware interaction. ```python self.rockchip = RockchipNPU(npu_root_folder=rockchip_npu_root_folder) ``` -------------------------------- ### Configure Quicklook Plugin (Glances 3.0 Style) Source: https://github.com/nicolargo/glances/wiki/Glances-4.0-Release-Note Use this configuration to revert the 'quicklook' plugin to its Glances version 3.0 behavior, displaying swap instead of load information and using a '|' character for graphical bars. ```ini [quicklook] # Stats list (default is cpu,mem,load) # Available stats are: cpu,mem,load,swap list=cpu,mem,swap # Graphical bar char used in the terminal user interface (default is |) bar_char=| ``` -------------------------------- ### Get Specific Glances Load Statistic Source: https://github.com/nicolargo/glances/blob/develop/docs/api/python.md Retrieves a specific load statistic, in this case, the 1-minute load average. Use the appropriate key to get other metrics. ```python >>> gl.load.get("min1") 1.96435546875 ``` -------------------------------- ### Install Glances Development Version from TestPyPI Source: https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version Install a specific development version of Glances from the TestPyPI repository within your virtual environment. Replace '4.3.2.dev4' with the desired version. ```bash ./pip install -i https://test.pypi.org/simple/ Glances==4.3.2.dev4 ``` -------------------------------- ### RFC 4514 Name Parsing Example Source: https://github.com/nicolargo/glances/blob/develop/docs/_static/glances-flame.html A raw string literal representing an RFC 4514 distinguished name, likely used for testing or as an example in parsing logic. ```python rf""" ``` -------------------------------- ### Glances CLI - Fetch Mode Source: https://github.com/nicolargo/glances/blob/develop/README.rst Demonstrates the basic fetch mode of the Glances CLI for a quick system overview. ```APIDOC ## Glances CLI - Fetch Mode ### Description This command provides a quick, visual overview of the system's current status. ### Method Command Line Interface (CLI) ### Endpoint N/A (CLI command) ### Parameters None ### Request Example ```console $ glances --fetch ``` ### Response Displays a screenshot-like overview of system metrics (visual output, not text-based JSON). ### Response Example (Visual output, refer to documentation for screenshot) ![Glances Fetch Mode Screenshot](./docs/_static/screenshot-fetch.png) ```