add cpu model
This commit is contained in:
parent
c22caed446
commit
11430adfaa
@ -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)
|
||||||
|
@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user