added raw data to currentLoad(), fixed networkInterfaces() MAC problem node 8.x
This commit is contained in:
parent
efd3ef6fc1
commit
c01ce0c65a
@ -98,6 +98,7 @@ Other changes
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| Version | Date | Comment |
|
||||||
| -------------- | -------------- | -------- |
|
| -------------- | -------------- | -------- |
|
||||||
|
| 3.27.0 | 2017-09-11 | added raw data to `currentLoad()`, fixed `networkInterfaces()` MAC problem node 8.x |
|
||||||
| 3.26.2 | 2017-09-01 | removed redundant code |
|
| 3.26.2 | 2017-09-01 | removed redundant code |
|
||||||
| 3.26.1 | 2017-08-23 | fixed `cpu().speed` windows / AMD, updated docs |
|
| 3.26.1 | 2017-08-23 | fixed `cpu().speed` windows / AMD, updated docs |
|
||||||
| 3.26.0 | 2017-08-21 | extended `getDynamicData()` (windows), updated docs |
|
| 3.26.0 | 2017-08-21 | extended `getDynamicData()` (windows), updated docs |
|
||||||
|
|||||||
27
README.md
27
README.md
@ -29,7 +29,7 @@ const si = require('systeminformation');
|
|||||||
si.cpu(function(data) {
|
si.cpu(function(data) {
|
||||||
console.log('CPU-Information:');
|
console.log('CPU-Information:');
|
||||||
console.log(data);
|
console.log(data);
|
||||||
})
|
});
|
||||||
|
|
||||||
// promises style - new in version 3
|
// promises style - new in version 3
|
||||||
si.cpu()
|
si.cpu()
|
||||||
@ -41,7 +41,7 @@ async function cpu() {
|
|||||||
try {
|
try {
|
||||||
const data = await si.cpu();
|
const data = await si.cpu();
|
||||||
console.log(data)
|
console.log(data)
|
||||||
} catch {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -50,6 +50,7 @@ async function cpu() {
|
|||||||
## News and Changes
|
## News and Changes
|
||||||
|
|
||||||
### Latest Activity
|
### Latest Activity
|
||||||
|
- Version 3.27.0: added raw data to `currentLoad()`, fixed `networkInterfaces()` MAC problem node 8.x
|
||||||
- Version 3.26.0: improved windows support `getDynamicData()`, updated docs
|
- Version 3.26.0: improved windows support `getDynamicData()`, updated docs
|
||||||
- Version 3.25.0: improved windows support `networkStats()`, `cpuCache()`, bug fix `getStaticData()`
|
- Version 3.25.0: improved windows support `networkStats()`, `cpuCache()`, bug fix `getStaticData()`
|
||||||
- Version 3.24.0: extended windows support `networkStats()`, `networkConnections()`
|
- Version 3.24.0: extended windows support `networkStats()`, `networkConnections()`
|
||||||
@ -317,15 +318,17 @@ I also created a nice little command line tool called [mmon][mmon-github-url] (
|
|||||||
|
|
||||||
| Function | Result object | Linux | OSX | Win | Comments |
|
| Function | Result object | Linux | OSX | Win | Comments |
|
||||||
| --------------- | ----- | ----- | ---- | ------- | -------- |
|
| --------------- | ----- | ----- | ---- | ------- | -------- |
|
||||||
| si.currentLoad(cb) | {...} | X | X | | CPU-Load |
|
| si.currentLoad(cb) | {...} | X | X | X | CPU-Load |
|
||||||
| | avgload | X | X | | average load |
|
| | avgload | X | X | X | average load |
|
||||||
| | currentload | X | X | | CPU-Load in % |
|
| | currentload | X | X | X | CPU-Load in % |
|
||||||
| | currentload_user | X | X | | CPU-Load User in % |
|
| | currentload_user | X | X | X | CPU-Load User in % |
|
||||||
| | currentload_nice | X | X | | CPU-Load Nice in % |
|
| | currentload_system | X | X | X | CPU-Load System in % |
|
||||||
| | currentload_system | X | X | | CPU-Load System in % |
|
| | currentload_nice | X | X | X | CPU-Load Nice in % |
|
||||||
| | currentload_irq | X | X | | CPU-Load System in % |
|
| | currentload_idle | X | X | X | CPU-Load Idle in % |
|
||||||
| | cpus[] | X | X | | current loads per CPU in % |
|
| | currentload_irq | X | X | X | CPU-Load System in % |
|
||||||
| si.fullLoad(cb) | : integer | X | X | | CPU-full load since bootup in % |
|
| | raw_currentload... | X | X | X | CPU-Load raw values (ticks) |
|
||||||
|
| | cpus[] | X | X | X | current loads per CPU in % + raw ticks |
|
||||||
|
| si.fullLoad(cb) | : integer | X | X | X | CPU-full load since bootup in % |
|
||||||
| si.processes(cb) | {...} | X | X | | # running processes |
|
| si.processes(cb) | {...} | X | X | | # running processes |
|
||||||
| | all | X | X | | # of all processes |
|
| | all | X | X | | # of all processes |
|
||||||
| | running | X | X | | # of all processes running |
|
| | running | X | X | | # of all processes running |
|
||||||
@ -463,7 +466,7 @@ const si = require('systeminformation');
|
|||||||
|
|
||||||
async function network() {
|
async function network() {
|
||||||
try {
|
try {
|
||||||
const data = await si.networkStats('eth1')
|
const data = await si.networkStats('eth1');
|
||||||
console.log(`Network Interface Stats (eth1):
|
console.log(`Network Interface Stats (eth1):
|
||||||
- is up: ${data.operstate}
|
- is up: ${data.operstate}
|
||||||
- RX bytes overall: ${data.rx}
|
- RX bytes overall: ${data.rx}
|
||||||
|
|||||||
80
lib/cpu.js
80
lib/cpu.js
@ -36,9 +36,16 @@ let _current_cpu = {
|
|||||||
ms: 0,
|
ms: 0,
|
||||||
currentload: 0,
|
currentload: 0,
|
||||||
currentload_user: 0,
|
currentload_user: 0,
|
||||||
currentload_nice: 0,
|
|
||||||
currentload_system: 0,
|
currentload_system: 0,
|
||||||
currentload_irq: 0
|
currentload_nice: 0,
|
||||||
|
currentload_idle: 0,
|
||||||
|
currentload_irq: 0,
|
||||||
|
raw_currentload: 0,
|
||||||
|
raw_currentload_user: 0,
|
||||||
|
raw_currentload_system: 0,
|
||||||
|
raw_currentload_nice: 0,
|
||||||
|
raw_currentload_idle: 0,
|
||||||
|
raw_currentload_irq: 0
|
||||||
};
|
};
|
||||||
let _cpus = [];
|
let _cpus = [];
|
||||||
let _corecount = 0;
|
let _corecount = 0;
|
||||||
@ -564,29 +571,38 @@ function getLoad() {
|
|||||||
totalUser += cpu.user;
|
totalUser += cpu.user;
|
||||||
totalSystem += cpu.sys;
|
totalSystem += cpu.sys;
|
||||||
totalNice += cpu.nice;
|
totalNice += cpu.nice;
|
||||||
totalIrq += cpu.irq;
|
|
||||||
totalIdle += cpu.idle;
|
totalIdle += cpu.idle;
|
||||||
|
totalIrq += cpu.irq;
|
||||||
let tmp_tick = (_cpus && _cpus[i] && _cpus[i].totalTick ? _cpus[i].totalTick : 0);
|
let tmp_tick = (_cpus && _cpus[i] && _cpus[i].totalTick ? _cpus[i].totalTick : 0);
|
||||||
let tmp_load = (_cpus && _cpus[i] && _cpus[i].totalLoad ? _cpus[i].totalLoad : 0);
|
let tmp_load = (_cpus && _cpus[i] && _cpus[i].totalLoad ? _cpus[i].totalLoad : 0);
|
||||||
let tmp_user = (_cpus && _cpus[i] && _cpus[i].user ? _cpus[i].user : 0);
|
let tmp_user = (_cpus && _cpus[i] && _cpus[i].user ? _cpus[i].user : 0);
|
||||||
let tmp_system = (_cpus && _cpus[i] && _cpus[i].sys ? _cpus[i].sys : 0);
|
let tmp_system = (_cpus && _cpus[i] && _cpus[i].sys ? _cpus[i].sys : 0);
|
||||||
let tmp_nice = (_cpus && _cpus[i] && _cpus[i].nice ? _cpus[i].nice : 0);
|
let tmp_nice = (_cpus && _cpus[i] && _cpus[i].nice ? _cpus[i].nice : 0);
|
||||||
|
let tmp_idle = (_cpus && _cpus[i] && _cpus[i].idle ? _cpus[i].idle : 0);
|
||||||
let tmp_irq = (_cpus && _cpus[i] && _cpus[i].irq ? _cpus[i].irq : 0);
|
let tmp_irq = (_cpus && _cpus[i] && _cpus[i].irq ? _cpus[i].irq : 0);
|
||||||
_cpus[i] = cpu;
|
_cpus[i] = cpu;
|
||||||
_cpus[i].totalTick = _cpus[i].user + _cpus[i].sys + _cpus[i].nice + _cpus[i].irq + _cpus[i].idle;
|
_cpus[i].totalTick = _cpus[i].user + _cpus[i].sys + _cpus[i].nice + _cpus[i].irq + _cpus[i].idle;
|
||||||
_cpus[i].totalLoad = _cpus[i].user + _cpus[i].sys + _cpus[i].nice + _cpus[i].irq;
|
_cpus[i].totalLoad = _cpus[i].user + _cpus[i].sys + _cpus[i].nice + _cpus[i].irq;
|
||||||
_cpus[i].currentTick = _cpus[i].totalTick - tmp_tick;
|
_cpus[i].currentTick = _cpus[i].totalTick - tmp_tick;
|
||||||
_cpus[i].load = (_cpus[i].totalLoad - tmp_load) / _cpus[i].currentTick * 100;
|
_cpus[i].load = (_cpus[i].totalLoad - tmp_load);
|
||||||
_cpus[i].load_user = (_cpus[i].user - tmp_user) / _cpus[i].currentTick * 100;
|
_cpus[i].load_user = (_cpus[i].user - tmp_user);
|
||||||
_cpus[i].load_system = (_cpus[i].sys - tmp_system) / _cpus[i].currentTick * 100;
|
_cpus[i].load_system = (_cpus[i].sys - tmp_system);
|
||||||
_cpus[i].load_nice = (_cpus[i].nice - tmp_nice) / _cpus[i].currentTick * 100;
|
_cpus[i].load_nice = (_cpus[i].nice - tmp_nice);
|
||||||
_cpus[i].load_irq = (_cpus[i].irq - tmp_irq) / _cpus[i].currentTick * 100;
|
_cpus[i].load_idle = (_cpus[i].idle - tmp_idle);
|
||||||
|
_cpus[i].load_irq = (_cpus[i].irq - tmp_irq);
|
||||||
cores[i] = {};
|
cores[i] = {};
|
||||||
cores[i].load = _cpus[i].load;
|
cores[i].load = _cpus[i].load / _cpus[i].currentTick * 100;
|
||||||
cores[i].load_user = _cpus[i].load_user;
|
cores[i].load_user = _cpus[i].load_user / _cpus[i].currentTick * 100;
|
||||||
cores[i].load_system = _cpus[i].load_system;
|
cores[i].load_system = _cpus[i].load_system / _cpus[i].currentTick * 100;
|
||||||
cores[i].load_nice = _cpus[i].load_nice;
|
cores[i].load_nice = _cpus[i].load_nice / _cpus[i].currentTick * 100;
|
||||||
cores[i].load_irq = _cpus[i].load_irq;
|
cores[i].load_idle = _cpus[i].load_idle / _cpus[i].currentTick * 100;
|
||||||
|
cores[i].load_irq = _cpus[i].load_irq / _cpus[i].currentTick * 100;
|
||||||
|
cores[i].raw_load = _cpus[i].load;
|
||||||
|
cores[i].raw_load_user = _cpus[i].load_user;
|
||||||
|
cores[i].raw_load_system = _cpus[i].load_system;
|
||||||
|
cores[i].raw_load_nice = _cpus[i].load_nice;
|
||||||
|
cores[i].raw_load_idle = _cpus[i].load_idle;
|
||||||
|
cores[i].raw_load_irq = _cpus[i].load_irq;
|
||||||
}
|
}
|
||||||
let totalTick = totalUser + totalSystem + totalNice + totalIrq + totalIdle;
|
let totalTick = totalUser + totalSystem + totalNice + totalIrq + totalIdle;
|
||||||
let totalLoad = totalUser + totalSystem + totalNice + totalIrq;
|
let totalLoad = totalUser + totalSystem + totalNice + totalIrq;
|
||||||
@ -597,7 +613,14 @@ function getLoad() {
|
|||||||
currentload_user: (totalUser - _current_cpu.user) / currentTick * 100,
|
currentload_user: (totalUser - _current_cpu.user) / currentTick * 100,
|
||||||
currentload_system: (totalSystem - _current_cpu.system) / currentTick * 100,
|
currentload_system: (totalSystem - _current_cpu.system) / currentTick * 100,
|
||||||
currentload_nice: (totalNice - _current_cpu.nice) / currentTick * 100,
|
currentload_nice: (totalNice - _current_cpu.nice) / currentTick * 100,
|
||||||
|
currentload_idle: (totalIdle - _current_cpu.idle) / currentTick * 100,
|
||||||
currentload_irq: (totalIrq - _current_cpu.irq) / currentTick * 100,
|
currentload_irq: (totalIrq - _current_cpu.irq) / currentTick * 100,
|
||||||
|
raw_currentload: (totalLoad - _current_cpu.load),
|
||||||
|
raw_currentload_user: (totalUser - _current_cpu.user),
|
||||||
|
raw_currentload_system: (totalSystem - _current_cpu.system),
|
||||||
|
raw_currentload_nice: (totalNice - _current_cpu.nice),
|
||||||
|
raw_currentload_idle: (totalIdle - _current_cpu.idle),
|
||||||
|
raw_currentload_irq: (totalIrq - _current_cpu.irq),
|
||||||
cpus: cores
|
cpus: cores
|
||||||
};
|
};
|
||||||
_current_cpu = {
|
_current_cpu = {
|
||||||
@ -613,17 +636,31 @@ function getLoad() {
|
|||||||
currentload_user: result.currentload_user,
|
currentload_user: result.currentload_user,
|
||||||
currentload_system: result.currentload_system,
|
currentload_system: result.currentload_system,
|
||||||
currentload_nice: result.currentload_nice,
|
currentload_nice: result.currentload_nice,
|
||||||
|
currentload_idle: result.currentload_idle,
|
||||||
currentload_irq: result.currentload_irq,
|
currentload_irq: result.currentload_irq,
|
||||||
|
raw_currentload: result.raw_currentload,
|
||||||
|
raw_currentload_user: result.raw_currentload_user,
|
||||||
|
raw_currentload_system: result.raw_currentload_system,
|
||||||
|
raw_currentload_nice: result.raw_currentload_nice,
|
||||||
|
raw_currentload_idle: result.raw_currentload_idle,
|
||||||
|
raw_currentload_irq: result.raw_currentload_irq,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
let cores = [];
|
let cores = [];
|
||||||
for (let i = 0; i < _corecount; i++) {
|
for (let i = 0; i < _corecount; i++) {
|
||||||
cores[i] = {};
|
cores[i] = {};
|
||||||
cores[i].load = _cpus[i].load;
|
cores[i].load = _cpus[i].load / _cpus[i].currentTick * 100;
|
||||||
cores[i].load_user = _cpus[i].load_user;
|
cores[i].load_user = _cpus[i].load_user / _cpus[i].currentTick * 100;
|
||||||
cores[i].load_system = _cpus[i].load_system;
|
cores[i].load_system = _cpus[i].load_system / _cpus[i].currentTick * 100;
|
||||||
cores[i].load_nice = _cpus[i].load_nice;
|
cores[i].load_nice = _cpus[i].load_nice / _cpus[i].currentTick * 100;
|
||||||
cores[i].load_irq = _cpus[i].load_irq;
|
cores[i].load_idle = _cpus[i].load_idle / _cpus[i].currentTick * 100;
|
||||||
|
cores[i].load_irq = _cpus[i].load_irq / _cpus[i].currentTick * 100;
|
||||||
|
cores[i].raw_load = _cpus[i].load;
|
||||||
|
cores[i].raw_load_user = _cpus[i].load_user;
|
||||||
|
cores[i].raw_load_system = _cpus[i].load_system;
|
||||||
|
cores[i].raw_load_nice = _cpus[i].load_nice;
|
||||||
|
cores[i].raw_load_idle = _cpus[i].load_idle;
|
||||||
|
cores[i].raw_load_irq = _cpus[i].load_irq;
|
||||||
}
|
}
|
||||||
result = {
|
result = {
|
||||||
avgload: avgload,
|
avgload: avgload,
|
||||||
@ -631,7 +668,14 @@ function getLoad() {
|
|||||||
currentload_user: _current_cpu.currentload_user,
|
currentload_user: _current_cpu.currentload_user,
|
||||||
currentload_system: _current_cpu.currentload_system,
|
currentload_system: _current_cpu.currentload_system,
|
||||||
currentload_nice: _current_cpu.currentload_nice,
|
currentload_nice: _current_cpu.currentload_nice,
|
||||||
|
currentload_idle: _current_cpu.currentload_idle,
|
||||||
currentload_irq: _current_cpu.currentload_irq,
|
currentload_irq: _current_cpu.currentload_irq,
|
||||||
|
raw_currentload: _current_cpu.raw_currentload,
|
||||||
|
raw_currentload_user: _current_cpu.raw_currentload_user,
|
||||||
|
raw_currentload_system: _current_cpu.raw_currentload_system,
|
||||||
|
raw_currentload_nice: _current_cpu.raw_currentload_nice,
|
||||||
|
raw_currentload_idle: _current_cpu.raw_currentload_idle,
|
||||||
|
raw_currentload_irq: _current_cpu.raw_currentload_irq,
|
||||||
cpus: cores
|
cpus: cores
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -172,6 +172,7 @@ function parseBlk(lines) {
|
|||||||
let data = [];
|
let data = [];
|
||||||
|
|
||||||
lines.filter(line => line !== '').forEach((line) => {
|
lines.filter(line => line !== '').forEach((line) => {
|
||||||
|
// line = line.replace(/\\/g,'\\\\');
|
||||||
let disk = JSON.parse(line);
|
let disk = JSON.parse(line);
|
||||||
data.push({
|
data.push({
|
||||||
'name': disk.name,
|
'name': disk.name,
|
||||||
|
|||||||
10
lib/index.js
10
lib/index.js
@ -91,7 +91,7 @@ const util = require('./util');
|
|||||||
const system = require('./system');
|
const system = require('./system');
|
||||||
const osInfo = require('./osinfo');
|
const osInfo = require('./osinfo');
|
||||||
const cpu = require('./cpu');
|
const cpu = require('./cpu');
|
||||||
const mem = require('./memory');
|
const memory = require('./memory');
|
||||||
const battery = require('./battery');
|
const battery = require('./battery');
|
||||||
const graphics = require('./graphics');
|
const graphics = require('./graphics');
|
||||||
const filesystem = require('./filesystem');
|
const filesystem = require('./filesystem');
|
||||||
@ -138,7 +138,7 @@ function getStaticData(callback) {
|
|||||||
cpu.cpuFlags(),
|
cpu.cpuFlags(),
|
||||||
graphics.graphics(),
|
graphics.graphics(),
|
||||||
network.networkInterfaces(),
|
network.networkInterfaces(),
|
||||||
mem.memLayout(),
|
memory.memLayout(),
|
||||||
filesystem.diskLayout()
|
filesystem.diskLayout()
|
||||||
]).then(res => {
|
]).then(res => {
|
||||||
data.system = res[0];
|
data.system = res[0];
|
||||||
@ -255,7 +255,7 @@ function getDynamicData(srv, iface, callback) {
|
|||||||
functionProcessed();
|
functionProcessed();
|
||||||
});
|
});
|
||||||
|
|
||||||
mem.mem().then(res => {
|
memory.mem().then(res => {
|
||||||
data.mem = res;
|
data.mem = res;
|
||||||
functionProcessed();
|
functionProcessed();
|
||||||
});
|
});
|
||||||
@ -348,8 +348,8 @@ exports.cpuTemperature = cpu.cpuTemperature;
|
|||||||
exports.currentLoad = cpu.currentLoad;
|
exports.currentLoad = cpu.currentLoad;
|
||||||
exports.fullLoad = cpu.fullLoad;
|
exports.fullLoad = cpu.fullLoad;
|
||||||
|
|
||||||
exports.mem = mem.mem;
|
exports.mem = memory.mem;
|
||||||
exports.memLayout = mem.memLayout;
|
exports.memLayout = memory.memLayout;
|
||||||
|
|
||||||
exports.battery = battery;
|
exports.battery = battery;
|
||||||
|
|
||||||
|
|||||||
@ -27,6 +27,7 @@ const NOT_SUPPORTED = 'not supported';
|
|||||||
|
|
||||||
let _network = {};
|
let _network = {};
|
||||||
let _default_iface;
|
let _default_iface;
|
||||||
|
let _mac = {};
|
||||||
|
|
||||||
function getValue(lines, property, separator) {
|
function getValue(lines, property, separator) {
|
||||||
separator = separator || ':';
|
separator = separator || ':';
|
||||||
@ -83,6 +84,47 @@ function getDefaultNetworkInterface() {
|
|||||||
|
|
||||||
exports.getDefaultNetworkInterface = getDefaultNetworkInterface;
|
exports.getDefaultNetworkInterface = getDefaultNetworkInterface;
|
||||||
|
|
||||||
|
function getMacAddresses() {
|
||||||
|
let iface = '';
|
||||||
|
let mac = '';
|
||||||
|
let result = {};
|
||||||
|
if (_linux) {
|
||||||
|
const cmd = 'export LC_ALL=C; /sbin/ifconfig; unset LC_ALL';
|
||||||
|
let res = execSync(cmd);
|
||||||
|
const lines = res.toString().split('\n');
|
||||||
|
for (let i = 0; i < lines.length; i++) {
|
||||||
|
if (lines[i] && lines[i][0] !== ' ') {
|
||||||
|
iface = lines[i].split(' ')[0];
|
||||||
|
mac = lines[i].split('HWaddr ')[1];
|
||||||
|
if (iface && mac) {
|
||||||
|
result[iface] = mac.trim();
|
||||||
|
iface = '';
|
||||||
|
mac = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (_darwin) {
|
||||||
|
const cmd = '/sbin/ifconfig';
|
||||||
|
let res = execSync(cmd);
|
||||||
|
const lines = res.toString().split('\n');
|
||||||
|
for (let i = 0; i < lines.length; i++) {
|
||||||
|
if (lines[i] && lines[i][0] !== '\t' && lines[i].indexOf(':') > 0) {
|
||||||
|
iface = lines[i].split(':')[0];
|
||||||
|
} else if (lines[i].indexOf('\tether ') === 0) {
|
||||||
|
mac = lines[i].split('\tether ')[1];
|
||||||
|
if (iface && mac) {
|
||||||
|
result[iface] = mac.trim();
|
||||||
|
iface = '';
|
||||||
|
mac = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
function networkInterfaceDefault(callback) {
|
function networkInterfaceDefault(callback) {
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
@ -118,7 +160,13 @@ function networkInterfaces(callback) {
|
|||||||
if (details.family === 'IPv6') {
|
if (details.family === 'IPv6') {
|
||||||
ip6 = details.address
|
ip6 = details.address
|
||||||
}
|
}
|
||||||
mac = details.mac
|
mac = details.mac;
|
||||||
|
if (mac.indexOf('00:00:0') > -1 && (_linux || _darwin)) {
|
||||||
|
if (Object.keys(_mac).length === 0) {
|
||||||
|
_mac = getMacAddresses();
|
||||||
|
}
|
||||||
|
mac = _mac[dev] || '';
|
||||||
|
}
|
||||||
});
|
});
|
||||||
let internal = (ifaces[dev] && ifaces[dev][0]) ? ifaces[dev][0].internal : null;
|
let internal = (ifaces[dev] && ifaces[dev][0]) ? ifaces[dev][0].internal : null;
|
||||||
result.push({ iface: dev, ip4: ip4, ip6: ip6, mac: mac, internal: internal })
|
result.push({ iface: dev, ip4: ip4, ip6: ip6, mac: mac, internal: internal })
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user