Skip to main content

JupyterLab extension to display system information

Project description

JupyterLab System Monitor

Github Actions Status Binder PyPI

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

screencast

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:

jupyterlab_setting

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyterlab-system-monitor-0.8.0.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file jupyterlab-system-monitor-0.8.0.tar.gz.

File metadata

  • Download URL: jupyterlab-system-monitor-0.8.0.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for jupyterlab-system-monitor-0.8.0.tar.gz
Algorithm Hash digest
SHA256 f8d03d3ee26c84300c85e570f1a9d5f69bdcfa85e9a298f5716b67e36d0d94df
MD5 a9bf6d41c62a7e826cd543376e638c82
BLAKE2b-256 ada92bcf4cb78422bbd42db9314bef38f65eeb292b4e54086e96d13db7808476

See more details on using hashes here.

File details

Details for the file jupyterlab_system_monitor-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: jupyterlab_system_monitor-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 63.7 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for jupyterlab_system_monitor-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e26c2df5272237eba326ecd1eedb8203df19087fd1d651212cfd4ffeac3b122
MD5 8a3c8461637e6c8ecd39b0696e65da6a
BLAKE2b-256 e4cf6b635049df82a79f0b5da5b8e4df3d936bd544a84050ae89582dd50ad445

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page