Acorbe
Acorbe

Reputation: 8391

List running instances of jupyter lab

Jupyter notebook comes with the useful command:

jupyter notebook list

which outputs all the running server instances for the current user. Besides it lists the relevant access tokens.

Jupyter lab seems not to have this feature.

Cruising through the jupyter lab manual I could not find the analogous command (not the analogous syntax seems to work).

Any suggestion on how to get ports and tokens for the running servers?

Upvotes: 21

Views: 20419

Answers (3)

Pierz
Pierz

Reputation: 8168

One can now use the list command with Jupyter lab to show running servers:

jupyter lab list

If you want to list the associated sessions for that server there doesn't appear to be built-in command but (as mentioned here) you can run this to a get prettified (with jq) JSON list using the Jupyter REST API - assuming your server runs at localhost:8888 and :

curl -sSLG localhost:8888/api/sessions --data-urlencode `jupyter lab list | awk '/token/ {split($1,a,"?")} END {print a[2]}'`  | jq

Upvotes: 2

abdallahrrrr
abdallahrrrr

Reputation: 236

If you are using JupyterLab 3.0+, the command you're looking for is:

jupyter server list

Upvotes: 22

Yilun Zhang
Yilun Zhang

Reputation: 9018

It seems like you can still call jupyter notebook list within any terminal to list all the running notebook instances, including those within jupyter lab.

Upvotes: 11

Related Questions