aiidalab / aiidalab/aiidalab-home

Control page: implement the System resources section

Offen
#234 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
5
Forks
9
Ø Merge
18 Min.
Gemergte PRs (30 T.)
1

Beschreibung

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 https://github.com/aiidalab/aiidalab-home/pull/156.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.