xtop


Namextop JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
Summaryxtop, a command line xpu hardware monitoring tool that supports CPU, GPU, and NPU.
upload_time2025-02-22 16:04:01
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseGPL-3.0-or-later
keywords xtop xpu system information command line tool python hardware information gpu npu
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # xtop


[![Downloads](https://static.pepy.tech/badge/xtop)](https://pepy.tech/project/xtop)
![PyPI - Version](https://img.shields.io/pypi/v/xtop?label=version)

![Static Badge](https://img.shields.io/badge/Linux-blue)
![Static Badge](https://img.shields.io/badge/Windows-green)


xtop, a command line xpu hardware monitoring tool that supports CPU, GPU, and NPU. **Currently,  this project is still in the initial stage, only Nvidia GPU and Intel NPU are supported on Linux and Windows System**

![demo](https://files.catbox.moe/fb9ryz.jpg)

## 0. Why this project
There are many command-line based resource monitors, such as _htop_ and _nvtop_, but they are usually distributed through the system's package manager, which means that administrator privileges are required to install them. However, in most cases, asking administrators to install these programs is not a pleasant process. So a program implemented in **Python** and distributed using **pip** should be more useful (at least to me).

## 1. Install
### 1.1 Install by pipx
**pipx** is an amazing tool to help you install and run applications written in Python. It is more like **brew** or **apt**. You can find more information about it here [pipx](https://github.com/pypa/pipx). **pipx** is available on almost all major platforms and is usually provided by the corresponding package manager. If you haven't used pipx before, you can refer to this [document](https://pipx.pypa.io/stable/installation/) to install it.

You can install **xtop** by the following command:
```shell
pipx install xtop
```

### 1.2 Install by pip
In any case, pip is always available, so if you can't install this program using **pipx**, you can install **xtop** by the following command:
```shell
pip install xtop
```
To upgrade **xtop**:
```shell
pip install xtop -U
# or
pip install xtop --upgrade
```

Please note that the command line entry for **xtop** is created by pip, and depending on the user, this entry may not in the __system PATH__. If you encounter this problem, pip will give you a prompt, follow the prompts to add entry to the __system PATH__.


### 1.3 Important note about Windows
Python standard package **curses** does not support Windows, so we need **windows-curses** to run **xtop** on Windows. This package should be installed automatically when you install **xtop**. If you encounter any problems, you can install it manually by the following command:

```shell
pip install windows-curses
```


### 1.4 Important note about debian 12:
If you use system pip to install **xtop**, you will encounter this problem on debian12 and some related distributions (like Ubuntu 24.04):
```text
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    For more information visit http://rptl.io/venv

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
```
This is due to the fact that system Python is not supposed to be managed by pip. You can simply use **pipx** to install **xtop**. Or you can use a virtual environment (venv), conda environment or force remove this restriction (not recommended).


## 2. Usage
### Use as a command line tool
You can use this tool directly from the command line with the following command, just like other programs.
```shell
xtop [Options]
```
For example, use -n flag to open NPU, with -l flag to enable LOG:
```shell
xtop -n -l
```
Or use -g flag to open GPU:
```shell
xtop -g
```
For more command line flags, see:
```shell
xtop -h
```

Please note that the command line entry for __xtop__ is created by pip, and depending on the user, this entry may not in the __system PATH__. If you encounter this problem, pip will give you a prompt, follow the prompts to add entry to the __system PATH__.

More functionalities are under development.

## 3. Supported (Tested) OS
* Linux
* Windows (Only GPU)


## 4. Build from source
### 4.1 Build tools
Make sure the following Python build tools are already installed.
* setuptools
* build
* twine

### 4.2 Build package
clone the project, and run:
```shell
python -m build
```
After the build process, the source package and the binary whl package can be found in the dist folder.




            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "xtop",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "xtop, xpu, system information, command line tool, python, hardware information, GPU, NPU",
    "author": null,
    "author_email": "Xiao Ran <xiaoran.007@icloud.com>",
    "download_url": "https://files.pythonhosted.org/packages/b5/4c/84c3f482fd4e46301e17112ee338888205c5d968d5463941d65a28eb20e2/xtop-0.1.2.tar.gz",
    "platform": null,
    "description": "# xtop\n\n\n[![Downloads](https://static.pepy.tech/badge/xtop)](https://pepy.tech/project/xtop)\n![PyPI - Version](https://img.shields.io/pypi/v/xtop?label=version)\n\n![Static Badge](https://img.shields.io/badge/Linux-blue)\n![Static Badge](https://img.shields.io/badge/Windows-green)\n\n\nxtop, a command line xpu hardware monitoring tool that supports CPU, GPU, and NPU. **Currently,  this project is still in the initial stage, only Nvidia GPU and Intel NPU are supported on Linux and Windows System**\n\n![demo](https://files.catbox.moe/fb9ryz.jpg)\n\n## 0. Why this project\nThere are many command-line based resource monitors, such as _htop_ and _nvtop_, but they are usually distributed through the system's package manager, which means that administrator privileges are required to install them. However, in most cases, asking administrators to install these programs is not a pleasant process. So a program implemented in **Python** and distributed using **pip** should be more useful (at least to me).\n\n## 1. Install\n### 1.1 Install by pipx\n**pipx** is an amazing tool to help you install and run applications written in Python. It is more like **brew** or **apt**. You can find more information about it here [pipx](https://github.com/pypa/pipx). **pipx** is available on almost all major platforms and is usually provided by the corresponding package manager. If you haven't used pipx before, you can refer to this [document](https://pipx.pypa.io/stable/installation/) to install it.\n\nYou can install **xtop** by the following command:\n```shell\npipx install xtop\n```\n\n### 1.2 Install by pip\nIn any case, pip is always available, so if you can't install this program using **pipx**, you can install **xtop** by the following command:\n```shell\npip install xtop\n```\nTo upgrade **xtop**:\n```shell\npip install xtop -U\n# or\npip install xtop --upgrade\n```\n\nPlease note that the command line entry for **xtop** is created by pip, and depending on the user, this entry may not in the __system PATH__. If you encounter this problem, pip will give you a prompt, follow the prompts to add entry to the __system PATH__.\n\n\n### 1.3 Important note about Windows\nPython standard package **curses** does not support Windows, so we need **windows-curses** to run **xtop** on Windows. This package should be installed automatically when you install **xtop**. If you encounter any problems, you can install it manually by the following command:\n\n```shell\npip install windows-curses\n```\n\n\n### 1.4 Important note about debian 12:\nIf you use system pip to install **xtop**, you will encounter this problem on debian12 and some related distributions (like Ubuntu 24.04):\n```text\nerror: externally-managed-environment\n\n\u00d7 This environment is externally managed\n\u2570\u2500> To install Python packages system-wide, try apt install\n    python3-xyz, where xyz is the package you are trying to\n    install.\n    \n    If you wish to install a non-Debian-packaged Python package,\n    create a virtual environment using python3 -m venv path/to/venv.\n    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make\n    sure you have python3-full installed.\n    \n    For more information visit http://rptl.io/venv\n\nnote: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.\nhint: See PEP 668 for the detailed specification.\n```\nThis is due to the fact that system Python is not supposed to be managed by pip. You can simply use **pipx** to install **xtop**. Or you can use a virtual environment (venv), conda environment or force remove this restriction (not recommended).\n\n\n## 2. Usage\n### Use as a command line tool\nYou can use this tool directly from the command line with the following command, just like other programs.\n```shell\nxtop [Options]\n```\nFor example, use -n flag to open NPU, with -l flag to enable LOG:\n```shell\nxtop -n -l\n```\nOr use -g flag to open GPU:\n```shell\nxtop -g\n```\nFor more command line flags, see:\n```shell\nxtop -h\n```\n\nPlease note that the command line entry for __xtop__ is created by pip, and depending on the user, this entry may not in the __system PATH__. If you encounter this problem, pip will give you a prompt, follow the prompts to add entry to the __system PATH__.\n\nMore functionalities are under development.\n\n## 3. Supported (Tested) OS\n* Linux\n* Windows (Only GPU)\n\n\n## 4. Build from source\n### 4.1 Build tools\nMake sure the following Python build tools are already installed.\n* setuptools\n* build\n* twine\n\n### 4.2 Build package\nclone the project, and run:\n```shell\npython -m build\n```\nAfter the build process, the source package and the binary whl package can be found in the dist folder.\n\n\n\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "xtop, a command line xpu hardware monitoring tool that supports CPU, GPU, and NPU.",
    "version": "0.1.2",
    "project_urls": {
        "homepage": "https://github.com/xiaoran007/xtop"
    },
    "split_keywords": [
        "xtop",
        " xpu",
        " system information",
        " command line tool",
        " python",
        " hardware information",
        " gpu",
        " npu"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "48fadb015d957cf124456bf23fbc28137518402c85ee65a23949fdc61a1e3c2f",
                "md5": "bcedf00cc83f960ccca666b2a228bf88",
                "sha256": "a723897238efe69e9673efcb30afb7d65fc0cae236a71cfd4c2cfc0da8b93cfc"
            },
            "downloads": -1,
            "filename": "xtop-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bcedf00cc83f960ccca666b2a228bf88",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 22794,
            "upload_time": "2025-02-22T16:03:59",
            "upload_time_iso_8601": "2025-02-22T16:03:59.084891Z",
            "url": "https://files.pythonhosted.org/packages/48/fa/db015d957cf124456bf23fbc28137518402c85ee65a23949fdc61a1e3c2f/xtop-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b54c84c3f482fd4e46301e17112ee338888205c5d968d5463941d65a28eb20e2",
                "md5": "301785f0ef5dd69144ef28cf46cd1152",
                "sha256": "111e307099fcd3bab5fb854592a706b3e0923fe293d1745f1d768d75fcfc05b5"
            },
            "downloads": -1,
            "filename": "xtop-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "301785f0ef5dd69144ef28cf46cd1152",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 22402,
            "upload_time": "2025-02-22T16:04:01",
            "upload_time_iso_8601": "2025-02-22T16:04:01.328908Z",
            "url": "https://files.pythonhosted.org/packages/b5/4c/84c3f482fd4e46301e17112ee338888205c5d968d5463941d65a28eb20e2/xtop-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-22 16:04:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "xiaoran007",
    "github_project": "xtop",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "xtop"
}
        
Elapsed time: 0.52443s