-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
Milestone
Description
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
dhirschfeld and rahulpshah