pinokiod 1.1.18 → 1.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/kernel/index.js CHANGED
@@ -232,6 +232,14 @@ class Kernel {
232
232
  let sysinfo = new Sysinfo()
233
233
  await sysinfo.init()
234
234
  let info = sysinfo.info
235
+ await fs.promises.mkdir(this.path("logs"), { recursive: true }).catch((e) => { })
236
+ await fs.promises.writeFile(this.path("logs/system.json"), JSON.stringify({
237
+ platform: this.platform,
238
+ arch: this.arch,
239
+ home: this.homedir,
240
+ ...info
241
+ }, null, 2))
242
+ this.sysinfo = info
235
243
 
236
244
  await this.template.init({
237
245
  kernel: this,
@@ -247,6 +255,7 @@ class Kernel {
247
255
  await sysinfo.refresh()
248
256
  let info = sysinfo.info
249
257
  this.template.update(info)
258
+ this.sysinfo = info
250
259
  }, 10000) // update every 10 seconds
251
260
 
252
261
  // await this.template.init()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "1.1.18",
3
+ "version": "1.1.20",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -2006,7 +2006,8 @@ class Server {
2006
2006
  procs: this.kernel.procs,
2007
2007
  gpu: this.kernel.gpu,
2008
2008
  gpus: this.kernel.gpus,
2009
- version: this.version
2009
+ version: this.version,
2010
+ ...this.kernel.sysinfo
2010
2011
  }
2011
2012
  console.log("# info", info)
2012
2013