This project has been archived by its maintainers, and is no longer receiving any updates.
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
This extension was originally developed as part of the 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
pip install jupyterlab-system-monitor
JupyterLab 2.x
pip install nbresuse
jupyter labextension install jupyterlab-topbar-extension jupyterlab-system-monitor
nbresuse can also be installed with conda:
conda install -c conda-forge nbresuse
Note: Node.js is required to install JupyterLab extensions. It can be installed with conda:
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 in the nbresuse repository.
Edit ~/.jupyter/jupyter_notebook_config.py (note: see here if you do not have a config file:
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:
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:
# 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:
Troubleshooting
If you are experiencing issues with the memory and cpu indicators not being displayed, make sure to check the nbresuse changelog for any breaking changes from major releases.
Development
# 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
pip uninstall jupyterlab-system-monitor
Metadata
Release files for jupyterlab-system-monitor 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jupyterlab-system-monitor-0.8.0.tar.gz | 23.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jupyterlab_system_monitor-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 87.0 kB
Release files / jupyterlab-system-monitor-0.8.0.tar.gz
| Download URL | jupyterlab-system-monitor-0.8.0.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8d03d3ee26c84300c85e570f1a9d5f69bdcfa85e9a298f5716b67e36d0d94df
|
|
BLAKE2b-256 checksum How to use checksums |
ada92bcf4cb78422bbd42db9314bef38f65eeb292b4e54086e96d13db7808476
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0
|
Release files / jupyterlab_system_monitor-0.8.0-py3-none-any.whl
| Download URL | jupyterlab_system_monitor-0.8.0-py3-none-any.whl |
|---|---|
| Size | 63.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e26c2df5272237eba326ecd1eedb8203df19087fd1d651212cfd4ffeac3b122
|
|
BLAKE2b-256 checksum How to use checksums |
e4cf6b635049df82a79f0b5da5b8e4df3d936bd544a84050ae89582dd50ad445
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0
|