// P92-5:打印 /ops/api/state 全文,看重算任务状态(job/status/rc/progress) const GW = 'http://106.120.102.238:28084' const r = await fetch(GW + '/ops/api/state') const txt = await r.text() console.log('STATE ' + r.status + ' ' + txt.length + ' B') let j = null try { j = JSON.parse(txt) } catch { /* ignore */ } if (j) { console.log('TOP_KEYS ' + JSON.stringify(Object.keys(j))) for (const k of Object.keys(j)) { const v = JSON.stringify(j[k]) if (!/services/.test(k)) console.log(' ' + k + ' = ' + String(v).slice(0, 320)) } const s = j.services || {} console.log('SERVICES ' + JSON.stringify(Object.fromEntries(Object.entries(s).map(([k, v]) => [k, v.up ?? v])))) } else { console.log(txt.slice(0, 400)) }