Skip to main content

JupyterLab extension replacing jupyter-resource-usage with a less intrusive, better implementation of resource usage monitoring

Project description

jupyterlab_resource_monitor_extension

GitHub Actions npm version PyPI version Total PyPI downloads JupyterLab 4 Brought To You By KOLOMOLO Donate PayPal

JupyterLab extension that replaces jupyter-resource-usage with a less intrusive and better implementation of resource usage monitoring.

This extension is composed of a Python package named jupyterlab_resource_monitor_extension for the server extension and a NPM package named jupyterlab_resource_monitor_extension for the frontend extension.

Features

  • Memory monitor in the status bar - current memory usage with the maximum available memory shown alongside; under cgroup v2 this is the server's own cgroup, and without it the reading is host-wide
  • CPU usage in the status bar - live CPU utilization next to the memory indicator, as a percentage or a compact bar; same scope as the memory reading
  • Kernel usage panel - sidebar panel showing memory and CPU for the kernel attached to the notebook you are looking at
  • Container aware - reads the cgroup v2 limits when present, so the ceiling shown is the container's limit rather than the host's RAM
  • Event-loop safe metrics collection - metrics are gathered off the tornado event loop, so polling never blocks websockets, kernel messages, or static file serving
  • Bounded collection cost - no synchronous recursive walk of the server's child process tree, so a large or leaked process population cannot degrade JupyterLab responsiveness
  • Measures kernels only while you are watching - the kernel panel samples solely while it is open, and stops entirely when it is closed
  • Drop-in replacement - designed to replace jupyter-resource-usage with a safer implementation

How the collection stays off the event loop, what bounds its cost, and how it degrades is described in How Resource Collection Avoids Blocking the Server.

Settings

Configure under Settings -> Settings Editor -> Resource Monitor.

Setting Default Effect
showMemory true Show the memory item in the status bar
showCpu true Show the CPU item in the status bar
showMemoryPercent false Append the used-of-limit percentage to the memory item
cpuMode normalised normalised shares all cores (0-100%), aggregate sums each core's own 100%, bar draws a filled bar
showKernelUsage true Show the kernel usage sidebar panel

Hovering either status bar item shows the full detail regardless of these settings, including the memory percentage and the CPU core count.

Requirements

  • JupyterLab >= 4.0.0
  • Linux host - the sampler reads cgroup v2 and /proc; on macOS and Windows no reading is available, so the status bar items stay hidden and the kernel panel reports Measuring...

Install

To install the extension, execute:

pip install jupyterlab_resource_monitor_extension

Uninstall

To remove the extension, execute:

pip uninstall jupyterlab_resource_monitor_extension

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_resource_monitor_extension-1.0.25.tar.gz (313.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file jupyterlab_resource_monitor_extension-1.0.25.tar.gz.

File metadata

File hashes

Hashes for jupyterlab_resource_monitor_extension-1.0.25.tar.gz
Algorithm Hash digest
SHA256 bc9921137d1e285eec5ab67029e6c63f7667aed6eef9c50bf6ac7d1a1b037043
MD5 186c59e23fa18b2dcbceab60aa5dc1e8
BLAKE2b-256 dc0946ae3255f765f824c8f6856768a16edc495e99cb71758e91c6bd804f9c39

See more details on using hashes here.

File details

Details for the file jupyterlab_resource_monitor_extension-1.0.25-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlab_resource_monitor_extension-1.0.25-py3-none-any.whl
Algorithm Hash digest
SHA256 41f0168ce7db32d6e1e708aa0234b19d00d01e89b4b4636f18b73fdbb6085981
MD5 55126620af8499bfb8d6909f99acd948
BLAKE2b-256 e385574e0367e35375c6c64296949c68aad6eb9f00f4e9e20514beed292bd19b

See more details on using hashes here.

Supported by

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