How to use the systeminformation.osInfo function in systeminformation

To help you get started, we’ve selected a few systeminformation examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RocketChat / Rocket.Chat.Apps-cli / src / misc / cloudAuth.ts View on Github external
private async getEncryptionKey(): Promise {
        const s = await system();
        const c = await cpu();
        const m = await mem();
        const o = await osInfo();

        return s.manufacturer + ';' + s.uuid + ';' + String(c.processors) + ';'
                + c.vendor + ';' + m.total + ';' + o.platform + ';' + o.release;
    }
github staart / api / src / helpers / utils.ts View on Github external
export const getSystemInformation = async () => {
  return {
    system: await systemInfo.system(),
    time: systemInfo.time(),
    cpu: await systemInfo.cpu(),
    osInfo: await systemInfo.osInfo(),
    package: {
      name: pkg.name,
      version: pkg.version,
      repository: pkg.repository,
      author: pkg.author,
      "staart-version": pkg["staart-version"]
    }
  };
};
github dreamnettech / dreamtime / src / electron / src / modules / tools / system.js View on Github external
async setup() {
    const [
      graphics,
      os,
      cpu,
      mem,
      online,
    ] = await Promise.all([
      si.graphics(),
      si.osInfo(),
      si.cpu(),
      si.mem(),
      isOnline(),
    ])

    this._graphics = graphics
    this.os = os
    this.cpu = cpu
    this.memory = mem
    this.online = online

    logger.info(`GPU devices: ${this.graphics.length}`)
    logger.info(`RAM: ${this.memory.total} bytes.`)
    logger.info(`Internet connection: ${this.online}`)
    logger.debug(this)
  }
github GoogleChromeLabs / carlo / examples / systeminfo / app.js View on Github external
async function systeminfo() {
  const info = {};
  await Promise.all([
    si.battery().then(r => info.battery = r),
    si.cpu().then(r => info.cpu = r),
    si.osInfo().then(r => info.osInfo = r),
  ]);
  return info;
}
github oguzhaninan / Stacer / src / stacer.js View on Github external
function diskInfo()
  {
    diskspace.check('/', function(err, total, free, status)
    {
      var used = total-free
      dUsed  = (used  / 1000000000).toFixed(1)
      dTotal = (total / 1000000000).toFixed(1) + "GB"
      diskBar.animate( used / total );
    });
  }
  diskInfo()
  setInterval(diskInfo, prop.diskDuration)


  //System info
  si.osInfo(function(sys)
  {
    $(".system-info ul").append($("<li>").append("Hostname: "     + os.hostname()))
    $(".system-info ul").append($("</li><li>").append("Platform: "     + os.platform() + os.arch()))
    $(".system-info ul").append($("</li><li>").append("Distribution: " + sys.distro ))
    $(".system-info ul").append($("</li><li>").append("Total RAM: "    + prettySize( os.totalmem() ) + " GB"))
    $(".system-info ul").append($("</li><li>").append("CPU Model: "    + os.cpus()[0].model))
    $(".system-info ul").append($("</li><li>").append("CPU Cores: "    + os.cpus().length))
  })
}
</li>