# JupyterLab System Monitor
![Github Actions Status](https://github.com/jtpio/jupyterlab-system-monitor/workflows/Build/badge.svg)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jtpio/jupyterlab-system-monitor/stable?urlpath=lab)
[![PyPI](https://img.shields.io/pypi/v/jupyterlab-system-monitor.svg)](https://pypi.org/project/jupyterlab-system-monitor)
JupyterLab extension to display system information (memory and cpu usage).
Provides an alternative frontend for the `jupyter-resource-usage` metrics: [https://github.com/jupyter-server/jupyter-resource-usage](https://github.com/jupyter-server/jupyter-resource-usage)
![screencast](./doc/screencast.gif)
This extension was originally developed as part of the [jupyterlab-topbar](https://github.com/jtpio/jupyterlab-topbar) project, and extracted into its own repository later on.
## TODO
- Add Network I/O
- Expose more settings
## Prerequisites
- JupyterLab 1.0+
- Node.js
## Installation
This extension requires the `jupyter-resource-usage` package and the `jupyterlab-topbar-extension` extension for JupyterLab.
**Note: This extension is not compatible with `nbresuse==0.3.4`**.
Starting from JupyterLab 3.0, extensions can be distributed as a Python package. Installation instructions will differ depending on your version of JupyterLab:
### JupyterLab 3.x
```bash
pip install jupyterlab-system-monitor
```
### JupyterLab 2.x
```bash
pip install nbresuse
jupyter labextension install jupyterlab-topbar-extension jupyterlab-system-monitor
```
`nbresuse` can also be installed with `conda`:
```bash
conda install -c conda-forge nbresuse
```
Note: Node.js is required to install JupyterLab extensions. It can be installed with `conda`:
```bash
conda install -c conda-forge nodejs
```
## Configuration
### Graphic Display
You can set the memory and cpu limits (but not enforce it) to display the indicator in the top bar.
For more info, check the [memory limit](https://github.com/jupyter-server/jupyter-resource-usage#memory-limit) in the [nbresuse](https://github.com/jupyter-server/jupyter-resource-usage) repository.
Edit `~/.jupyter/jupyter_notebook_config.py` (note: see [here](https://jupyter-notebook.readthedocs.io/en/stable/config.html#config-file-and-command-line-options) if you do not have a config file:
```python
c = get_config()
# memory
c.NotebookApp.ResourceUseDisplay.mem_limit = <size_in_GB> *1024*1024*1024
# cpu
c.NotebookApp.ResourceUseDisplay.track_cpu_percent = True
c.NotebookApp.ResourceUseDisplay.cpu_limit = <number_of_cpus>
```
For example:
```python
c.NotebookApp.ResourceUseDisplay.mem_limit = 4294967296
c.NotebookApp.ResourceUseDisplay.track_cpu_percent = True
c.NotebookApp.ResourceUseDisplay.cpu_limit = 2
```
Or use the command line option:
```bash
# POSIX shell
jupyter lab --NotebookApp.ResourceUseDisplay.mem_limit=$(( size_in_GB *1024*1024*1024)) \
--NotebookApp.ResourceUseDisplay.track_cpu_percent=True \
--NotebookApp.ResourceUseDisplay.cpu_limit=$(( number_of_cpus ))
```
### Advanced Settings
You can change the label and refresh rate in JupyterLab's advanced settings editor:
![jupyterlab_setting](./doc/setting.png)
## Troubleshooting
If you are experiencing issues with the memory and cpu indicators not being displayed, make sure to check the [nbresuse changelog](https://github.com/jupyter-server/jupyter-resource-usage/blob/master/CHANGELOG.md) for any breaking changes from major releases.
## Development
```bash
# create a new conda environment
conda create -n jupyterlab-system-monitor -c conda-forge jupyterlab nodejs nbresuse
conda activate jupyterlab-system-monitor
# Install dependencies
jlpm
# Install the package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jlpm run develop
# Rebuild extension TypeScript source after making changes
jlpm run build
```
### Uninstall
```bash
pip uninstall jupyterlab-system-monitor
```
Raw data
{
"_id": null,
"home_page": "https://github.com/jtpio/jupyterlab-system-monitor.git",
"name": "jupyterlab-system-monitor",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "Jupyter,JupyterLab",
"author": "Jeremy Tuloup",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/ad/a9/2bcf4cb78422bbd42db9314bef38f65eeb292b4e54086e96d13db7808476/jupyterlab-system-monitor-0.8.0.tar.gz",
"platform": "Linux",
"description": "# JupyterLab System Monitor\n\n![Github Actions Status](https://github.com/jtpio/jupyterlab-system-monitor/workflows/Build/badge.svg)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jtpio/jupyterlab-system-monitor/stable?urlpath=lab)\n[![PyPI](https://img.shields.io/pypi/v/jupyterlab-system-monitor.svg)](https://pypi.org/project/jupyterlab-system-monitor)\n\nJupyterLab extension to display system information (memory and cpu usage).\n\nProvides an alternative frontend for the `jupyter-resource-usage` metrics: [https://github.com/jupyter-server/jupyter-resource-usage](https://github.com/jupyter-server/jupyter-resource-usage)\n\n![screencast](./doc/screencast.gif)\n\nThis extension was originally developed as part of the [jupyterlab-topbar](https://github.com/jtpio/jupyterlab-topbar) project, and extracted into its own repository later on.\n\n## TODO\n\n- Add Network I/O\n- Expose more settings\n\n## Prerequisites\n\n- JupyterLab 1.0+\n- Node.js\n\n## Installation\n\nThis extension requires the `jupyter-resource-usage` package and the `jupyterlab-topbar-extension` extension for JupyterLab.\n\n**Note: This extension is not compatible with `nbresuse==0.3.4`**.\n\nStarting from JupyterLab 3.0, extensions can be distributed as a Python package. Installation instructions will differ depending on your version of JupyterLab:\n\n### JupyterLab 3.x\n\n```bash\npip install jupyterlab-system-monitor\n```\n\n### JupyterLab 2.x\n\n```bash\npip install nbresuse\njupyter labextension install jupyterlab-topbar-extension jupyterlab-system-monitor\n```\n\n`nbresuse` can also be installed with `conda`:\n\n```bash\nconda install -c conda-forge nbresuse\n```\n\nNote: Node.js is required to install JupyterLab extensions. It can be installed with `conda`:\n\n```bash\nconda install -c conda-forge nodejs\n```\n\n## Configuration\n\n### Graphic Display\n\nYou can set the memory and cpu limits (but not enforce it) to display the indicator in the top bar.\n\nFor more info, check the [memory limit](https://github.com/jupyter-server/jupyter-resource-usage#memory-limit) in the [nbresuse](https://github.com/jupyter-server/jupyter-resource-usage) repository.\n\nEdit `~/.jupyter/jupyter_notebook_config.py` (note: see [here](https://jupyter-notebook.readthedocs.io/en/stable/config.html#config-file-and-command-line-options) if you do not have a config file:\n\n```python\nc = get_config()\n\n# memory\nc.NotebookApp.ResourceUseDisplay.mem_limit = <size_in_GB> *1024*1024*1024\n\n# cpu\nc.NotebookApp.ResourceUseDisplay.track_cpu_percent = True\nc.NotebookApp.ResourceUseDisplay.cpu_limit = <number_of_cpus>\n```\n\nFor example:\n\n```python\nc.NotebookApp.ResourceUseDisplay.mem_limit = 4294967296\nc.NotebookApp.ResourceUseDisplay.track_cpu_percent = True\nc.NotebookApp.ResourceUseDisplay.cpu_limit = 2\n```\n\nOr use the command line option:\n\n```bash\n# POSIX shell\njupyter lab --NotebookApp.ResourceUseDisplay.mem_limit=$(( size_in_GB *1024*1024*1024)) \\\n --NotebookApp.ResourceUseDisplay.track_cpu_percent=True \\\n --NotebookApp.ResourceUseDisplay.cpu_limit=$(( number_of_cpus ))\n```\n\n### Advanced Settings\n\nYou can change the label and refresh rate in JupyterLab's advanced settings editor:\n\n![jupyterlab_setting](./doc/setting.png)\n\n## Troubleshooting\n\nIf you are experiencing issues with the memory and cpu indicators not being displayed, make sure to check the [nbresuse changelog](https://github.com/jupyter-server/jupyter-resource-usage/blob/master/CHANGELOG.md) for any breaking changes from major releases.\n\n## Development\n\n```bash\n# create a new conda environment\nconda create -n jupyterlab-system-monitor -c conda-forge jupyterlab nodejs nbresuse\nconda activate jupyterlab-system-monitor\n\n# Install dependencies\njlpm\n\n# Install the package in development mode\npip install -e .\n\n# Link your development version of the extension with JupyterLab\njlpm run develop\n\n# Rebuild extension TypeScript source after making changes\njlpm run build\n```\n\n### Uninstall\n\n```bash\npip uninstall jupyterlab-system-monitor\n```\n\n\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "JupyterLab extension to display system information",
"version": "0.8.0",
"project_urls": {
"Homepage": "https://github.com/jtpio/jupyterlab-system-monitor.git"
},
"split_keywords": [
"jupyter",
"jupyterlab"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e4cf6b635049df82a79f0b5da5b8e4df3d936bd544a84050ae89582dd50ad445",
"md5": "8a3c8461637e6c8ecd39b0696e65da6a",
"sha256": "2e26c2df5272237eba326ecd1eedb8203df19087fd1d651212cfd4ffeac3b122"
},
"downloads": -1,
"filename": "jupyterlab_system_monitor-0.8.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8a3c8461637e6c8ecd39b0696e65da6a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 63744,
"upload_time": "2021-02-04T22:37:18",
"upload_time_iso_8601": "2021-02-04T22:37:18.004464Z",
"url": "https://files.pythonhosted.org/packages/e4/cf/6b635049df82a79f0b5da5b8e4df3d936bd544a84050ae89582dd50ad445/jupyterlab_system_monitor-0.8.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ada92bcf4cb78422bbd42db9314bef38f65eeb292b4e54086e96d13db7808476",
"md5": "a9bf6d41c62a7e826cd543376e638c82",
"sha256": "f8d03d3ee26c84300c85e570f1a9d5f69bdcfa85e9a298f5716b67e36d0d94df"
},
"downloads": -1,
"filename": "jupyterlab-system-monitor-0.8.0.tar.gz",
"has_sig": false,
"md5_digest": "a9bf6d41c62a7e826cd543376e638c82",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 23209,
"upload_time": "2021-02-04T22:37:19",
"upload_time_iso_8601": "2021-02-04T22:37:19.260009Z",
"url": "https://files.pythonhosted.org/packages/ad/a9/2bcf4cb78422bbd42db9314bef38f65eeb292b4e54086e96d13db7808476/jupyterlab-system-monitor-0.8.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2021-02-04 22:37:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jtpio",
"github_project": "jupyterlab-system-monitor",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "jupyterlab-system-monitor"
}