feat: GPU-Name und CUDA-Version, Auswertung als Seite, Engines-Seite überarbeitet (#1087, #1088, #1091)
- #1087: nvidia-smi liefert den Produktnamen; CUDA-Kompatibilitätsversion aus dem Kopf von nvidia-smi. - #1088: Seite /ui/auswertung mit Zeitraum und Gruppierung; Ladevorgänge in lade_log (Migration 0006, Schema-Änderung, ältere Versionen öffnen die Datenbank danach nicht mehr). - #1091: Engines-Seite mit Hinweis zur Anmeldung der Engine-Oberfläche; Startkommando nur für Admins. Statuszeile fehlt (wartet auf #1086), Link zur Engine-Oberfläche fehlt noch. Geprüft: cargo fmt --check, clippy -D warnings, cargo test --workspace (258 bestanden). Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -643,6 +643,14 @@ impl Shared {
|
||||
let load_ms = started.elapsed().as_millis() as u64;
|
||||
self.metrics
|
||||
.record_load(&plan.model, &plan.engine_name, load_ms);
|
||||
if let Some(store) = self.store.get()
|
||||
&& let Err(e) = store
|
||||
.lock()
|
||||
.unwrap_or_else(|e| e.into_inner())
|
||||
.log_model_load(&plan.model)
|
||||
{
|
||||
tracing::error!(fehler = %e, "Ladevorgang konnte nicht gespeichert werden");
|
||||
}
|
||||
let usage = engine.measure(&handle).await;
|
||||
tracing::info!(
|
||||
ereignis = "instanz_bereit",
|
||||
@ -777,14 +785,31 @@ async fn read_gpus(nvidia_smi: &Path) -> Vec<crate::metrics::GpuSample> {
|
||||
Duration::from_secs(5),
|
||||
tokio::process::Command::new(nvidia_smi)
|
||||
.args([
|
||||
"--query-gpu=index,memory.used,memory.total,utilization.gpu,temperature.gpu",
|
||||
"--query-gpu=index,name,memory.used,memory.total,utilization.gpu,temperature.gpu",
|
||||
"--format=csv,noheader,nounits",
|
||||
])
|
||||
.output(),
|
||||
)
|
||||
.await;
|
||||
match output {
|
||||
Ok(Ok(out)) if out.status.success() => parse_gpus(&String::from_utf8_lossy(&out.stdout)),
|
||||
Ok(Ok(out)) if out.status.success() => {
|
||||
let mut gpus = parse_gpus(&String::from_utf8_lossy(&out.stdout));
|
||||
let header = tokio::time::timeout(
|
||||
Duration::from_secs(5),
|
||||
tokio::process::Command::new(nvidia_smi).output(),
|
||||
)
|
||||
.await;
|
||||
let cuda = match header {
|
||||
Ok(Ok(out)) if out.status.success() => {
|
||||
crate::metrics::parse_cuda_version(&String::from_utf8_lossy(&out.stdout))
|
||||
}
|
||||
_ => None,
|
||||
};
|
||||
for gpu in &mut gpus {
|
||||
gpu.cuda_version = cuda.clone();
|
||||
}
|
||||
gpus
|
||||
}
|
||||
_ => Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user