gitpush
This commit is contained in:
parent
4263bf1af8
commit
894119fd9b
@ -21,11 +21,11 @@ const server = http.createServer(function (request, response) {
|
||||
const result = {
|
||||
hostname,
|
||||
cpu: {
|
||||
temperature: Number((temp_string / 1000).toFixed(3)),
|
||||
temperature: temp_string / 1000,
|
||||
},
|
||||
memory: {
|
||||
total: Number((meminfo_total[1] / 1024).toFixed(2)),
|
||||
available: Number((meminfo_available[1] / 1024).toFixed(2))
|
||||
total: meminfo_total[1] / 1024,
|
||||
available: meminfo_available[1] / 1024,
|
||||
},
|
||||
}
|
||||
exec("cat /proc/stat |grep cpu |tail -1|awk '{print ($5*100)/($2+$3+$4+$5+$6+$7+$8+$9+$10)}'|awk '{print 100 - $1}'", (err, stdout, stderr) => {
|
||||
|
Loading…
Reference in New Issue
Block a user