New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking by command line if Jupyter server is running #1950

Open
arita37 opened this Issue Dec 6, 2016 · 7 comments

Comments

Projects
None yet
6 participants
@arita37

arita37 commented Dec 6, 2016

Sometimes we launched Jupyter and we crash it.
It would be good to have a command line to list of Jupyter kernel running like :
jupyter listall

It can be checked by checking the name 'jupyter' in the process list and terminate it by :
jupyter terminate id / all

@takluyver

This comment has been minimized.

Member

takluyver commented Dec 8, 2016

nbmanager is similar to what you want. It provides a GUI rather than a command line interface, but the module nbmanager.api is general purpose and could be reused to make command line UI.

@arita37

This comment has been minimized.

arita37 commented Dec 29, 2016

sometimes, we manage Jupyter through SSH on remote server..... no GUI

@minrk

This comment has been minimized.

Member

minrk commented Jan 3, 2017

There is a jupyter notebook list command for listing running notebooks. There isn't a corresponding terminate, though.

@MichaelChirico

This comment has been minimized.

Contributor

MichaelChirico commented Jul 27, 2017

@arita37 Taken from here:

https://stackoverflow.com/a/32745046/3576984

For an SSH'd terminal, we can just run:

kill $(pgrep jupyter)

To kill terminals that we can't CTRL+C.

@takluyver

This comment has been minimized.

Member

takluyver commented Jul 28, 2017

There is also now a jupyter notebook stop command that takes a port number and shuts down the corresponding notebook server.

From 5.1, you will also be able to shut a server down if you have HTTP access to it by making a POST request to /api/shutdown.

@jjpr-mit

This comment has been minimized.

jjpr-mit commented Aug 23, 2017

@takluyver Is jupyter notebook stop available in 5.0.0? I get a No such file or directory error:

$ jupyter notebook --version
5.0.0
$ jupyter notebook stop 8888
[C 10:02:38.220 NotebookApp] No such file or directory: /Users/jjpr/stop
@takluyver

This comment has been minimized.

Member

takluyver commented Aug 23, 2017

Oops, sorry. It's new in 5.1, added by #2388.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment