Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

memory and CPU not showing in Jupyter Lab 3.0 #56

Closed
yosit opened this issue Feb 24, 2021 · 15 comments
Closed

memory and CPU not showing in Jupyter Lab 3.0 #56

yosit opened this issue Feb 24, 2021 · 15 comments

Comments

@yosit
Copy link

yosit commented Feb 24, 2021

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.

@jtpio
Copy link
Owner

jtpio commented Feb 24, 2021

Thanks @yosit for reporting.

Have you tried installing the extension with pip?

pip install jupyterlab-system-monitor

Instead of jupyter labextension install.

@ladychili
Copy link

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

image

@yosit
Copy link
Author

yosit commented Mar 1, 2021

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

I see similar logs like @ladychili

@iicky
Copy link

iicky commented Mar 11, 2021

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?

@jtpio
Copy link
Owner

jtpio commented Mar 12, 2021

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:

"jupyter-resource-usage~=0.5"

@yosit
Copy link
Author

yosit commented Mar 12, 2021

@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

@jabbera
Copy link

jabbera commented Apr 24, 2021

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}}}

@shoegazerstella
Copy link

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

@jtpio
Copy link
Owner

jtpio commented Jun 2, 2021

@paravatha
Copy link

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

@tlvu
Copy link

tlvu commented Jul 27, 2021

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

@scottwsides
Copy link

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?

@EnyMan
Copy link

EnyMan commented Mar 30, 2022

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

@scottwsides
Copy link

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

@jtpio
Copy link
Owner

jtpio commented Jul 28, 2023

Closing as jupyterlab-system-monitor has now been integrated in jupyter-resource-usage: jupyter-server/jupyter-resource-usage#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 jtpio closed this as completed Jul 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants