get() added function to get partial system info

This commit is contained in:
Sebastian Hildebrandt
2020-05-07 07:33:34 +02:00
parent ba3469db0c
commit 8fa0d3065a
7 changed files with 102 additions and 2 deletions
+56
View File
@@ -174,6 +174,62 @@
<td>X</td>
<td>all data at once<br>Specify services and interfaces to monitor<br>Defaults to first external network interface<br>Pass "*" for ALL services (linux/win only)<br>Pass "*" for ALL network interfaces</td>
</tr>
<tr>
<td>si.get(valueObject,cb)</td>
<td>{...}</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>get partial data at once<br>Specify return object for all<br>values that should be returned.<br>See example:</td>
</tr>
<tr class="example">
<td></td>
<td colspan="7">
<h5>Example</h5>
<pre><code class="js">const si = require('systeminformation');
// define all values, you want to get back
valueObject = {
cpu: '*',
osInfo: 'platform, release',
system: 'model, manufacturer'
}
si.get(valueObject).then(data => console.log(data));</code></pre class="example">
<pre class="example">
{
cpu: {
manufacturer: 'Intel®',
brand: 'Core™ i7-8569U',
vendor: 'GenuineIntel',
family: '6',
model: '142',
stepping: '10',
revision: '',
voltage: '',
speed: '2.80',
speedmin: '2.80',
speedmax: '2.80',
governor: '',
cores: 8,
physicalCores: 4,
processors: 1,
socket: '',
cache: { l1d: 32768, l1i: 32768, l2: 262144, l3: 8388608 }
},
osInfo: {
platform: 'darwin',
release: '10.15.4'
},
system: {
model: 'MacBookPro15,2',
manufacturer: 'Apple Inc.'
}
}
</pre>
</tr>
</tbody>
</table>
<p><strong>Static data</strong> is all hardware related (or more or less constant) data like system, baseboard, bios, OS, versions, cpu, network interfces, memory and disk layout</p>
+5
View File
@@ -83,6 +83,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">4.25.0</th>
<td>2020-05-07</td>
<td><span class="code">get()</span> added function to get partial system info /td>
</tr>
<tr>
<th scope="row">4.24.2</th>
<td>2020-05-06</td>
+1 -1
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.24.2</span></div>
<div class="version">Current Version: <span id="version">4.25.0</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">