How to use the systeminformation.system 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 sykeben / RasDash / api.js View on Github external
api.get('/sys/model', function(req, res) { // Device Model (sys/model)
  si.system()
    .then(data => res.send('\"' + data.model.toString() + '\"'))
    .catch(error => res.status(404).send(siError))
})
api.get('/sys/os', function(req, res) { // Device OS (sys/os)
github EnKrypt / Doppler / backend / src / app.ts View on Github external
(async () => {
    system = await SI.system();
    cpu = await SI.cpu();
    os = await SI.osInfo();

    setInterval(poll, argv.i);

    app.listen(argv.p);

    console.log(`Doppler running on port ${argv.p}`);
})();
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 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 / elasticsearch.ts View on Github external
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"]
    }
  };
};