Skip to content

track last activity of kernels #1241

@minrk

Description

@minrk

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions