updated docs
This commit is contained in:
parent
e75edb001b
commit
cd972d01cd
@ -235,6 +235,37 @@
|
||||
<td></td>
|
||||
<td>S.M.A.R.T Status (see Known Issues)</td>
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.diskLayout().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
[
|
||||
{
|
||||
device: '/dev/nvme0n1',
|
||||
type: 'NVMe',
|
||||
name: 'SAMSUNG xxxxxxxxxxxx-xxxx',
|
||||
vendor: 'Samsung',
|
||||
size: 1024209543168,
|
||||
bytesPerSector: -1,
|
||||
totalCylinders: -1,
|
||||
totalHeads: -1,
|
||||
totalSectors: -1,
|
||||
totalTracks: -1,
|
||||
tracksPerCylinder: -1,
|
||||
sectorsPerTrack: -1,
|
||||
firmwareRevision: '',
|
||||
serialNum: '...serial....',
|
||||
interfaceType: 'PCIe',
|
||||
smartStatus: 'unknown'
|
||||
},
|
||||
{
|
||||
...
|
||||
}
|
||||
]</pre>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>si.blockDevices(cb)</td>
|
||||
<td>[{...}]</td>
|
||||
@ -365,6 +396,34 @@
|
||||
<td></td>
|
||||
<td>protocol (SATA, PCI-Express, ...)</td>
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.blockDevices().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
[
|
||||
{
|
||||
name: 'nvme0n1',
|
||||
type: 'disk',
|
||||
fstype: '',
|
||||
mount: '',
|
||||
size: 1024209543168,
|
||||
physical: 'SSD',
|
||||
uuid: '',
|
||||
label: '',
|
||||
model: 'SAMSUNG xxxxxxxxxxxx-xxxx',
|
||||
serial: '... serial ...',
|
||||
removable: false,
|
||||
protocol: 'nvme',
|
||||
group: undefined
|
||||
},
|
||||
{
|
||||
...
|
||||
}
|
||||
]</pre>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>si.disksIO(cb)</td>
|
||||
<td>{...}</td>
|
||||
@ -445,6 +504,36 @@
|
||||
<td></td>
|
||||
<td>interval length (for per second values)</td>
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
setInterval(function() {
|
||||
si.disksIO().then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
}, 1000)</code></pre class="example">
|
||||
<pre class="example">
|
||||
{ // first call
|
||||
rIO: 899825,
|
||||
wIO: 932331,
|
||||
tIO: 1832156,
|
||||
rIO_sec: -1,
|
||||
wIO_sec: -1,
|
||||
tIO_sec: -1,
|
||||
ms: 0
|
||||
}
|
||||
{ // second call
|
||||
rIO: 899863,
|
||||
wIO: 932331,
|
||||
tIO: 1832194,
|
||||
rIO_sec: 38.5395537525355,
|
||||
wIO_sec: 0,
|
||||
tIO_sec: 38.5395537525355,
|
||||
ms: 986
|
||||
}...</pre>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h2>File System and File System Stats</h2>
|
||||
@ -532,6 +621,27 @@
|
||||
<td></td>
|
||||
<td>mount point</td>
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.fsSize().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
[
|
||||
{
|
||||
fs: '/dev/md2',
|
||||
type: 'ext4',
|
||||
size: 972577361920,
|
||||
used: 59142635520,
|
||||
use: 6.08,
|
||||
mount: '/'
|
||||
},
|
||||
{
|
||||
...
|
||||
}
|
||||
]</pre>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>si.fsOpenFiles(cb)</td>
|
||||
<td>{...}</td>
|
||||
@ -572,6 +682,19 @@
|
||||
<td></td>
|
||||
<td>count available</td>
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.fsOpenFiles().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
{
|
||||
max: 6566555,
|
||||
allocated: 1856,
|
||||
available: 0
|
||||
}</pre>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>si.fsStats(cb)</td>
|
||||
<td>{...}</td>
|
||||
@ -652,6 +775,36 @@
|
||||
<td></td>
|
||||
<td>interval length (for per second values)</td>
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
setInterval(function() {
|
||||
si.fsStats().then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
}, 1000)</code></pre class="example">
|
||||
<pre class="example">
|
||||
{ // first call
|
||||
rx: 14015849472,
|
||||
wx: 15316003328,
|
||||
tx: 29331852800,
|
||||
rx_sec: -1,
|
||||
wx_sec: -1,
|
||||
tx_sec: -1,
|
||||
ms: 0
|
||||
}
|
||||
{ // second call
|
||||
rx: 14015849472,
|
||||
wx: 15316007424,
|
||||
tx: 29331856896,
|
||||
rx_sec: 0,
|
||||
wx_sec: 4083.748753738784,
|
||||
tx_sec: 4083.748753738784,
|
||||
ms: 1003
|
||||
}...</pre>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4>Getting correct stats values</h4>
|
||||
|
||||
@ -245,6 +245,54 @@
|
||||
<td></td>
|
||||
<td># changes up/down</td>
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.networkInterfaces().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
[
|
||||
{
|
||||
iface: 'lo0',
|
||||
ifaceName: 'lo0',
|
||||
ip4: '127.0.0.1',
|
||||
ip6: '::1',
|
||||
mac: '',
|
||||
internal: true,
|
||||
virtual: false,
|
||||
operstate: 'down',
|
||||
type: 'wired',
|
||||
duplex: 'full',
|
||||
mtu: 16384,
|
||||
speed: -1,
|
||||
dhcp: false,
|
||||
dnsSuffix: '',
|
||||
ieee8021xAuth: '',
|
||||
ieee8021xState: '',
|
||||
carrierChanges: 0
|
||||
},
|
||||
{
|
||||
iface: 'en0',
|
||||
ifaceName: 'en0',
|
||||
ip4: '192.168.0.27',
|
||||
ip6: 'fe80::134a:1e43:abc5:d413',
|
||||
mac: 'xx:xx:xx:xx:xx:xx',
|
||||
internal: false,
|
||||
virtual: false,
|
||||
operstate: 'up',
|
||||
type: 'wired',
|
||||
duplex: 'full',
|
||||
mtu: 1500,
|
||||
speed: 1000,
|
||||
dhcp: true,
|
||||
dnsSuffix: '',
|
||||
ieee8021xAuth: '',
|
||||
ieee8021xState: '',
|
||||
carrierChanges: 0
|
||||
}, ...
|
||||
]</pre>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>si.networkInterfaceDefault(cb)</td>
|
||||
<td>: string</td>
|
||||
@ -255,6 +303,15 @@
|
||||
<td>X</td>
|
||||
<td>get name of default network interface</td>
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.networkInterfaceDefault().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
eth0</pre>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>si.networkGatewayDefault(cb)</td>
|
||||
<td>: string</td>
|
||||
@ -265,6 +322,15 @@
|
||||
<td>X</td>
|
||||
<td>get default network gateway</td>
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.networkGatewayDefault().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
192.168.0.1</pre>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>si.networkStats(iface,cb)</td>
|
||||
<td>[{...}]</td>
|
||||
@ -385,6 +451,48 @@
|
||||
<td></td>
|
||||
<td>interval length (for per second values)</td>
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
setInterval(function() {
|
||||
si.networkStats().then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
}, 1000)</code></pre class="example">
|
||||
<pre class="example">
|
||||
[
|
||||
{ // first call
|
||||
iface: 'en0',
|
||||
operstate: 'up',
|
||||
rx_bytes: 1752866207,
|
||||
rx_dropped: 0,
|
||||
rx_errors: 0,
|
||||
tx_bytes: 180934681,
|
||||
tx_dropped: 0,
|
||||
tx_errors: 0,
|
||||
rx_sec: -1,
|
||||
tx_sec: -1,
|
||||
ms: 0
|
||||
}
|
||||
]
|
||||
[
|
||||
{ // second call
|
||||
iface: 'en0',
|
||||
operstate: 'up',
|
||||
rx_bytes: 1752866822,
|
||||
rx_dropped: 0,
|
||||
rx_errors: 0,
|
||||
tx_bytes: 180939820,
|
||||
tx_dropped: 0,
|
||||
tx_errors: 0,
|
||||
rx_sec: 624.3654822335026,
|
||||
tx_sec: 5217.258883248731,
|
||||
ms: 985
|
||||
}
|
||||
]...</pre>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>si.networkConnections(cb)</td>
|
||||
<td>[{...}]</td>
|
||||
@ -475,6 +583,37 @@
|
||||
<td></td>
|
||||
<td>process name</td>
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.networkConnections().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
[
|
||||
{
|
||||
protocol: 'tcp4',
|
||||
localaddress: '192.168.0.27',
|
||||
localport: '55788',
|
||||
peeraddress: '163.128.xxx.xxx',
|
||||
peerport: '443',
|
||||
state: 'CLOSE_WAIT',
|
||||
pid: 702,
|
||||
process: ''
|
||||
},
|
||||
{
|
||||
protocol: 'tcp4',
|
||||
localaddress: '192.168.0.27',
|
||||
localport: '55761',
|
||||
peeraddress: '148.253.xxx.xxx',
|
||||
peerport: '22',
|
||||
state: 'ESTABLISHED',
|
||||
pid: 7267,
|
||||
process: ''
|
||||
},
|
||||
...
|
||||
]</pre>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h2>Site availability, Internet Latency</h2>
|
||||
@ -542,6 +681,20 @@
|
||||
<td>X</td>
|
||||
<td>response time in ms</td>
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.inetChecksite('google.com').then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
{
|
||||
url: 'google.com',
|
||||
ok: true,
|
||||
status: 301,
|
||||
ms: 82
|
||||
}</pre>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>si.inetLatency(host, cb)</td>
|
||||
<td>: number</td>
|
||||
@ -552,6 +705,15 @@
|
||||
<td>X</td>
|
||||
<td>response-time (ms) to external resource<br />host parameter is optional (default 8.8.8.8)</td>
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.inetLatency().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
13.484</pre>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4>Getting correct stats values</h4>
|
||||
|
||||
@ -175,6 +175,41 @@
|
||||
<td></td>
|
||||
<td>array of RDN flags
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.wifiNetworks().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
[
|
||||
{
|
||||
ssid: 'INTERNAL-WIFI',
|
||||
bssid: 'ab:01:14:4f:d3:82',
|
||||
mode: '',
|
||||
channel: 44,
|
||||
frequency: 5220,
|
||||
signalLevel: -68,
|
||||
quality: 64,
|
||||
security: [ 'WPA', 'WPA2' ],
|
||||
wpaFlags: [ 'PSK/TKIP/TKIP', 'PSK/AES/TKIP' ],
|
||||
rsnFlags: []
|
||||
},
|
||||
{
|
||||
ssid: 'FREE Wifi',
|
||||
bssid: 'aa:14:e5:16:97:f3',
|
||||
mode: '',
|
||||
channel: 44,
|
||||
frequency: 5220,
|
||||
signalLevel: -50,
|
||||
quality: 100,
|
||||
security: [ 'WPA', 'WPA2' ],
|
||||
wpaFlags: [ 'PSK/TKIP/TKIP', 'PSK/AES/TKIP' ],
|
||||
rsnFlags: []
|
||||
},
|
||||
...
|
||||
]</pre>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user