networkInterfaces() bug fix (osx)

This commit is contained in:
Sebastian Hildebrandt 2020-01-01 08:29:50 +01:00
parent 9ff4519665
commit d3f123c6e1
7 changed files with 31 additions and 8 deletions

View File

@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 4.16.0 | 2019-11-27 | `networkInterfaces()` bug fix (osx) |
| 4.16.0 | 2019-11-27 | `networkGatewayDefault()` added |
| 4.15.3 | 2019-11-10 | type definitions and docs update |
| 4.15.2 | 2019-11-10 | `mem()` improved calculation linux |

View File

@ -29,7 +29,21 @@
[![Caretaker][caretaker-image]][caretaker-url]
[![MIT license][license-img]][license-url]
This is amazing. Started as a small project just for myself, it now has > 9,000 lines of code, > 250 versions published, up to 900,000 downloads per month, > 2 Mio downloads overall. Thank you to all who contributed to this project!
#### Happy new year
```
.''.
.''. . *''* :_\/_: .
:_\/_: _\(/_ .:.*_\/_* : /\ : .'.:.'.
.''.: /\ : ./)\ ':'* /\ * : '..'. -=:o:=-
:_\/_:'.:::. ' *''* * '.\'/.' _\(/_'.':'.'
: /\ : ::::: *_\/_* -= o =- /)\ ' *
'..' ':::' * /\ * .'/.\'. '
* *..* :
*
```
This is amazing. Started as a small project just for myself, it now has > 9,000 lines of code, > 250 versions published, up to 1 mio downloads per month, > 4 mio downloads overall. Thank you to all who contributed to this project!
## New Version 4.0
@ -84,13 +98,13 @@ si.cpu()
(last 7 major and minor version releases)
- Version 4.16.0: `networkGatewayDefault()` added
- Version 4.15.0: `cpu()` added governor (linux)
- Version 4.14.0: `processes()` added process path and params
- Version 4.13.0: `networkConnections()` added PID, process
- Version 4.12.0: `networkInterfaces()` added property virtual
- Version 4.11.0: `wifiNetworks()` added available wifi networks
- Version 4.10.0: `graphics()` added windows multiple display support, added display size, connection, ...
- Version 4.9.0: `graphics()` added vendor, refresh rate, current resolution
- ...
You can find all changes here: [detailed changelog][changelog-url]

View File

@ -124,7 +124,8 @@ async function cpuData() {
console.log(e)
}
}</code></pre><br>
<p><strong>Issues</strong></p>
<p>If you discover some empty or incorrect values, please be sure to first have a look at the <a href="issues.html">Known issues</a> section.</p>
</div>
</div>
</div>

View File

@ -83,6 +83,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">4.16.1</th>
<td>2019-01-01</td>
<td><span class="code">networkInterfaces()</span> bug fix (osx)</td>
</tr>
<tr>
<th scope="row">4.16.0</th>
<td>2019-11-27</td>

View File

@ -168,7 +168,7 @@
<img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span></div>
<div class="version">Current Version: <span id="version">4.16.0</span></div>
<div class="version">Current Version: <span id="version">4.16.1</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div>
<div class="down">
@ -199,7 +199,7 @@
<div class="title">Downloads last month</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">216</div>
<div class="numbers">231</div>
<div class="title">Dependends</div>
</div>
</div>

View File

@ -72,6 +72,9 @@
<h4>Stats Functions</h4>
<p>To get correct values with <span class="code">fsStats()</span>, <span class="code">disksIO()</span> and <span class="code">networkStats()</span> please check <a href="statsfunctions.html">this guide</a></p>
<h4>Empty / incorrect values</h4>
<p>If you discover empty or incorrect values, please keep in mind that some underlying commands need to be run under admin privileges. So if you run your scripts as normal users, not all system information values can be determined. For linux this is e.g. the case for `memLayout()`, advances `system()`, `bios()`, `baseboard()`, `cpu()`information, S.M.A.R.T. status and others... </p>
<h4>Finding New Issues</h4>
<p>If you still have problems, please feel free to open an issue on our <a href="https://github.com/sebhildebrandt/systeminformation/issues">github page</a></p>
</div>

View File

@ -294,7 +294,7 @@ function parseLinesDarwinNics(sections) {
}
function getDarwinNics() {
const cmd = 'ifconfig -v';
const cmd = '/sbin/ifconfig -v';
try {
const lines = execSync(cmd, util.execOptsWin).toString().split('\n');
const nsections = splitSectionsNics(lines);
@ -1075,9 +1075,8 @@ function networkGatewayDefault(callback) {
if (callback) { callback(result); }
resolve(result);
});
}
})
});
} catch (e) {
if (callback) { callback(result); }
resolve(result);