How to use the systeminformation.fsStats 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 EnKrypt / Doppler / backend / src / app.ts View on Github external
}
    } 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.'
            );
            tempFlag = true;
        }
    }
    try {
        fsStats = await SI.fsStats();
    } catch (e) {
        fsStats = {
            rx_bytes: 0,
            wx_bytes: 0,
            tx_bytes: 0,
            rx_sec: 0,
            wx_sec: 0,
            tx_sec: 0,
            ms: 0
        };
        if (!windowsFlag) {
            console.warn(
                'Your environment is not fully supported. Keep in mind that disk and network I/O will not be monitored.'
            );
            windowsFlag = true;
        }
github DeadPackets / HackPi / server / functions / fn.js View on Github external
var ioinfo = si.disksIO(function(ioinfo) {
			var rwinfo = si.fsStats(function(rwinfo) {
				SYSINFO.fs = {
					fssize,
					ioinfo,
					rwinfo
				}
			})
		})
	})