Compare commits

...

2 Commits

Author SHA1 Message Date
6fc9347d2f feat: Lese-Skript für M0-Assessment von srv04
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 16:16:56 +01:00
04d7f6eeec docs: MIT-Lizenz und Remote eintragen
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 16:14:50 +01:00
4 changed files with 184 additions and 4 deletions

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 wlkns-dev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -20,7 +20,7 @@ Getestet auf: noch nicht getestet.
**Zugriff:** Vorgesehen ist ausschließlich das interne Netz oder Tailscale. Eine öffentliche Freigabe gehört nicht zum MVP.
**Disclaimer:** Das Projekt wird im Ist-Zustand und ohne jegliche Garantie bereitgestellt. Die Lizenz ist noch offen.
**Disclaimer:** Das Projekt wird im Ist-Zustand und ohne jegliche Garantie bereitgestellt. Siehe [LICENSE](LICENSE).
## How this was built
@ -44,4 +44,4 @@ Noch nicht vorhanden.
## License
Offen. Es ist noch keine Lizenz festgelegt (→ #1021 in `ROADMAP.md`).
Der eigene Code von Nexus ist lizenziert unter der [MIT-Lizenz](LICENSE), Copyright (c) 2026 wlkns-dev.

View File

@ -20,7 +20,7 @@ Zeichen: ✓ fertig · ◐ teilweise · ✗ offen · ? nicht geprüft.
| ID | Anforderung | Quelle | Stand | Anmerkung |
| --- | --- | --- | --- | --- |
| #1001 | M0 Assessment srv04: Hardware, Engines, Modelle, Startmechanismen, Betriebszustand | Projektauftrag §14 | ✗ | Noch nichts untersucht. |
| #1001 | M0 Assessment srv04: Hardware, Engines, Modelle, Startmechanismen, Betriebszustand | Projektauftrag §14 | ◐ | Lese-Skript `scripts/m0-assessment.sh` geschrieben, lokal nur trocken gelaufen (Syntax, Abschnitte). Auf srv04 noch nicht gelaufen, noch nichts untersucht. |
| #1002 | M1 Architektur und Spezifikation: Zielarchitektur, Adaptervertrag, Datenmodell, Scheduler-, Sicherheits-, Logging-Konzept, Teststrategie | Projektauftrag §14 | ✗ | Wartet auf M0. |
| #1003 | M2 Gateway-Kern: OpenAI-kompatible API, Model Registry, Engine-Adapter (Managed, External, Attached), API-Key-Authentifizierung, Lifecycle | Projektauftrag §3, §4, §7, §10 | ✗ | Nichts gebaut. |
| #1004 | M3 Scheduler und Queue: Ressourcenplanung (VRAM, RAM, CPU), Parallelbetrieb, persistente Jobs, Prioritäten HIGH, NORMAL, LOW, VIP-Verdrängung, Aging | Projektauftrag §5, §6 | ✗ | Nichts gebaut. |
@ -60,7 +60,7 @@ Zeichen: ✓ fertig · ◐ teilweise · ✗ offen · ? nicht geprüft.
- [#1018] Roadmap-Zuschnitt: `0.1.0` = M0 und M1, `0.2.0` = M2, `0.3.0` = M3, `0.4.0` = M4, `0.5.0` = M5, `1.0.0` = M6 (Abnahme). Entschieden am 09.11.2026: so übernommen. → #1010
- [#1019] Zugang für M0: Wie komme ich lesend auf srv04 (SSH, Benutzer, oder führst du Befehle selbst aus)? Läuft die Arbeit lokal auf srv04 oder auf einem anderen Rechner? → #1009
- [#1020] Sprache: Deutsch für Dokumentation und Weboberfläche, Englisch für Code-Bezeichner und Commit-Typen (Conventional Commits). Entschieden am 09.11.2026: so übernommen. → #1002
- [#1021] Lizenz und Ablageort (GitHub-Remote ja oder nein, Lizenz) für das Projekt. Solange offen, steht in der README „Lizenz offen“, und die Projekt-ID bleibt `offen`. → #1002
- [#1021] Lizenz und Ablageort. Entschieden am 09.11.2026: Lizenz MIT, Copyright wlkns-dev; Remote `origin` ist `ssh://git@git.wlkns.org:2222/wlkns-dev/nexus.git`, `release/0.1.0` ist gepusht. Die Projekt-ID bleibt `offen`, bis Agent und Register laufen. → #1002
## 6. Roadmap (Aufwand grob, ohne Kalenderdaten)
**0.1.0 – Assessment und Spezifikation.** Todo: #1009, #1010. Ziel: Bestandsbericht und freigegebene technische Spezifikation liegen vor, danach darf implementiert werden.

159
scripts/m0-assessment.sh Executable file
View File

@ -0,0 +1,159 @@
#!/usr/bin/env bash
# M0-Assessment für srv04 (Nexus, #1009): sammelt Bestandsdaten, nur lesend.
#
# Garantien: keine Installation, keine Änderung an Konfiguration oder Diensten,
# kein Neustart, kein sudo, kein Netzwerkzugriff nach außen. Es werden nur
# Dateien gelesen und Statusbefehle ausgeführt. Kein Dateiinhalt von
# Konfigurationen wird ausgegeben (nur Namen, Größen und ausgewählte Zeilen
# von systemd-Units); Prozess-Argumente werden von Schlüsseln bereinigt.
#
# Aufruf: bash m0-assessment.sh > m0-bericht-roh.txt
# Optional: SUCHPFADE="/srv /data" bash m0-assessment.sh
set -u
export LC_ALL=C
SUCHPFADE="${SUCHPFADE:-$HOME /opt /srv /mnt /data /models /usr/local}"
ENGINES='strata|llama|maya|comfy|ace-step|acestep|ollama|vllm'
abschnitt() { printf '\n===== %s =====\n' "$1"; }
lauf() { printf '$ %s\n' "$*"; timeout 20 "$@" 2>&1 || printf '(Exit %s)\n' "$?"; }
hat() { command -v "$1" >/dev/null 2>&1; }
bereinigen() {
sed -E 's/((api[-_]?key|token|secret|passw(or)?d|authorization)[= :]+)[^ ]+/\1<entfernt>/Ig'
}
abschnitt "Zeit und Benutzer"
date -Is; whoami; id
abschnitt "System"
lauf uname -a
[ -r /etc/os-release ] && grep -E '^(PRETTY_NAME|VERSION)=' /etc/os-release
lauf uptime
lauf hostnamectl
abschnitt "CPU"
lscpu 2>&1 | grep -E 'Model name|Socket|Core|Thread|CPU\(s\):|MHz|Flags' | sed -E 's/(Flags:).*(avx2|avx512[a-z_]*).*/\1 (gekürzt) .../' | head -n 12
abschnitt "RAM und Swap"
lauf free -h
grep -E 'MemTotal|SwapTotal|HugePages_Total' /proc/meminfo
abschnitt "Speicherplatz"
lauf df -hT -x tmpfs -x devtmpfs -x squashfs
hat lsblk && lauf lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,ROTA
abschnitt "GPU und Treiber"
if hat nvidia-smi; then
lauf nvidia-smi
lauf nvidia-smi --query-gpu=index,name,uuid,memory.total,memory.used,driver_version,pcie.link.gen.current,power.limit --format=csv
lauf nvidia-smi --query-compute-apps=pid,process_name,used_memory --format=csv
lauf nvidia-smi topo -m
else
echo "nvidia-smi nicht gefunden"
fi
hat nvcc && lauf nvcc --version
[ -r /proc/driver/nvidia/version ] && cat /proc/driver/nvidia/version
abschnitt "Kernel-Version und Container-Laufzeit"
hat docker && lauf docker --version
hat podman && lauf podman --version
hat nvidia-ctk && lauf nvidia-ctk --version
abschnitt "Werkzeuge und Laufzeiten"
for t in git make cmake gcc g++ rustc cargo python3 pip uv node npm sqlite3 curl jq tailscale; do
if hat "$t"; then printf '%s: ' "$t"; timeout 10 "$t" --version 2>&1 | head -n 1; else printf '%s: fehlt\n' "$t"; fi
done
abschnitt "Laufende Prozesse der Engines (Argumente bereinigt)"
ps -eo pid,user,etime,rss,args 2>/dev/null | grep -Ei "$ENGINES" | grep -v grep | bereinigen | cut -c1-400
abschnitt "Lauschende Ports"
hat ss && lauf ss -tulpn
abschnitt "systemd: Dienste, die nach Engines aussehen"
if hat systemctl; then
for scope in "--system" "--user"; do
echo "--- $scope ---"
systemctl $scope list-units --type=service --all --no-pager --no-legend 2>/dev/null | grep -Ei "$ENGINES|gpu|nvidia|gateway|inference|llm"
systemctl $scope list-unit-files --type=service --no-pager --no-legend 2>/dev/null | grep -Ei "$ENGINES|inference|llm"
done
echo "--- ausgewählte Zeilen der Unit-Dateien (ohne Environment) ---"
for scope in "--system" "--user"; do
for u in $(systemctl $scope list-unit-files --type=service --no-pager --no-legend 2>/dev/null | awk '{print $1}' | grep -Ei "$ENGINES|inference|llm"); do
echo "# $scope $u"
systemctl $scope cat "$u" 2>/dev/null | grep -E '^(ExecStart|ExecStop|WorkingDirectory|User|Restart|After|WantedBy)=' | bereinigen
done
done
echo "--- Timer ---"
systemctl --system list-timers --no-pager 2>/dev/null | head -n 15
fi
abschnitt "Engines: Fundorte (nur Namen, Tiefe 4)"
for p in $SUCHPFADE; do
[ -d "$p" ] || continue
timeout 25 find "$p" -maxdepth 4 \( -type d -o -type f -o -type l \) 2>/dev/null \
| grep -Ei "/($ENGINES)[^/]*$" | grep -Ev '/(\.cache|node_modules|\.git)/' | head -n 40
done
abschnitt "Engines: Versionen (soweit ohne Start ermittelbar)"
for b in llama-server llama-cli llama-bench ollama comfy; do
hat "$b" && { printf '%s -> %s\n' "$b" "$(command -v "$b")"; timeout 10 "$b" --version 2>&1 | head -n 3; }
done
for d in $SUCHPFADE; do
[ -d "$d" ] || continue
timeout 25 find "$d" -maxdepth 5 -type d \( -iname 'ComfyUI' -o -iname 'llama.cpp' -o -iname 'strata*' -o -iname 'maya*' \) 2>/dev/null \
| grep -Ev '/(\.cache|node_modules)/' | head -n 10 | while read -r dir; do
if [ -d "$dir/.git" ]; then
printf '%s: ' "$dir"
git -C "$dir" log -1 --format='%h %ad %s' --date=short 2>/dev/null
git -C "$dir" remote get-url origin 2>/dev/null | sed -E 's#//[^@/]*@#//<entfernt>@#'
fi
done
done
abschnitt "Startskripte und Makefiles in Engine-Ordnern (nur Namen)"
for d in $SUCHPFADE; do
[ -d "$d" ] || continue
timeout 25 find "$d" -maxdepth 5 -type f \( -name 'Makefile' -o -name 'start*.sh' -o -name 'run*.sh' -o -name 'serve*.sh' -o -name '*.service' -o -name 'docker-compose*.y*ml' \) 2>/dev/null \
| grep -Ei "$ENGINES" | grep -Ev '/(\.cache|node_modules|\.git)/' | head -n 40
done
abschnitt "Modelle: Dateien (Name, Größe), Tiefe 6"
for d in $SUCHPFADE; do
[ -d "$d" ] || continue
timeout 40 find "$d" -maxdepth 6 -type f \( -iname '*.gguf' -o -iname '*.safetensors' -o -iname '*.ckpt' -o -iname '*.pt' -o -iname '*.onnx' \) \
-not -path '*/node_modules/*' -printf '%s\t%p\n' 2>/dev/null | sort -rn | head -n 200 \
| awk -F'\t' '{printf "%8.2f GB %s\n", $1/1073741824, $2}'
done
abschnitt "ComfyUI: Workflows und Modellordner (nur Namen)"
for d in $SUCHPFADE; do
[ -d "$d" ] || continue
timeout 25 find "$d" -maxdepth 5 -type d -iname 'ComfyUI' 2>/dev/null | head -n 3 | while read -r c; do
echo "# $c"
ls -1 "$c/models" 2>/dev/null | head -n 30
ls -1 "$c/user/default/workflows" 2>/dev/null | head -n 50
ls -1 "$c/custom_nodes" 2>/dev/null | head -n 50
done
done
abschnitt "API-Fähigkeiten: lokale Healthchecks (nur GET auf localhost)"
if hat curl; then
for port in $(ss -tln 2>/dev/null | awk 'NR>1{n=split($4,a,":"); print a[n]}' | sort -un | head -n 40); do
for pfad in /health /v1/models /system_stats; do
code=$(curl -s -o /dev/null -m 3 -w '%{http_code}' "http://127.0.0.1:${port}${pfad}" 2>/dev/null)
[ "$code" = "200" ] && printf 'Port %s %s -> 200\n' "$port" "$pfad"
done
done
else
echo "curl fehlt"
fi
abschnitt "Logging und Betriebszustand"
hat journalctl && { lauf journalctl --disk-usage; journalctl -p err -b --no-pager -n 15 2>&1 | cut -c1-200; }
[ -d /var/log ] && ls -1 /var/log 2>/dev/null | grep -Ei "$ENGINES"
lauf systemctl --failed --no-pager
hat tailscale && lauf tailscale status
abschnitt "Ende"
date -Is