1212[ ![ PyPI] ( https://img.shields.io/pypi/l/jupyter-resource-usage )] ( https://pypi.python.org/pypi/jupyter-resource-usage )
1313[ ![ GitHub] ( https://img.shields.io/badge/issue_tracking-github-blue?logo=github )] ( https://github.com/jupyter-server/jupyter-resource-usage/issues )
1414
15- ![ Screenshot with memory limit] ( screenshot .png)
15+ ![ Screenshot with memory limit] ( ./doc/statusbar .png)
1616
1717Jupyter Resource Usage is an extension for Jupyter Notebooks and JupyterLab that
1818displays an indication of how much resources your current notebook server and
1919its children (kernels, terminals, etc) are using. This is displayed in the
20- main toolbar in the notebook itself , refreshing every 5s.
20+ status bar in the JupyterLab and notebook , refreshing every 5s.
2121
2222Kernel resource usage can be displayed in a sidebar for IPython kernels with
2323[ ipykernel] ( https://github.com/ipython/ipykernel ) >= 6.11.0.
2424
25+ ![ Screenshot for kernel usage] ( ./doc/kernel-usage.png )
26+
27+ The kernel usage is available for Notebook 7.x too which can be enabled at
28+ ` View -> Right Sidebar -> Show Kernel Usage ` . In the case of JupyterLab interface, it is
29+ enough to click ` tachometer ` icon on the right sidebar.
30+
31+ The package provides an alternative frontend for the ` jupyter-resource-usage ` metrics:
32+
33+ ![ screencast] ( ./doc/topbar.gif )
34+
35+ Previously, this extension used to be distributed with
36+ [ jupyterlab-system-monitor] ( https://github.com/jtpio/jupyterlab-system-monitor ) package.
37+ Starting from ` 1.0.0 ` , the alternative frontend has been integrated into the
38+ current repository. Check [ Alternative frontend] ( #enable-alternative-frontend ) section
39+ on how to enable and configure this alternative frontend.
40+
41+ ** Note** that for JupyterLab 3.x and 2.x, users should install the alternative frontend
42+ from [ jupyterlab-system-monitor] ( https://github.com/jtpio/jupyterlab-system-monitor ) .
43+
2544## Installation
2645
27- You can currently install this package from PyPI.
46+ ### JupyterLab 4.x and Notebook 7.x
47+
48+ You should install the latest version ` >=1.0.0 ` for JupyterLab 4 compatability.
2849
2950``` bash
3051pip install jupyter-resource-usage
@@ -36,6 +57,20 @@ Or with `conda`:
3657conda install -c conda-forge jupyter-resource-usage
3758```
3859
60+ ### JupyterLab 3.x and Notebook 6.x
61+
62+ You should pin the versions to ` <1.0.0 `
63+
64+ ``` bash
65+ pip install ' jupyter-resource-usage<1.0.0'
66+ ```
67+
68+ Or with ` conda ` :
69+
70+ ``` bash
71+ conda install -c conda-forge ' jupyter-resource-usage<1.0.0'
72+ ```
73+
3974** If your notebook version is < 5.3** , you need to enable the extension manually.
4075
4176```
@@ -60,7 +95,7 @@ The limit needs to be set as an integer in Bytes.
6095
6196### Memory usage warning threshold
6297
63- ![ Screenshot with memory warning] ( warn-screenshot .png)
98+ ![ Screenshot with memory warning] ( ./doc/statusbar-warn .png)
6499
65100The background of the resource display can be changed to red when the user is near a memory limit.
66101The threshold for this warning can be configured as a fraction of the memory limit.
@@ -94,6 +129,11 @@ As a command line argument:
94129jupyter notebook --ResourceUseDisplay.track_cpu_percent=True
95130```
96131
132+ When ` track_cpu_percent ` is set to ` True ` , status will report CPU utilisation along with
133+ memory:
134+
135+ ![ Screenshot with CPU and memory] ( ./doc/statusbar-cpu.png )
136+
97137### Disable Prometheus Metrics
98138
99139There is a [ known bug] ( https://github.com/jupyter-server/jupyter-resource-usage/issues/123 ) with Prometheus metrics which
@@ -103,6 +143,20 @@ causes "lag"/pauses in the UI. To workaround this you can disable Prometheus met
103143--ResourceUseDisplay.enable_prometheus_metrics=False
104144```
105145
146+ ## Enable alternative frontend
147+
148+ By default, the alternative frontend is disabled. To enable it, users should go to
149+ ` Settings -> Settings Editor -> Resource Usage Indicator ` which will render following
150+ form
151+
152+ ![ jupyterlab_setting] ( ./doc/settings.png )
153+
154+ By checking "Enable resource usage indicators" and refreshing the browser tab will
155+ render the alternative frontend in the topbar.
156+
157+ Users can change the label and refresh rate for the alternative frontend using settings
158+ editor.
159+
106160## Resources Displayed
107161
108162Currently the server extension only reports memory usage and CPU usage. Other metrics will be added in the future as needed.
0 commit comments