is there an API to find out how many kernels are running ?

43 views
Skip to first unread message

Thierry Parmentelat

unread,
Apr 4, 2017, 8:24:08 AM4/4/17
to Project Jupyter
that's about it: I run a jupyterhub-like service, and would like to monitor the total number of open notebooks, so I'd need to figure how many kernels are running {within the scope of | spawned by} a given jupyter instance, if I have the wording right..

MinRK

unread,
Apr 4, 2017, 9:11:41 AM4/4/17
to Project Jupyter
The Hub doesn't track this information, but each notebook server does. To get it all, you would have to submit requests to each running notebook server and aggregate this information. It will only be accessible if `admin-access` is enabled, which will be easier with some auth changes upcoming in JupyterHub 0.8.

-Min

On Tue, Apr 4, 2017 at 2:24 PM, Thierry Parmentelat <thierry.p...@gmail.com> wrote:
that's about it: I run a jupyterhub-like service, and would like to monitor the total number of open notebooks, so I'd need to figure how many kernels are running {within the scope of | spawned by} a given jupyter instance, if I have the wording right..

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/1316061b-6352-4209-a0f4-375506c39474%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thierry Parmentelat

unread,
Apr 4, 2017, 9:18:33 AM4/4/17
to jup...@googlegroups.com
Hi Min

Thanks for the tip

it was probably misleading that I mentioned jupyterhub, as I only wanted to give a sense of what we’re doing
so, to clarify, our deployment is jupyterhub-free, it’s our application that spawns and manages all the jupyter (container) instances, and I could easily probe each of them
it’s just that I don’t know the api call that I need to issue in order to get that info
is ‘admin-access’ a setting that applies to jupyterhub or to jupyter ?



> On 04 Apr 2017, at 15:11, MinRK <benja...@gmail.com> wrote:
>
> The Hub doesn't track this information, but each notebook server does. To get it all, you would have to submit requests to each running notebook server and aggregate this information. It will only be accessible if `admin-access` is enabled, which will be easier with some auth changes upcoming in JupyterHub 0.8.
>
> -Min
>
> On Tue, Apr 4, 2017 at 2:24 PM, Thierry Parmentelat <thierry.p...@gmail.com> wrote:
> that's about it: I run a jupyterhub-like service, and would like to monitor the total number of open notebooks, so I'd need to figure how many kernels are running {within the scope of | spawned by} a given jupyter instance, if I have the wording right..
>
>
> --
> You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/1316061b-6352-4209-a0f4-375506c39474%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "Project Jupyter" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter/STAD-zLT9eM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAHNn8BXVasPyM2L46U7fofnxBOkaBsN9oPGJbeCdJxsyhFwRJQ%40mail.gmail.com.

Thomas Kluyver

unread,
Apr 4, 2017, 9:34:38 AM4/4/17
to Project Jupyter
On 4 April 2017 at 14:18, Thierry Parmentelat <thierry.p...@gmail.com> wrote:
it was probably misleading that I mentioned jupyterhub, as I only wanted to give a sense of what we’re doing
so, to clarify, our deployment is jupyterhub-free, it’s our application that spawns and manages all the jupyter (container) instances, and I could easily probe each of them
it’s just that I don’t know the api call that I need to issue in order to get that info

If you have the IP address of the notebook server and the security token, you can find the kernels it has started by making an HTTP GET request to /api/kernels

If you don't have the token already, the Python function notebook.notebookapp.list_running_servers() should give you all the information you need.
 
is ‘admin-access’ a setting that applies to jupyterhub or to jupyter ?

Admin access is a Jupyterhub thing. Access to a single Jupyter notebook server is all or nothing.

Thomas

Thierry Parmentelat

unread,
Apr 4, 2017, 10:04:21 AM4/4/17
to jup...@googlegroups.com
thank you so much !
> --
> You received this message because you are subscribed to a topic in the Google Groups "Project Jupyter" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter/STAD-zLT9eM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAOvn4qjzRFbTrvZR25yQEsNe3WZi01SqSHEuNZBurwYFVh_Q2g%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages