jtpio / jupyterlab-system-monitor

JupyterLab extension to display system metrics
BSD 3-Clause "New" or "Revised" License
299 stars 30 forks source link

RAM or CPU show nothing #26

Closed sundh4 closed 4 years ago

sundh4 commented 4 years ago

Hello,

I've been trying this extensions but it seems nothing happened. I use Kubernetes for deployment. Here my versions:

jupyter-client         5.3.4              
jupyter-console        6.1.0              
jupyter-core           4.6.3              
jupyter-rsession-proxy 1.1                
jupyter-server-proxy   1.3.2              
jupyterhub             1.0.0              
jupyterlab             1.2.13             
jupyterlab-server      1.1.1              
nbresuse               0.3.4              
notebook               6.0.2              
prometheus-client      0.7.1              
psutil                 5.7.0

Some of error logs shown:

[E 2020-04-30 06:15:22.373 SingleUserLabApp ioloop:763] Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f896ed2f668>>, <Future finished exception=AttributeError("can't set attribute",)>)
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.6/site-packages/tornado/ioloop.py", line 743, in _run_callback
        ret = callback()
      File "/opt/conda/lib/python3.6/site-packages/tornado/ioloop.py", line 767, in _discard_future_result
        future.result()
      File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 191, in wrapper
        result = func(*args, **kwargs)
      File "/opt/conda/lib/python3.6/site-packages/nbresuse/prometheus.py", line 34, in __call__
        metrics = self.apply_memory_limits(memory_metrics())
      File "/opt/conda/lib/python3.6/site-packages/nbresuse/prometheus.py", line 49, in apply_memory_limits
        metrics.max_memory = self.config.mem_limit
    AttributeError: can't set attribute

Here the configurations that i use to spawn the notebook:

c.KubeSpawner.args = ['--disable-user-config', '--no-browser', '--allow-root',
    '--config=/etc/jupyter/jupyter_notebook_config.py',
    '--ResourceUseDisplay.track_cpu_percent=True']

Appreciate for helping. Thank you.

jtpio commented 4 years ago

Thanks @sundh4 for opening the issue.

Would it be possible to try with nbresuse==0.3.3?

sundh4 commented 4 years ago

Thanks @sundh4 for opening the issue.

Would it be possible to try with nbresuse==0.3.3?

Hi @jtpio I've tried nbresuse 0.3.3 its only work fine for RAM usage, but CPU stats won't come up. I used those configs but still CPU doesn't work at all. Any idea?

jtpio commented 4 years ago

I've tried nbresuse 0.3.3 its only work fine for RAM usage

The issue with 0.3.4 is tracked in https://github.com/yuvipanda/nbresuse/issues/36.

Which version of jupyterlab-system-monitor are you using? The latest with the CPU indicator is 0.6.0.

sundh4 commented 4 years ago

I've tried nbresuse 0.3.3 its only work fine for RAM usage

The issue with 0.3.4 is tracked in yuvipanda/nbresuse#36.

Which version of jupyterlab-system-monitor are you using? The latest with the CPU indicator is 0.6.0.

Hi @jtpio Here my extensions version:

JupyterLab v1.2.13
Known labextensions:
   app dir: /opt/conda/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v1.1.0  enabled  OK
        @jupyterlab/server-proxy v2.0.1  enabled  OK
        @lckr/jupyterlab_variableinspector v0.4.0  enabled  OK
        jupyterlab-plotly v4.6.0  enabled  OK
        jupyterlab-system-monitor v0.4.1  enabled  OK
        jupyterlab-topbar-extension v0.4.0  enabled  OK
        plotlywidget v4.6.0  enabled  OK

I tried upgrade jupyterlab-system-monitor to v0.6.0 but i got error msg version not compatible like below:

"jupyterlab-system-monitor@0.6.0" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab              Extension      Package
>=1.2.6 <1.3.0          >=2.0.0 <3.0.0 @jupyterlab/application

So, this mean the extensions only work for Jupyterlab version 2.x.x right?

jtpio commented 4 years ago

So, this mean the extensions only work for Jupyterlab version 2.x.x right?

Yes, version 0.5.0 and above only support JupyterLab 2.0.

The CPU indicator was added after the update to 2.0 and will not be backported to 1.x. Most of the extensions in the list above should now be compatible with the latest JupyterLab. Is it possible to upgrade to JupyterLab 2.x on your setup?

sundh4 commented 4 years ago

So, this mean the extensions only work for Jupyterlab version 2.x.x right?

Yes, version 0.5.0 and above only support JupyterLab 2.0.

The CPU indicator was added after the update to 2.0 and will not be backported to 1.x. Most of the extensions in the list above should now be compatible with the latest JupyterLab. Is it possible to upgrade to JupyterLab 2.x on your setup?

Thanks @jtpio

I see, will try upgrade my setup with version 2.xx. I will update the result here.

sundh4 commented 4 years ago

Hi @jtpio

You are right, after upgrading Jupyterlab with version 2.1.1 and use nbresuse==0.3.3 now RAM and CPU usage are shown.

Thanks

jtpio commented 4 years ago

Nice, thanks @sundh4!

Closing as answered. Feel free to comment here or on https://github.com/yuvipanda/nbresuse/issues/36 if you have more questions.