How to use the systeminformation.processes 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 the-AjK / btb / src / utils.js View on Github external
exports.systemInfo = async function (cb) {
    try {
        cb({
            cpu: await si.cpu(),
            time: si.time(),
            memory: await si.mem(),
            system: await si.osInfo(),
            versions: await si.versions(),
            fs: await si.fsSize(),
            load: await si.currentLoad(),
            processes: await si.processes(),
            network: {
                interfaces: await si.networkInterfaces(),
                stats: await si.networkStats(),
                connections: await si.networkConnections()
            },
            process: {
                uptime: process.uptime(),
                version: process.version,
                memoryUsage: process.memoryUsage(),
                cpuUsage: process.cpuUsage()
            }
        });
    } catch (e) {
        console.error(e);
    }
}
github EnKrypt / Doppler / backend / src / app.ts View on Github external
const poll = async () => {
    cpuLoad = await SI.currentLoad();
    mem = await SI.mem();
    disk = await SI.fsSize();
    processes = await SI.processes();
    network = await SI.networkStats();
    try {
        cpuTemp = await SI.cpuTemperature();
        if (!cpuTemp.cores.length) {
            throw new Error('Cannot monitor CPU temperature');
        }
    } catch (e) {
        cpuTemp = {
            main: 0,
            cores: Array(cpu.cores).fill(0),
            max: 0
        };
        if (!tempFlag) {
            console.warn(
                'Cannot pull temperature data. On Linux, make sure `sensors` is available (package: lm-sensors). For OS X, install osx-temperature-sensor. Some CPUs are not supported on Windows.'
            );
github aksakalli / gtop / lib / monitor / proc.js View on Github external
var updater = function() {
    si.processes(data => {
      that.updateData(data);
    })
  }
  updater();