12
12
[ ![ PyPI] ( https://img.shields.io/pypi/l/jupyter-resource-usage )] ( https://pypi.python.org/pypi/jupyter-resource-usage )
13
13
[ ![ GitHub] ( https://img.shields.io/badge/issue_tracking-github-blue?logo=github )] ( https://github.com/jupyter-server/jupyter-resource-usage/issues )
14
14
15
- ![ Screenshot with memory limit] ( screenshot .png)
15
+ ![ Screenshot with memory limit] ( ./doc/statusbar .png)
16
16
17
17
Jupyter Resource Usage is an extension for Jupyter Notebooks and JupyterLab that
18
18
displays an indication of how much resources your current notebook server and
19
19
its 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.
21
21
22
22
Kernel resource usage can be displayed in a sidebar for IPython kernels with
23
23
[ ipykernel] ( https://github.com/ipython/ipykernel ) >= 6.11.0.
24
24
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
+
25
44
## Installation
26
45
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.
28
49
29
50
``` bash
30
51
pip install jupyter-resource-usage
@@ -36,6 +57,20 @@ Or with `conda`:
36
57
conda install -c conda-forge jupyter-resource-usage
37
58
```
38
59
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
+
39
74
** If your notebook version is < 5.3** , you need to enable the extension manually.
40
75
41
76
```
@@ -60,7 +95,7 @@ The limit needs to be set as an integer in Bytes.
60
95
61
96
### Memory usage warning threshold
62
97
63
- ![ Screenshot with memory warning] ( warn-screenshot .png)
98
+ ![ Screenshot with memory warning] ( ./doc/statusbar-warn .png)
64
99
65
100
The background of the resource display can be changed to red when the user is near a memory limit.
66
101
The threshold for this warning can be configured as a fraction of the memory limit.
@@ -94,6 +129,11 @@ As a command line argument:
94
129
jupyter notebook --ResourceUseDisplay.track_cpu_percent=True
95
130
```
96
131
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
+
97
137
### Disable Prometheus Metrics
98
138
99
139
There 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
103
143
--ResourceUseDisplay.enable_prometheus_metrics=False
104
144
```
105
145
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
+
106
160
## Resources Displayed
107
161
108
162
Currently the server extension only reports memory usage and CPU usage. Other metrics will be added in the future as needed.
0 commit comments