波
币

波波喇币bobolabi

自建大模型 · 家庭机房 · 一杯茶的系统

─ 机 房 矩 阵 ─
实时负载 · 每 5 秒刷新 · 点击立方体翻转
加载中…

─ 模 型 与 计 费 ─
单价均为每百万 token · 点击模型 ID 可复制 · 每 60 秒刷新

加载中…

served by Cloudflare Tunnel · from home
等轴 3D 为轻量自绘 · 真 3D 机房视图:mon.bobolabi.com(Beszel)

" const $ = s => document.querySelector(s); const FLEET = document.getElementById('fleet'); const UPD = document.getElementById('updated'); let last = ''; function shortName(n){ return n.replace(/[·×]/g,' ').split(' ').slice(0,2).join(' '); } function statLine(m){ if(m.kind === 'vllm'){ if(!m.online) return '未响应'; const req = m.requests_running ?? 0; const cache = m.gpu_cache_pct; let cls = req > 0 ? (cache>0.7?'g-mid':'g-on') : 'g-on'; let lines = '在线 · ' + req + ' 请求中'; if(m.requests_waiting) lines += ' / ' + m.requests_waiting + ' 排队'; if(cache !== null) lines += '
显存水位 ' + (cache*100|0) + '%'; return {cls, html: lines}; } // 本地 Mac if(m.local){ } return {cls:'g-on', html:'在线'}; } function render(d){ if(!d || !d.machines) return; FLEET.innerHTML = d.machines.map(m=>{ const s = statLine(m); const cls = m.online===false ? 'g-off' : (s.cls||'g-on'); let stat = s.html; // 本地机附加 CPU/内存/磁盘 if(m.kind==='mlx' && d.local){ const l=d.local; const row = x=> x===null?'': '
'+' '+x+'%'; stat = ''+(m.online?'在线':'离线')+ (l.cpu!==null?'
CPU '+l.cpu+'%':'')+(l.mem_pct!==null?'
内存 '+l.mem_pct+'%':'')+ (l.disk_pct!==null?'
磁盘 '+l.disk_pct+'%':''); } return '
'+ '
'+m.name+'
'+stat+'
'; }).join(''); UPD.textContent = d.updated ? ('更新于 ' + new Date(d.updated*1000 + 8*3600000).toISOString().replace('T',' ').slice(0,19)) : ''; } async function poll(){ try{ const r = await fetch('/api/fleet',{cache:'no-store'}); const d = await r.json(); render(d); }catch(e){ console.warn('fleet poll', e); } } poll(); setInterval(poll, 5000);