jtpio/jupyterlab-system-monitor

Show cpu limit

jtpio opened this issue · 9 comments

jtpio commented

The number of available cpus could be shown to the user as in a tooltip, or next to the percent value.

i put the number of CPUs in the config, but the CPU display still shows 100% if only one of my cores goes to 100, is that as designed?

jtpio commented

The number of CPUs is not taken into account at the moment and is not displayed in the UI.

The value comes from nbresuse which uses psutil to retrieve the metrics:

So yes the value can be greater than 100% but in that case it will be capped.

Hello,

Which spawner does the toolbar support to display cpu metricts. We currently tried using this extension using a classical single user spawner but the cpu consumption is not shown and the memory does not look the same as the screenshot in the the readme :

image

we are using latest jupyterlab Version 2.1.1 in our tests.

Thanks !

jtpio commented

Most of the spawners should be supported, since the configuration is on the user notebook server.

For the CPU usage, is track_cpu_percent enabled? https://github.com/jtpio/jupyterlab-system-monitor#graphic-display

Most of the spawners should be supported, since the configuration is on the user notebook server.

For the CPU usage, is track_cpu_percent enabled? https://github.com/jtpio/jupyterlab-system-monitor#graphic-display

hello, yes,

We are running latest Version 2.1.1 Jupyterlab

c.Spawner.cmd = ['jupyterhub-singleuser']
c.NotebookApp.ResourceUseDisplay.track_cpu_percent = True
c.NotebookApp.ResourceUseDisplay.cpu_limit = 2

It is enabled but it does not display any cpu metrics, just the ram.

thanks
Florin

jtpio commented

And with the following config?

c.Spawner.args = [
  "--ResourceUseDisplay.track_cpu_percent=True",
  "--ResourceUseDisplay.cpu_limit=2"
]

And with the following config?

c.Spawner.args = [
  "--ResourceUseDisplay.track_cpu_percent=True",
  "--ResourceUseDisplay.cpu_limit=2"
]

yes, this seems to have done the trick :D thank you !

jtpio commented

Great!

Maybe we could add some documentation about using this with JupyterHub in the README? Otherwise another candidate would be the nbresuse repo.

jtpio commented

Closing as this would have to be implemented in https://github.com/jupyter-server/jupyter-resource-usage.