jupyterlab-system-monitor icon indicating copy to clipboard operation
jupyterlab-system-monitor copied to clipboard

memory and CPU not showing in Jupyter Lab 3.0

Open yosit opened this issue 3 years ago • 14 comments

The bar does show on the top. I'm installing this with pip:

jupyterlab-topbar
jupyterlab-system-monitor

Running this in the docker file:

    jupyter labextension install jupyterlab-topbar-extension 
                             jupyterlab-system-monitor 
                             jupyterlab-topbar-text 
                             jupyterlab-theme-toggle

Launching it with this:

jupyter lab \
  --NotebookApp.ResourceUseDisplay.mem_limit=$(( 16 *1024*1024*1024 )) \
  --NotebookApp.ResourceUseDisplay.track_cpu_percent=True \
  --NotebookApp.ResourceUseDisplay.cpu_limit=$(( 16 )) \
  --NotebookApp.allow_origin='*' \
  --NotebookApp.base_url=/ \
  --NotebookApp.log_format='%(message)s' \
  --NotebookApp.log_level='INFO' \
  --NotebookApp.password='' \
  --NotebookApp.token='' \
  --ip=0.0.0.0 \
  --no-browser \
  "--notebook-dir=$HOME" \
  --port=8888

The toolbar shows with the "Hello" and theme switch but not the memory and CPU.

yosit avatar Feb 24 '21 16:02 yosit

Thanks @yosit for reporting.

Have you tried installing the extension with pip?

pip install jupyterlab-system-monitor

Instead of jupyter labextension install.

jtpio avatar Feb 24 '21 20:02 jtpio

Same here. I installed jupyterlab-system-monitor with pip. The top bar not showing metrics, and the terminal keeps returning those error

image

ladychili avatar Mar 01 '21 09:03 ladychili

@jtpio from the instructions I understood I need to do both pip install and jupyter labextension install

I see similar logs like @ladychili

yosit avatar Mar 01 '21 18:03 yosit

I'm also getting the same logs. I have only run pip install jupyterlab-system-monitor to install. Here's the versions I am currently running:

# pip freeze | grep jupyterlab
jupyterlab==3.0.9
jupyterlab-pygments==0.1.2
jupyterlab-server==2.3.0
jupyterlab-system-monitor==0.8.0
jupyterlab-topbar==0.6.1

Any idea where the endpoint /api/metrics/ went?

iicky avatar Mar 11 '21 04:03 iicky

from the instructions I understood I need to do both pip install and jupyter labextension install

@yosit with JupyterLab 3.0 the single pip install should be enough,

Any idea where the endpoint /api/metrics/ went?

This endpoint is exposed by jupyter-resource-usage: https://github.com/jupyter-server/jupyter-resource-usage, which should now be part of the dependencies:

https://github.com/jtpio/jupyterlab-system-monitor/blob/a05a27d4d5be23259a14272f455b621d705b7d89/setup.py#L71

jtpio avatar Mar 12 '21 14:03 jtpio

@jtpio thanks. It now shows the memory - only the label and the memory consumed (without the total like in the readme) and without the spike chart. It's not showing the CPU.

this is from the log:

[I 2021-03-12 08:36:42.154 ServerApp] jupyter_resource_usage | extension was successfully linked.
[W 2021-03-12 08:36:42.159 ServerApp] Trait, ResourceUseDisplay, not found.
[I 2021-03-12 08:36:42.381 ServerApp] nbclassic | extension was successfully linked.
[I 2021-03-12 08:36:42.396 ServerApp] jupyter_resource_usage | extension was successfully loaded.
[I 2021-03-12 08:36:42.397 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.6/dist-packages/jupyterlab

yosit avatar Mar 12 '21 16:03 yosit

Edit: Never mind. Leaving for posterity. It's because I'm running in k8s.

I'm having this same issue. It looks like the metrics api is only returning memory. Any idea why that would be happening?

{"rss": 275681280, "limits": {"memory": {"rss": 0}}}

jabbera avatar Apr 24 '21 03:04 jabbera

I am having the same issue on jupyterlab 3.0.

jupyterlab @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_1616195786210/work
jupyterlab-drawio==0.8.0
jupyterlab-git==0.30.1
jupyterlab-nvdashboard==0.6.0
jupyterlab-pygments @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_pygments_1601375948261/work
jupyterlab-server @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_server_1617134349851/work
jupyterlab-system-monitor==0.8.0
jupyterlab-topbar==0.6.1
jupyterlab-widgets @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_widgets_1609173350931/work

Here's what it shows on the top bar:

Schermata 2021-06-01 alle 12 54 01

shoegazerstella avatar Jun 01 '21 10:06 shoegazerstella

Linking to https://github.com/jupyter-server/jupyter-resource-usage/issues/91 and https://github.com/jupyter-server/jupyter-resource-usage/issues/86 which sound similar.

jtpio avatar Jun 02 '21 06:06 jtpio

@jabbera @jtpio I am using k8s and seeing the issue w.r.t CPU not showing. Memory stats works fine

paravatha avatar Jul 16 '21 04:07 paravatha

I also have the same problem. CPU not showing, only memory is showing.

tlvu avatar Jul 27 '21 20:07 tlvu

I've got the same error. The mem use number shows... but no bars. I'm running jupyterlab=3.3.0 and pip installing jupyterlab-system-monitor. Any progress?

scottwsides avatar Mar 21 '22 16:03 scottwsides

I had to set the limits for the bars to show. https://github.com/jtpio/jupyterlab-system-monitor#graphic-display

EnyMan avatar Mar 30 '22 10:03 EnyMan

I set the limits in the startup for jupyterlab... but still no luck. Mem usage shows but no bars

scottwsides avatar Mar 30 '22 20:03 scottwsides

Closing as jupyterlab-system-monitor has now been integrated in jupyter-resource-usage: https://github.com/jupyter-server/jupyter-resource-usage/issues/191

Feel free to open a new issue on the jupyter-resource-usage repo if needed: https://github.com/jupyter-server/jupyter-resource-usage

Thanks!

jtpio avatar Jul 28 '23 14:07 jtpio