Skip to content

Control page: implement the System resources section #234

Description

@yakutovicha

Implement SystemResourcesWidget to show three labeled progress bars — Memory, CPU load, Disk — colored green /
orange / red at <75% / <90% / ≥90% usage.

AiiDAlab runs in a container, so host-wide numbers are meaningless. Read cgroup v2 limits when present:

  • Memory: memory.current minus inactive_file (the docker stats convention) against memory.max; when unlimited, fall back to the host
    total via psutil with an explicit "no container limit, showing host total" note.
  • CPU: 1-minute load average against the effective CPU count from cpu.max (quota/period), falling back to os.cpu_count().
  • Disk: shutil.disk_usage of the home filesystem.

Each row degrades independently to an inline error message. A working reference can be found in #156.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions