Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, macOS and Windows operating systems.
翻译准备中
开发工具Python · VueGitHub @nicolargo自行安装运营者未确认
试用过了吗? 点一下就好,无需登录。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗.. raw:: html
.. raw:: html
An Eye on your System
| |pypi| |test| |contributors| |codacity| |quality| | |starts| |docker| |pypistat| |sponsors| | |reddit|
.. |pypi| image:: https://img.shields.io/pypi/v/glances.svg :target: https://pypi.python.org/pypi/Glances
.. |starts| image:: https://img.shields.io/github/stars/nicolargo/glances.svg :target: https://github.com/nicolargo/glances/ :alt: Github stars
.. |docker| image:: https://img.shields.io/docker/pulls/nicolargo/glances :target: https://hub.docker.com/r/nicolargo/glances/ :alt: Docker pull
.. |pypistat| image:: https://pepy.tech/badge/glances/month :target: https://clickpy.clickhouse.com/dashboard/glances :alt: Pypi downloads
.. |test| image:: https://github.com/nicolargo/glances/actions/workflows/ci.yml/badge.svg?branch=develop :target: https://github.com/nicolargo/glances/actions :alt: Linux tests (GitHub Actions)
.. |contributors| image:: https://img.shields.io/github/contributors/nicolargo/glances :target: https://github.com/nicolargo/glances/issues?q=is%3Aissue+is%3Aopen+label%3A%22needs+contributor%22 :alt: Contributors
.. |codacity| image:: https://app.codacy.com/project/badge/Grade/40708882575f4cb3943565889de2ed6e :target: https://app.codacy.com/gh/nicolargo/glances/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade :alt: Codacity
.. |quality| image:: https://scrutinizer-ci.com/g/nicolargo/glances/badges/quality-score.png?b=develop :target: https://scrutinizer-ci.com/g/nicolargo/glances/?branch=develop :alt: Code quality
.. |sponsors| image:: https://img.shields.io/github/sponsors/nicolargo :target: https://github.com/sponsors/nicolargo :alt: Sponsors
.. |twitter| image:: https://img.shields.io/badge/X-000000?style=for-the-badge&logo=x&logoColor=white :target: https://twitter.com/nicolargo :alt: @nicolargo
.. |reddit| image:: https://img.shields.io/badge/Reddit-FF4500?style=for-the-badge&logo=reddit&logoColor=white :target: https://www.reddit.com/r/glances/ :alt: @reddit
.. raw:: html
.. important::
**The current stable release is Glances 4.5.9**: see the `v4.5.9 <https://github.com/nicolargo/glances/tree/v4.5.9>`__ tag for its
source code and documentation. ``pip install glances`` installs it.
**This branch (develop) contains Glances 5.0.0, currently in beta.**
The rest of this page describes Glances 5.
.. warning::
**Try Glances 5 (beta)** — for testing only:
- it is a **beta**: expect bugs, and **do not use it in production**;
- the **API is broken compared to Glances 4**: the REST API moves from ``/api/4``
to ``/api/5``, the Python API is new, and a Glances 5 client only talks to a
Glances 5 server (no XML-RPC anymore);
- configuration files from Glances 4 are read, but some options changed.
Install the beta from TestPyPI in a dedicated virtual environment
(dependencies still come from PyPI):
.. code-block:: console
python3 -m venv ~/.venv-glances5
source ~/.venv-glances5/bin/activate
pip install --pre --index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ 'glances[web]>=5.0.0b1'
glances --version
Or run the ``nicolargo/glances:dev`` Docker image (built from this branch).
Please report what you find in the GitHub `issues <https://github.com/nicolargo/glances/issues>`__.
Glances is an open-source, cross-platform system monitoring tool. It shows in real time CPU, memory, load, disks, file systems, network, sensors (temperatures, voltages, fans, battery), GPUs, NPUs and processes. It also monitors containers (Docker, Podman, LXD) and virtual machines (Multipass, libvirt). Everything is presented in an easy-to-read dashboard, in the terminal or in a Web browser, and you choose what to display.
In client/server mode, remote monitoring could be done via terminal, Web interface or RESTful API. Stats can also be exported to files or external time/value databases, CSV or direct output to STDOUT.
AI assistants (Claude, Cursor, …) can query Glances directly through the built-in MCP server.
Glances is written in Python and uses libraries to grab information from your system. It is based on an open architecture where developers can add new plugins or exports modules. It can also be used as a Python library in your own scripts and notebooks.
Glances can be used in the following modes.
Monitor the local machine in your terminal:
.. code-block:: console
$ glances
.. image:: ./docs/_static/glances-summary.png
Press h in the interface to display the hotkeys.
Start the Web server (REST API and WebUI):
.. code-block:: console
$ glances -s
(-w is an alias of -s) and enter the URL http://localhost:61208 in your
favorite web browser.
.. image:: ./docs/_static/glances-webui-with-alert.png
The server listens on 127.0.0.1 by default. To reach it from another machine,
listen on all interfaces with -B 0.0.0.0 (or bind_address in the [outputs]
section of the configuration file) and enter the URL http://<ip>:61208.
The same server exposes a HTTP/RESTful API under /api/5, see the RestfulApi_
documentation. It is not protected by default, see Advanced usage 🔧_ to set a
password.
Start a server on the machine to monitor:
.. code-block:: console
server$ glances -s -B 0.0.0.0
and display it in the terminal of another machine:
.. code-block:: console
client$ glances -c <server_ip>
.. image:: ./docs/_static/glances-client-server.png
The client reads the stats from the server REST API (use --password to be
prompted for the server password). A Glances 5 client only talks to a Glances 5 server.
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗