add cpu model

This commit is contained in:
Evert Prants 2019-03-01 22:00:53 +02:00
parent c22caed446
commit 11430adfaa
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
2 changed files with 7 additions and 1 deletions

View File

@ -104,6 +104,10 @@
e('h2', 'CPU') e('h2', 'CPU')
) + ) +
box('content', box('content',
box('row',
e('label', 'Model') +
e('span', data.cpu.model)
) +
box('row', box('row',
e('label', 'Num. cores') + e('label', 'Num. cores') +
e('span', data.cpu.count) e('span', data.cpu.count)

View File

@ -53,10 +53,12 @@ async function networkInfo () {
} }
async function cpuInfo () { async function cpuInfo () {
let cpus = os.cpus()
return { return {
model: cpus[0].model,
usage: await osu.cpu.usage(), usage: await osu.cpu.usage(),
loadAverage: os.loadavg(), loadAverage: os.loadavg(),
count: os.cpus().length, count: cpus.length,
processes: await osu.proc.totalProcesses() processes: await osu.proc.totalProcesses()
} }
} }