Skip to content
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

track last activity of kernels #1241

Closed
minrk opened this issue Mar 22, 2016 · 5 comments
Closed

track last activity of kernels #1241

minrk opened this issue Mar 22, 2016 · 5 comments

Comments

@minrk
Copy link
Member

minrk commented Mar 22, 2016

It's proven useful in JupyterHub to track last activity on each notebook server and expose that on the API, so that external services can perform operations such as culling idle servers, etc. We could track similar information on a per-kernel basis in the single-user notebook.

Rough draft in my head:

  • subscribe a single activity monitor SUB socket to all kernels' IOPub channels
  • primitive version: update last_activity on each message, not bothering to deserialize
  • cleverer version: use busy/idle, so that a silent but busy kernel doesn't appear as idle
  • include last_activity timestamps in the models on the kernels (and thereby sessions) REST API
@minrk minrk added this to the 5.0 milestone Mar 22, 2016
@takluyver
Copy link
Member

I think that's a good idea.

Should the value in the model be a last_activity timestamp or an idle time? Thinking about the smarter version with busy/idle checking: if it's currently busy, idle time is zero, whereas calculating a 'now' timestamp is a bit more work and less immediately clear for someone inspecting the protocol.

@dsblank
Copy link
Member

dsblank commented Mar 22, 2016

Could this be used for educators looking at things like "Time on Task"?

What could be useful from logs would be information like:

  • each time that a particular cell was executed
  • idle time
  • time spent editing a particular cell (perhaps through indirect measures)

@ellisonbg
Copy link
Contributor

It think it is a good idea to have something like this. Not sure it is
worth the cost of deserializing all the messages thought to handle the
busy/idle stuff.

On Tue, Mar 22, 2016 at 8:22 AM, Doug Blank [email protected]
wrote:

Could this be used for educators looking at things like "Time on Task"?

What could be useful from logs would be information like:

  • each time that a particular cell was executed
  • idle time
  • time spent editing a particular cell (perhaps through indirect
    measures)


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1241 (comment)

Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
[email protected] and [email protected]

@minrk
Copy link
Member Author

minrk commented Mar 24, 2016

@dsblank this wouldn't be useful for something like that, because it has no awareness of the document. That would probably be better written as a javascript extension.

@minrk
Copy link
Member Author

minrk commented Jan 31, 2017

Forgot to close this in #1827

@minrk minrk closed this as completed Jan 31, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants