Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
} 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;
}
var ioinfo = si.disksIO(function(ioinfo) {
var rwinfo = si.fsStats(function(rwinfo) {
SYSINFO.fs = {
fssize,
ioinfo,
rwinfo
}
})
})
})