Merge pull request #2 from sebhildebrandt/master

Update
This commit is contained in:
Renan Rocha 2021-03-26 21:57:19 -03:00 committed by GitHub
commit 16eae0c39a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 1283 additions and 613 deletions

View File

@ -6,6 +6,8 @@
- `audio()` detailed audio information
- `bluetoothDevices()` detailed information detected bluetooth devices
- `dockerImages()` detailed information docker images
- `dockerVolumes()` detailed information docker volumes
- `printers()` detailed printer information
- `usb()` detailed USB information
- `wifiInterfaces()` detected Wi-Fi interfaces
@ -44,6 +46,8 @@ We had to make **several interface changes** to keep systeminformation as consis
- `cpu()`: extended socket list (win)
- `cpu()`: added virtualization if cpu supports virtualization
- `cpu()`: now flags are part of this function
- `cpuTemperature()` added added socket and chipset temp (linux)
- `diskLayout()`: added USB drives (mac OS)
- `fsSize()`: added available
- `fsSize()`: improved calculation of used
- `getData()`: support for passing parameters and filters (see section General / getData)
@ -53,6 +57,7 @@ We had to make **several interface changes** to keep systeminformation as consis
- `memoryLayout()`: added ECC flag
- `osInfo()`: better fqdn (win)
- `osinfo()`: added hypervizor if hyper-v is enabled (win only)
- `osInfo()`: added remoteSession (win only)
- `system()`: better Raspberry PI detection
- `system()`: added virtual and virtualHost (if system is virtual instance)
- `uuid()`: better value support
@ -72,45 +77,58 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 5.3.3 | 2020-02-15 | `dockerContainerStats()` fixed ID splitting |
| 5.3.2 | 2020-02-15 | `inetLatency()` `ineChecksite()` fixed possible security issue (file://) |
| 5.3.1 | 2020-02-14 | `inetLatency()` `ineChecksite()` `servcices()` `processes()` fixed possible security issue (arrays) |
| 5.3.0 | 2020-02-12 | `osInfo()` added remoteSession (windows) |
| 5.2.7 | 2020-02-12 | `fsStats()`, `blockDevices()` improved linux |
| 5.2.6 | 2020-02-12 | `inetLatency()` fixed possible DOS intrusion |
| 5.2.5 | 2020-02-11 | `processes()` fixed truncated params (linux) |
| 5.2.4 | 2020-02-11 | `currentLoad()` fixed issue |
| 5.2.3 | 2020-02-11 | `diskLayout()` added USB drives (mac OS) |
| 5.2.2 | 2020-02-11 | code cleanup, updated docs |
| 5.2.1 | 2020-02-10 | `system()` fixed issue virtual detect (linux) |
| 5.2.0 | 2020-02-10 | `wifiInterfces()` and `wifiConnections()` added |
| 5.1.2 | 2020-02-08 | fixed node 4 compatibility issue |
| 5.1.1 | 2020-02-08 | `baseboard()` added memMax, memSlots, smaller improvements Raspberry |
| 5.1.0 | 2020-02-08 | `memLayout()` added ECC flag, `bios()` added language, features (linux) |
| 5.0.11 | 2020-02-07 | `fsSize()` fixed windows WSL issue |
| 5.0.10 | 2020-02-06 | `getDynamicData()` fixed windows WSL issue |
| 5.0.9 | 2020-02-02 | `fsSize()` fixed parsing edge case issue mac OS |
| 5.0.8 | 2020-01-30 | typescript typings fix cpuCurrentSpeed |
| 5.0.7 | 2020-01-29 | `fsSize()` available fixed windows and typescript typings |
| 5.0.6 | 2020-01-28 | `osinfo()` added hypervisor (win only) |
| 5.0.5 | 2020-01-27 | `networkInterfaces()` type detection improved (win) |
| 5.0.4 | 2020-01-27 | `cpu()` improved manufacturer decoding (linux) |
| 5.0.3 | 2020-01-27 | `cpu()` fix virtualization, `wifi()` fix raspberry |
| 5.0.2 | 2020-01-26 | updated typescript typings |
| 5.0.1 | 2020-01-26 | code cleanup |
| 5.0.0 | 2020-01-26 | new major version 5 release |
| 4.34.9 | 2020-01-25 | `graphics()` virtual controller vram value fix (win) |
| 4.34.8 | 2020-01-25 | `graphics()` controller subDeviceId fix (win) |
| 4.34.7 | 2020-01-13 | `services()` improved service discovery (linux) |
| 4.34.6 | 2020-01-12 | `networkInterfaces()` catch errors |
| 4.34.5 | 2020-01-07 | `networkInterfaceDefault()` fixed CMD popup (windows) |
| 4.34.4 | 2020-01-06 | `system()` fixed vitrual catch error |
| 4.34.3 | 2020-01-06 | `graphics()` fixed non nvidia-smi controllers (win) |
| 4.34.2 | 2020-01-05 | `system()` uuid lowercase as in uuid() |
| 4.34.1 | 2020-01-05 | `graphics()` nvidia-smi detection improved |
| 4.34.0 | 2020-01-05 | `system()` added flag virtual |
| 4.33.8 | 2020-01-04 | `virtualBox()` fix issue windows host |
| 4.33.7 | 2020-01-04 | `graphics()` nvidia-smi detection improved |
| 5.6.8 | 2021-03-22 | typescript definitions fix `wifiInterfces()`, `wifiConnections()` |
| 5.6.7 | 2021-03-16 | `inetLatency()` `ineChecksite()` schema validation |
| 5.6.6 | 2021-03-16 | code refactoring |
| 5.6.5 | 2021-03-15 | `cpuTemperature()` fix (linux) |
| 5.6.4 | 2021-03-15 | `sanitizeShellString()` and other security improvements |
| 5.6.3 | 2021-03-14 | `sanitizeShellString()` improvement |
| 5.6.2 | 2021-03-10 | `networkInterfaces()` `cpu()` improvement (win) |
| 5.6.1 | 2021-03-03 | `get()` fixed issue boolean parameters |
| 5.6.0 | 2021-03-03 | `cpuTemperature()` added socket and chipset temp (linux) |
| 5.5.0 | 2021-02-25 | `dockerVolumes()` added |
| 5.4.0 | 2021-02-24 | `dockerImages()` added |
| 5.3.5 | 2021-02-23 | `dockerContainerStats()` fixed parameter * |
| 5.3.4 | 2021-02-20 | `sanitizeShellString()` optimized strict sanitation |
| 5.3.3 | 2021-02-15 | `dockerContainerStats()` fixed ID splitting |
| 5.3.2 | 2021-02-15 | `inetLatency()` `ineChecksite()` fixed possible security issue (file://) |
| 5.3.1 | 2021-02-14 | `inetLatency()` `ineChecksite()` `servcices()` `processes()` fixed possible security issue (arrays) |
| 5.3.0 | 2021-02-12 | `osInfo()` added remoteSession (windows) |
| 5.2.7 | 2021-02-12 | `fsStats()`, `blockDevices()` improved linux |
| 5.2.6 | 2021-02-12 | `inetLatency()` fixed possible DOS intrusion |
| 5.2.5 | 2021-02-11 | `processes()` fixed truncated params (linux) |
| 5.2.4 | 2021-02-11 | `currentLoad()` fixed issue |
| 5.2.3 | 2021-02-11 | `diskLayout()` added USB drives (mac OS) |
| 5.2.2 | 2021-02-11 | code cleanup, updated docs |
| 5.2.1 | 2021-02-10 | `system()` fixed issue virtual detect (linux) |
| 5.2.0 | 2021-02-10 | `wifiInterfces()` and `wifiConnections()` added |
| 5.1.2 | 2021-02-08 | fixed node 4 compatibility issue |
| 5.1.1 | 2021-02-08 | `baseboard()` added memMax, memSlots, smaller improvements Raspberry |
| 5.1.0 | 2021-02-08 | `memLayout()` added ECC flag, `bios()` added language, features (linux) |
| 5.0.11 | 2021-02-07 | `fsSize()` fixed windows WSL issue |
| 5.0.10 | 2021-02-06 | `getDynamicData()` fixed windows WSL issue |
| 5.0.9 | 2021-02-02 | `fsSize()` fixed parsing edge case issue mac OS |
| 5.0.8 | 2021-01-30 | typescript typings fix cpuCurrentSpeed |
| 5.0.7 | 2021-01-29 | `fsSize()` available fixed windows and typescript typings |
| 5.0.6 | 2021-01-28 | `osinfo()` added hypervisor (win only) |
| 5.0.5 | 2021-01-27 | `networkInterfaces()` type detection improved (win) |
| 5.0.4 | 2021-01-27 | `cpu()` improved manufacturer decoding (linux) |
| 5.0.3 | 2021-01-27 | `cpu()` fix virtualization, `wifi()` fix raspberry |
| 5.0.2 | 2021-01-26 | updated typescript typings |
| 5.0.1 | 2021-01-26 | code cleanup |
| 5.0.0 | 2021-01-26 | new major version 5 release |
| 4.34.9 | 2021-01-25 | `graphics()` virtual controller vram value fix (win) |
| 4.34.8 | 2021-01-25 | `graphics()` controller subDeviceId fix (win) |
| 4.34.7 | 2021-01-13 | `services()` improved service discovery (linux) |
| 4.34.6 | 2021-01-12 | `networkInterfaces()` catch errors |
| 4.34.5 | 2021-01-07 | `networkInterfaceDefault()` fixed CMD popup (windows) |
| 4.34.4 | 2021-01-06 | `system()` fixed vitrual catch error |
| 4.34.3 | 2021-01-06 | `graphics()` fixed non nvidia-smi controllers (win) |
| 4.34.2 | 2021-01-05 | `system()` uuid lowercase as in uuid() |
| 4.34.1 | 2021-01-05 | `graphics()` nvidia-smi detection improved |
| 4.34.0 | 2021-01-05 | `system()` added flag virtual |
| 4.33.8 | 2021-01-04 | `virtualBox()` fix issue windows host |
| 4.33.7 | 2021-01-04 | `graphics()` nvidia-smi detection improved |
| 4.33.6 | 2021-01-02 | `dockerContainerStats()` fix `tx` changed to `wx` as documented |
| 4.33.5 | 2020-12-30 | `graphics()` vram (nvidia-smi) |
| 4.33.4 | 2020-12-28 | `typescript` typings fix |

View File

@ -30,7 +30,7 @@
[![Sponsoring][sponsor-badge]][sponsor-url]
[![MIT license][license-img]][license-url]
This is amazing. Started as a small project just for myself, it now has > 10,000 lines of code, > 400 versions published, > 3 mio downloads per month, > 30 mio downloads overall. Thank you to all who contributed to this project!
This is amazing. Started as a small project just for myself, it now has > 10,000 lines of code, > 400 versions published, up to 3 mio downloads per month, > 30 mio downloads overall. Thank you to all who contributed to this project!
## New Version 5.0
@ -40,6 +40,7 @@ This next major version release 5.0 comes with new functionality and several imp
- added audio: get detailed audio device information
- added bluetooth: get detailed bluetooth device information
- added dockerImages, dockerVolumes: get detailed information about docker images and volumes
- added printer: get information from detected printers
- added usb: get detailed usb controller and device information
- added wifi interfaces ans connections: extended wifi information
@ -102,14 +103,13 @@ si.cpu()
(last 7 major and minor version releases)
- Version 5.6.0: `cpuTemperature()` added added socket and chipset temp (linux)
- Version 5.5.0: `dockerVolumes()` added
- Version 5.4.0: `dockerImages()` added
- Version 5.3.0: `osInfo()` added remoteSession (win only)
- Version 5.2.0: `wifiInterfaces()` and `wifiConnections()` added
- Version 5.1.0: `memLayout()` added ECC flag, `bios()` added language, features (linux)
- Version 5.0.0: new version 5 - attention there are some breaking changes. See [detailed version 5 changes here][changes5-url].
- Version 4.34.0: `system()` added flag virtual (linux, windows)
- Version 4.33.0: `graphics()` added nvidia-smi support (linux, windows)
- Version 4.32.0: `graphics()` added clinfo support (linux)
- Version 4.31.0: `osInfo()` added FQDN
- ...
You can find all changes here: [detailed changelog][changelog-url]
@ -223,6 +223,8 @@ Full function reference with examples can be found at [https://systeminformation
| | main | X | X | X | X | | main temperature (avg) |
| | cores | X | X | X | X | | array of temperatures |
| | max | X | X | X | X | | max temperature |
| | socket | X | | | | | array socket temperatures |
| | chipset | X | | | | | chipset temperature |
#### 4. Memory
@ -668,6 +670,25 @@ Full function reference with examples can be found at [https://systeminformation
| | isolation | X | X | X | X | X | isolation |
| | initBinary | X | X | X | X | X | init binary |
| | productLicense | X | X | X | X | X | product license |
| si.dockerImages(all, cb) | [{...}] | X | X | X | X | X | returns array of top level/all docker images |
| | [0].id | X | X | X | X | X | image ID |
| | [0].container | X | X | X | X | X | container ID |
| | [0].comment | X | X | X | X | X | comment |
| | [0].os | X | X | X | X | X | OS |
| | [0].architecture | X | X | X | X | X | architecture |
| | [0].parent | X | X | X | X | X | parent ID |
| | [0].dockerVersion | X | X | X | X | X | docker version |
| | [0].size | X | X | X | X | X | image size |
| | [0].sharedSize | X | X | X | X | X | shared size |
| | [0].virtualSize | X | X | X | X | X | virtual size |
| | [0].author | X | X | X | X | X | author |
| | [0].created | X | X | X | X | X | created date / time |
| | [0].containerConfig | X | X | X | X | X | container config object |
| | [0].graphDriver | X | X | X | X | X | graph driver object |
| | [0].repoDigests | X | X | X | X | X | repo digests array |
| | [0].repoTags | X | X | X | X | X | repo tags array |
| | [0].config | X | X | X | X | X | config object |
| | [0].rootFS | X | X | X | X | X | root fs object |
| si.dockerContainers(all, cb) | [{...}] | X | X | X | X | X | returns array of active/all docker containers |
| | [0].id | X | X | X | X | X | ID of container |
| | [0].name | X | X | X | X | X | name of container |
@ -713,6 +734,14 @@ Full function reference with examples can be found at [https://systeminformation
| | [0].rss | X | X | X | X | X | resident set size |
| | [0].vsz | X | X | X | X | X | virtual size in Kbytes |
| | [0].command | X | X | X | X | X | command and arguments |
| si.dockerVolumes(cb) | [{...}] | returns array of all docker volumes |
| | [0].name | X | X | X | X | X | volume name |
| | [0].driver | X | X | X | X | X | driver |
| | [0].labels | X | X | X | X | X | labels object |
| | [0].mountpoint | X | X | X | X | X | mountpoint |
| | [0].options | X | X | X | X | X | options |
| | [0].scope | X | X | X | X | X | scope |
| | [0].created | X | X | X | X | X | created at |
| si.dockerAll(cb) | {...} | X | X | X | X | X | list of all containers including their stats<br>and processes in one single array |
#### 17. Virtual Box

View File

@ -173,6 +173,7 @@
<li><span class="code">cpu()</span>: extended socket list (win)</li>
<li><span class="code">cpu()</span>: added <span class="code">virtualization</span> if cpu supports virtualization</li>
<li><span class="code">cpu()</span>: now <span class="code">flags</span> are part of this function</li>
<li><span class="code">cpuTemperature()</span>: added socket and chipset temperature (linux)</li>
<li><span class="code">fsSize()</span>: added <span class="code">available</span></li>
<li><span class="code">fsSize()</span>: improved calculation of <span class="code">used</span></li>
<li><span class="code">getData()</span>: support for passing parameters and filters (see <a href="general.html">section General / getData</a>)</li>

View File

@ -545,6 +545,26 @@ si.cpuCurrentSpeed().then(data => console.log(data));</code></pre class="example
<td></td>
<td>max temperature</td>
</tr>
<tr>
<td></td>
<td>socket</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>array socket temperatures</td>
</tr>
<tr>
<td></td>
<td>chipset</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>chipset temperature</td>
</tr>
<tr class="example">
<td></td>
<td colspan="7">
@ -552,7 +572,16 @@ si.cpuCurrentSpeed().then(data => console.log(data));</code></pre class="example
<pre><code class="js">const si = require('systeminformation');
si.cpuTemperature().then(data => console.log(data));</code></pre class="example">
<pre class="example">
{ main: 42, cores: [], max: 42 }
{
main: 42,
cores: [
34, 35, 33, 32,
37, 32, 35, 33
],
max: 42,
socket: [ 16.8, 27.8 ],
chipset: 49
}
</pre>
</tr>
</tbody>

View File

@ -47,7 +47,7 @@
<div class="col-12 sectionheader">
<div class="title">Docker</div>
<div class="text">
<p>In this section you will learn how to get information about docker containers, stats and processes inside a docker container:</p>
<p>In this section you will learn how to get information about docker, images, containers, container stats and processes inside a docker container:</p>
<p>For function reference and examples we assume, that we imported <span class="code">systeminformation</span> as follows:</p>
<pre><code class="js">const si = require('systeminformation');</code></pre>
<h2>Container, Stats, Processes</h2>
@ -536,6 +536,196 @@
<td>X</td>
<td>product license</td>
</tr>
<tr>
<td>si.dockerImages(all, cb)</td>
<td>[{...}]</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>returns array of top level/all docker images</td>
</tr>
<tr>
<td></td>
<td>[0].id</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>image ID</td>
</tr>
<tr>
<td></td>
<td>[0].container</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>container ID</td>
</tr>
<tr>
<td></td>
<td>[0].comment</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>comment</td>
</tr>
<tr>
<td></td>
<td>[0].os</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>OS</td>
</tr>
<tr>
<td></td>
<td>[0].architecture</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>architecture</td>
</tr>
<tr>
<td></td>
<td>[0].parent</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>parent ID</td>
</tr>
<tr>
<td></td>
<td>[0].dockerVersion</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>docker version</td>
</tr>
<tr>
<td></td>
<td>[0].size</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>image size</td>
</tr>
<tr>
<td></td>
<td>[0].sharedSize</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>shared size</td>
</tr>
<tr>
<td></td>
<td>[0].virtualSize</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>virtual size</td>
</tr>
<tr>
<td></td>
<td>[0].author</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>author</td>
</tr>
<tr>
<td></td>
<td>[0].created</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>created date / time</td>
</tr>
<tr>
<td></td>
<td>[0].containerConfig</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>container config object</td>
</tr>
<tr>
<td></td>
<td>[0].graphDriver</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>graph driver object</td>
</tr>
<tr>
<td></td>
<td>[0].repoDigests</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>repo digests array</td>
</tr>
<tr>
<td></td>
<td>[0].repoTags</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>repo tags array</td>
</tr>
<tr>
<td></td>
<td>[0].config</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>config object</td>
</tr>
<tr>
<td></td>
<td>[0].rootFS</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>root fs object</td>
</tr>
<tr>
<td>si.dockerContainers(all, cb)</td>
<td>[{...}]</td>
@ -728,7 +918,7 @@
</tr>
<tr>
<td></td>
<td>id</td>
<td>[0].id</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -738,7 +928,7 @@
</tr>
<tr>
<td></td>
<td>memUsage</td>
<td>[0].memUsage</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -748,7 +938,7 @@
</tr>
<tr>
<td></td>
<td>memLimit</td>
<td>[0].memLimit</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -758,7 +948,7 @@
</tr>
<tr>
<td></td>
<td>memPercent</td>
<td>[0].memPercent</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -768,7 +958,7 @@
</tr>
<tr>
<td></td>
<td>cpuPercent</td>
<td>[0].cpuPercent</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -778,7 +968,7 @@
</tr>
<tr>
<td></td>
<td>pids</td>
<td>[0].pids</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -788,7 +978,7 @@
</tr>
<tr>
<td></td>
<td>netIO.rx</td>
<td>[0].netIO.rx</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -798,7 +988,7 @@
</tr>
<tr>
<td></td>
<td>netIO.wx</td>
<td>[0].netIO.wx</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -808,7 +998,7 @@
</tr>
<tr>
<td></td>
<td>blockIO.r</td>
<td>[0].blockIO.r</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -818,7 +1008,7 @@
</tr>
<tr>
<td></td>
<td>blockIO.w</td>
<td>[0].blockIO.w</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -828,7 +1018,7 @@
</tr>
<tr>
<td></td>
<td>restartCount</td>
<td>[0].restartCount</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -838,7 +1028,7 @@
</tr>
<tr>
<td></td>
<td>cpuStats</td>
<td>[0].cpuStats</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -848,7 +1038,7 @@
</tr>
<tr>
<td></td>
<td>precpuStats</td>
<td>[0].precpuStats</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -858,7 +1048,7 @@
</tr>
<tr>
<td></td>
<td>memoryStats</td>
<td>[0].memoryStats</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -868,7 +1058,7 @@
</tr>
<tr>
<td></td>
<td>networks</td>
<td>[0].networks</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -1026,6 +1216,87 @@
<td>X</td>
<td>command and arguments</td>
</tr>
<tr>
<td>si.dockerVolumes(cb)</td>
<td>[{...}]</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>returns array of docker volumes</td>
</tr>
<tr>
<td></td>
<td>[0].name</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>volume name</td>
</tr>
<tr>
<td></td>
<td>[0].driver</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>driver</td>
</tr>
<tr>
<td></td>
<td>[0].labels</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>labels object</td>
</tr>
<tr>
<td></td>
<td>[0].mountpoint</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>mountpoint</td>
</tr>
<tr>
<td></td>
<td>[0].options</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>options</td>
</tr>
<tr>
<td></td>
<td>[0].scope</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>scope</td>
</tr>
<tr>
<td></td>
<td>[0].created</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>created at</td>
</tr>
<tr>
<td>si.dockerAll(cb)</td>
<td>{...}</td>

View File

@ -56,199 +56,264 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.6.8</th>
<td>2021-03-23</td>
<td>typescript definitions fix wifiInterfces, wifiConnections</td>
</tr>
<tr>
<th scope="row">5.6.7</th>
<td>2021-03-16</td>
<td><span class="code">inetLatency()</span> <span class="code">inetChecksite()</span> schema avlidation</td>
</tr>
<tr>
<th scope="row">5.6.6</th>
<td>2021-03-16</td>
<td>code refactoring</td>
</tr>
<tr>
<th scope="row">5.6.5</th>
<td>2021-03-15</td>
<td><span class="code">cpuTemperature()</span> fix linux</td>
</tr>
<tr>
<th scope="row">5.6.4</th>
<td>2021-03-15</td>
<td><span class="code">sanitizeShellString()</span> and other security improvements</td>
</tr>
<tr>
<th scope="row">5.6.3</th>
<td>2021-03-14</td>
<td><span class="code">sanitizeShellString()</span> improvements</td>
</tr>
<tr>
<th scope="row">5.6.2</th>
<td>2021-03-10</td>
<td><span class="code">networkInterfaces(), cpu()</span> improvements (win)</td>
</tr>
<tr>
<th scope="row">5.6.1</th>
<td>2021-03-03</td>
<td><span class="code">get()</span> fixed issue boolean parameters</td>
</tr>
<tr>
<th scope="row">5.6.0</th>
<td>2021-03-03</td>
<td><span class="code">cpuTemperature()</span> added socket and chipset temp (linux)</td>
</tr>
<tr>
<th scope="row">5.5.0</th>
<td>2021-02-25</td>
<td><span class="code">dockerVolumes()</span> added</td>
</tr>
<tr>
<th scope="row">5.4.0</th>
<td>2021-02-24</td>
<td><span class="code">dockerImages()</span> added</td>
</tr>
<tr>
<th scope="row">5.3.5</th>
<td>2021-02-23</td>
<td><span class="code">dockerContainerStats()</span> fixed issue parameter *</td>
</tr>
<tr>
<th scope="row">5.3.4</th>
<td>2021-02-20</td>
<td><span class="code">sanitizeShellString()</span> optimized strict sanitation</td>
</tr>
<tr>
<th scope="row">5.3.3</th>
<td>2020-02-15</td>
<td>2021-02-15</td>
<td><span class="code">dockerContainerStats()</span> fix correct ID splitting</td>
</tr>
<tr>
<th scope="row">5.3.2</th>
<td>2020-02-15</td>
<td>2021-02-15</td>
<td><span class="code">inetLatency()</span> <span class="code">inetChecksite()</span> fix possible security issue (file://)</td>
</tr>
<tr>
<th scope="row">5.3.1</th>
<td>2020-02-14</td>
<td>2021-02-14</td>
<td><span class="code">inetLatency()</span> <span class="code">inetChecksite()</span> <span class="code">services()</span> <span class="code">processLoad()</span> fix possible security issue</td>
</tr>
<tr>
<th scope="row">5.3.0</th>
<td>2020-02-12</td>
<td>2021-02-12</td>
<td><span class="code">osInfo()</span> added remoteSession (windows)</td>
</tr>
<tr>
<th scope="row">5.2.7</th>
<td>2020-02-12</td>
<td>2021-02-12</td>
<td><span class="code">fsStats()</span> and <span class="code">blockdevices()</span> improvements (linux)</td>
</tr>
<tr>
<th scope="row">5.2.6</th>
<td>2020-02-12</td>
<td>2021-02-12</td>
<td><span class="code">inetLatency()</span> fix DOS vulnerability</td>
</tr>
<tr>
<th scope="row">5.2.5</th>
<td>2020-02-11</td>
<td>2021-02-11</td>
<td><span class="code">processes()</span> fix truncated params (linux)</td>
</tr>
<tr>
<th scope="row">5.2.4</th>
<td>2020-02-11</td>
<td>2021-02-11</td>
<td><span class="code">currentLoad()</span> fix issue</td>
</tr>
<tr>
<th scope="row">5.2.3</th>
<td>2020-02-11</td>
<td>2021-02-11</td>
<td><span class="code">diskLayout()</span> added USB drives (mac OS)</td>
</tr>
<tr>
<th scope="row">5.2.2</th>
<td>2020-02-11</td>
<td>2021-02-11</td>
<td>code cleanup, updated docs</td>
</tr>
<tr>
<th scope="row">5.2.1</th>
<td>2020-02-10</td>
<td>2021-02-10</td>
<td><span class="code">system()</span> fixed issue virtual detect (linux)</td>
</tr>
<tr>
<th scope="row">5.2.0</th>
<td>2020-02-10</td>
<td>2021-02-10</td>
<td><span class="code">wifiInterfces()</span> and <span class="code">wifiConnections()</span> added</td>
</tr>
<tr>
<th scope="row">5.1.2</th>
<td>2020-02-08</td>
<td>2021-02-08</td>
<td>fixed node 4 compatibility issue</td>
</tr>
<tr>
<th scope="row">5.1.1</th>
<td>2020-02-08</td>
<td>2021-02-08</td>
<td><span class="code">baseboard()</span> added memMax, memSlots</td>
</tr>
<tr>
<th scope="row">5.1.0</th>
<td>2020-02-08</td>
<td>2021-02-08</td>
<td><span class="code">memLayout()</span> added ECC flag, <span class="code">bios()</span> added language, features (linux)</td>
</tr>
<tr>
<th scope="row">5.0.11</th>
<td>2020-02-07</td>
<td>2021-02-07</td>
<td><span class="code">fsSize()</span> windows WSL fix</td>
</tr>
<tr>
<th scope="row">5.0.10</th>
<td>2020-02-06</td>
<td>2021-02-06</td>
<td><span class="code">getDynamicData()</span> windows WSL fix</td>
</tr>
<tr>
<th scope="row">5.0.9</th>
<td>2020-02-02</td>
<td>2021-02-02</td>
<td><span class="code">fsSize()</span> fixed parsing edge case issue mac OS</td>
</tr>
<tr>
<th scope="row">5.0.8</th>
<td>2020-01-30</td>
<td>2021-01-30</td>
<td>typescript typings fix cpuCurrentSpeed</td>
</tr>
<tr>
<th scope="row">5.0.7</th>
<td>2020-01-29</td>
<td>2021-01-29</td>
<td><span class="code">fsSize()</span> available fixed windows and typescript typings</td>
</tr>
<tr>
<th scope="row">5.0.6</th>
<td>2020-01-28</td>
<td>2021-01-28</td>
<td><span class="code">osInfo()</span> added hypervisor (win only)</td>
</tr>
<tr>
<th scope="row">5.0.5</th>
<td>2020-01-27</td>
<td>2021-01-27</td>
<td><span class="code">networkInterfaces()</span> type detection improved (win)</td>
</tr>
<tr>
<th scope="row">5.0.4</th>
<td>2020-01-27</td>
<td>2021-01-27</td>
<td><span class="code">memoryLayout()</span> improved manufacturer decoding (linux)</td>
</tr>
<tr>
<th scope="row">5.0.3</th>
<td>2020-01-27</td>
<td>2021-01-27</td>
<td><span class="code">cpu()</span> fix virtualization, <span class="code">wifi()</span> fix raspberry</td>
</tr>
<tr>
<th scope="row">5.0.2</th>
<td>2020-01-26</td>
<td>2021-01-26</td>
<td>updated typescript typings</td>
</tr>
<tr>
<th scope="row">5.0.1</th>
<td>2020-01-26</td>
<td>2021-01-26</td>
<td>code cleanup</td>
</tr>
<tr>
<th scope="row">5.0.0</th>
<td>2020-01-26</td>
<td>2021-01-26</td>
<td>new major version 5 release</td>
</tr>
<tr>
<th scope="row">4.34.9</th>
<td>2020-01-25</td>
<td>2021-01-25</td>
<td><span class="code">graphics()</span> virtual controller vram value fix (win)</td>
</tr>
<tr>
<th scope="row">4.34.8</th>
<td>2020-01-25</td>
<td>2021-01-25</td>
<td><span class="code">graphics()</span> controller subDeviceId fix (win)</td>
</tr>
<tr>
<th scope="row">4.34.7</th>
<td>2020-01-13</td>
<td>2021-01-13</td>
<td><span class="code">services()</span> improved service discovery linux</td>
</tr>
<tr>
<th scope="row">4.34.6</th>
<td>2020-01-12</td>
<td>2021-01-12</td>
<td><span class="code">networkInterfaces()</span> catch errors</td>
</tr>
<tr>
<th scope="row">4.34.5</th>
<td>2020-01-07</td>
<td>2021-01-07</td>
<td><span class="code">networkInterfaceDefault()</span> fixed CMD popup (windows)</td>
</tr>
<tr>
<th scope="row">4.34.4</th>
<td>2020-01-06</td>
<td>2021-01-06</td>
<td><span class="code">system()</span> fixed vitrual catch error</td>
</tr>
<tr>
<th scope="row">4.34.3</th>
<td>2020-01-06</td>
<td>2021-01-06</td>
<td><span class="code">graphics()</span> issue non nvidia-smi controllers fixed (win)</td>
</tr>
<tr>
<th scope="row">4.34.2</th>
<td>2020-01-05</td>
<td>2021-01-05</td>
<td><span class="code">system()</span> uuid now lowercase - as in uuid()</td>
</tr>
<tr>
<th scope="row">4.34.1</th>
<td>2020-01-05</td>
<td>2021-01-05</td>
<td><span class="code">graphics()</span> nvidia-smi detection improved</td>
</tr>
<tr>
<th scope="row">4.34.0</th>
<td>2020-01-05</td>
<td>2021-01-05</td>
<td><span class="code">system()</span> added flag virtual</td>
</tr>
<tr>
<th scope="row">4.33.8</th>
<td>2020-01-04</td>
<td>2021-01-04</td>
<td><span class="code">virtualBox()</span> fix issue windows host</td>
</tr>
<tr>
<th scope="row">4.33.7</th>
<td>2020-01-04</td>
<td>2021-01-04</td>
<td><span class="code">graphics()</span> nvidia-smi detection improved</td>
</tr>
<tr>

View File

@ -166,11 +166,11 @@
<body>
<header class="bg-image-full">
<div class="top-container">
<a href="security.html" class="recommendation">Security advisory:<br>Update to v5.3.2</a>
<a href="security.html" class="recommendation">Security advisory:<br>Update to v5.6.4</a>
<img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.3.3</span></div>
<div class="version">New Version: <span id="version">5.6.8</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">
@ -192,6 +192,8 @@
<a href="https://lgtm.com/projects/g/sebhildebrandt/systeminformation/alerts" rel="nofollow"><img src="https://camo.githubusercontent.com/66428127fdde80fc8247a0c1df4c651f3a6b1c0a/68747470733a2f2f696d672e736869656c64732e696f2f6c67746d2f616c657274732f672f73656268696c64656272616e64742f73797374656d696e666f726d6174696f6e2e7376673f7374796c653d666c61742d737175617265" alt="Total alerts" data-canonical-src="https://img.shields.io/lgtm/alerts/g/sebhildebrandt/systeminformation.svg?style=flat-square" style="max-width:100%;"></a>
<a href="https://github.com/sebhildebrandt/systeminformation/blob/master/LICENSE"><img src="https://camo.githubusercontent.com/4b5966a2a252ee0f241a1e03b13417178eb4964f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265" alt="MIT license" data-canonical-src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" style="max-width:100%;"></a>
</div>
<div class="text larger"><span class="warning">Security issues:</span> Please have a look at our <a href="../security.html">security advisories</a>.</div>
</div>
</div>
<div class="row justify-content-center sectionheader index">
@ -201,7 +203,7 @@
</div>
<div class="row number-section">
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">13,833</div>
<div class="numbers">14,225</div>
<div class="title">Lines of code</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
@ -209,7 +211,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">387</div>
<div class="numbers">402</div>
<div class="title">Dependents</div>
</div>
</div>
@ -345,7 +347,7 @@
<div class="row">
<div class="col-12 sectionheader index">
<div class="title-small">Issues</div>
<div class="text"><span class="bold">Security issues</span>: Please have a look at our <a href="security.html">security advisories</a></div>
<div class="text"><span class="warning">Security issues:</span> We highly recomment to have a look at our <a href="security.html">security advisories</a></div>
<div class="text"><span class="bold">Having an issue</span>: If you run into problems, please check out <a href="issues.html">known issues page</a> first.<br>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></div>
</div>
</div>

View File

@ -65,6 +65,11 @@
<p>In some cases you need to install the linux <span class="code">sensors</span> package to be able to measure temperature e.g. on DEBIAN based systems by running</p>
<pre>$ sudo apt-get install lm-sensors</pre>
<h4>Windows, macOS - CPU Speed</h4>
<p><span class="code">node.js</span> and <span class="code">wmic</span> are not able to determine correct CPU current speed on windows and macOS.
This means, you will have constant values here on both platforms for all processor cores in <span class="code">cpuCurrentSpeed()</span>.</p>
<h4>Linux S.M.A.R.T. Status</h4>
<p>To be able to detect S.M.A.R.T. status on Linux you need to install <span class="code">smartmontools</span>. On DEBIAN based linux distributions you can install it by running:</p>

View File

@ -43,6 +43,28 @@
<div class="col-12 sectionheader">
<div class="title">Security Advisories</div>
<div class="text">
<h2>Passing User Paramters to Systeminformation</h2>
<p>For most of the applications that are using <span class="code">systeminformation</span>, there is no reason to worry. <span class="bold">But be aware!</span> If you are using <span class="code">inetLatency()</span>, <span class="code">inetChecksite()</span>, <span class="code">services()</span>, <span class="code">processLoad()</span> with arbitrary untrusted user input, you should pay extra attention! We are doing a lot of input sanitation for those functions inside this package but we cannot handle all cases!</p>
<p class="warning">This can lead to serious impact on your servers!</p>
<p>We highly recommend to always upgrade to the latest version of our package. We maintain security updates for version 5 AND also version 4. For version 4 you can install latest version by placing <span class="code">"systeminformation": "^4"</span> in your package.json (dependencies) and run <span class="code">npm install</span></p>
<h2>Command Injection Vulnerability</h2>
<p><span class="bold">Affected versions:</span>
&lt; 5.6.4 and &lt; 4.34.17<br>
<span class="bold">Date:</span> 2021-03-15<br>
<span class="bold">CVE indentifier</span> -
</p>
<h4>Impact</h4>
<p>We had an issue that there was a possibility to perform a potential command injection possibility by passing a manipulated string prototype as a parameter to the following functions. Affected commands: <span class="code">inetLatency()</span>, <span class="code">inetChecksite()</span>, <span class="code">services()</span>, <span class="code">processLoad()</span>.</p>
<h4>Patch</h4>
<p>Problem was fixed with additional parameter checking. Please upgrade to version >= 5.6.4 (or >= 4.34.17 if you are using version 4).</p>
<h4>Workarround</h4>
<p>If you cannot upgrade, be sure to check or sanitize parameter strings that are passed to <span class="code">inetLatency()</span>, <span class="code">inetChecksite()</span>, <span class="code">services()</span>, <span class="code">processLoad()</span> (string only)</p>
<hr>
<br>
<h2>Insufficient File Scheme Validation</h2>
<p><span class="bold">Affected versions:</span>
&lt; 5.3.2 and &lt; 4.34.12<br>
@ -64,7 +86,7 @@
<p><span class="bold">Affected versions:</span>
&lt; 5.3.1 and &lt; 4.34.11<br>
<span class="bold">Date:</span> 2021-02-14<br>
<span class="bold">CVE indentifier</span> -
<span class="bold">CVE indentifier</span> CVE-2021-21315
</p>
<h4>Impact</h4>

View File

@ -1,11 +1,11 @@
body {
font-family: 'Roboto', 'HelveticaNeue-Light','Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,sans-serif;
font-family: "Roboto", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 300;
min-height: 100%;
}
h1, h2, h3, h4 {
font-family: 'Roboto', 'HelveticaNeue-Light','Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,sans-serif;
font-family: "Roboto", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 500;
color: #3d5cb3;
}
@ -18,6 +18,16 @@ h1, h2, h3, h4 {
font-weight: 500;
}
.warning {
font-weight: 500;
color: #9c0101;
}
.larger {
margin-top: 10px;
font-size: 1.5rem !important;
}
.medium {
font-weight: 500;
}
@ -40,45 +50,24 @@ h1, h2, h3, h4 {
height: 100vh;
height: calc(var(--vh, 1vh) * 100);
opacity: 0.95;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
justify-content: center;
text-align: center;
width: 100% !important;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
flex-direction: column;
}
.bg-image-full .top-container {
text-align: center;
-ms-flex-item-align: center;
align-self: center;
display: -webkit-box;
display: -ms-flexbox;
align-self: center;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
justify-content: center;
flex-direction: column;
align-items: center;
flex-grow: 1;
overflow: hidden;
position: relative;
width: 100% !important;
}
.bg-image-full .recommendation {
position: absolute;
top: 30px;
@ -88,20 +77,17 @@ h1, h2, h3, h4 {
display: inline-block;
width: 280px;
text-align: center;
padding: .25em 0;
padding: 0.25em 0;
color: white;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
transform: rotate(45deg);
background: #971d1d;
font-size: 0.9rem;
}
@media only screen and (min-width: 420px) {
.bg-image-full .recommendation {
font-size: 1.0rem;
font-size: 1rem;
}
}
@media only screen and (min-width: 767px) {
.bg-image-full .recommendation {
font-size: 1.1rem;
@ -110,7 +96,6 @@ h1, h2, h3, h4 {
width: 330px;
}
}
@media only screen and (min-width: 1024px) {
.bg-image-full .recommendation {
width: 330px;
@ -120,11 +105,9 @@ h1, h2, h3, h4 {
font-size: 1.2rem;
}
}
.bg-image-full .recommendation:hover {
text-decoration: none;
}
.bg-image-full .title {
color: #fff;
padding-top: 10px;
@ -132,197 +115,164 @@ h1, h2, h3, h4 {
margin-bottom: 10px;
font-weight: 500;
}
@media only screen and (min-width: 374px) {
.bg-image-full .title {
font-size: 2.1rem;
}
}
@media only screen and (min-width: 420px) {
.bg-image-full .title {
font-size: 2.4rem;
}
}
@media only screen and (min-width: 767px) {
.bg-image-full .title {
font-size: 3.5rem;
}
}
@media only screen and (min-width: 1024px) {
.bg-image-full .title {
font-size: 4rem;
}
}
@media only screen and (min-width: 1200px) {
.bg-image-full .title {
font-size: 5rem;
}
}
@media only screen and (min-width: 1900px) {
.bg-image-full .title {
font-size: 6rem;
}
}
.bg-image-full .logo {
width: 100px;
}
@media only screen and (min-width: 420px) {
.bg-image-full .logo {
width: 120px;
}
}
@media only screen and (min-width: 767px) {
.bg-image-full .logo {
width: 160px;
}
}
@media only screen and (min-width: 1024px) {
.bg-image-full .logo {
width: 200px;
}
}
@media only screen and (min-width: 1900px) {
.bg-image-full .logo {
width: 250px;
}
}
.bg-image-full .subtitle {
text-align: center;
color: #bbb;
font-size: 0.78rem;
}
@media only screen and (min-width: 375px) {
.bg-image-full .subtitle {
font-size: 0.9rem;
}
}
@media only screen and (min-width: 420px) {
.bg-image-full .subtitle {
font-size: 1rem;
}
}
@media only screen and (min-width: 767px) {
.bg-image-full .subtitle {
font-size: 1.1rem;
}
}
@media only screen and (min-width: 1024px) {
.bg-image-full .subtitle {
font-size: 1.3rem;
}
}
@media only screen and (min-width: 1200px) {
.bg-image-full .subtitle {
font-size: 1.4rem;
}
}
@media only screen and (min-width: 1900px) {
.bg-image-full .subtitle {
font-size: 1.6rem;
}
}
.bg-image-full .text > a {
text-align: center;
color: #fff;
font-size: 0.9rem;
}
.bg-image-full .text > a:hover {
color: #aaa;
text-decoration: none;
}
@media only screen and (min-width: 375px) {
.bg-image-full .text > a {
font-size: 0.9rem;
}
}
@media only screen and (min-width: 420px) {
.bg-image-full .text > a {
font-size: 1rem;
}
}
@media only screen and (min-width: 767px) {
.bg-image-full .text > a {
font-size: 1rem;
}
}
@media only screen and (min-width: 1024px) {
.bg-image-full .text > a {
font-size: 1.1rem;
}
}
@media only screen and (min-width: 1200px) {
.bg-image-full .text > a {
font-size: 1.2rem;
}
}
@media only screen and (min-width: 1900px) {
.bg-image-full .text > a {
font-size: 1.5rem;
}
}
.bg-image-full .version {
text-align: center;
margin-bottom: 10px;
color: #fff;
font-size: .9rem;
font-size: 0.9rem;
}
@media only screen and (min-width: 420px) {
.bg-image-full .version {
font-size: .9rem;
font-size: 0.9rem;
}
}
@media only screen and (min-width: 768px) {
.bg-image-full .version {
font-size: 1rem;
}
}
@media only screen and (min-width: 1024px) {
.bg-image-full .version {
font-size: 1.1rem;
}
}
@media only screen and (min-width: 1200px) {
.bg-image-full .version {
font-size: 1.2rem;
}
}
@media only screen and (min-width: 1900px) {
.bg-image-full .version {
font-size: 1.5rem;
}
}
.bg-image-full .down {
text-align: center;
color: #fff;
@ -331,7 +281,6 @@ h1, h2, h3, h4 {
margin-bottom: 15px;
cursor: pointer;
}
.bg-image-full .down .caret {
font-size: 3rem;
}
@ -347,12 +296,10 @@ h1, h2, h3, h4 {
height: 65px;
position: relative;
}
.nav .logo {
width: 60px;
margin-top: 12px;
}
.nav .title {
display: none;
color: #fff;
@ -361,55 +308,45 @@ h1, h2, h3, h4 {
margin-top: 15px;
font-weight: 500;
}
@media only screen and (min-width: 767px) {
.nav .title {
display: inline-block;
}
}
@media only screen and (min-width: 1024px) {
.nav .title {
font-size: 1.5rem;
}
}
.nav .text {
margin-top: 18px;
}
.nav .text a {
color: #fff;
margin-top: 12px;
font-size: 1.0rem;
font-size: 1rem;
}
@media only screen and (min-width: 1023px) {
.nav .text a {
margin-top: 10px;
font-size: 1.2rem;
}
}
.nav .text a:hover {
color: #aaa;
text-decoration: none;
}
.nav .github {
display: none;
}
@media only screen and (min-width: 768px) {
.nav .github {
display: inline-block;
}
}
.nav .todocs {
display: inline-block;
}
@media only screen and (min-width: 768px) {
.nav .todocs {
display: none;
@ -420,51 +357,42 @@ h1, h2, h3, h4 {
text-align: center;
color: #333;
}
.features .inner {
padding: 10px 0px;
}
@media only screen and (min-width: 768px) {
.features .inner {
padding: 15px 20px;
}
}
.features .inner .icons {
display: block;
font-size: 3rem;
line-height: 1.3;
color: #bbb;
}
@media only screen and (min-width: 420px) {
.features .inner .icons {
font-size: 3.5rem;
}
}
@media only screen and (min-width: 768px) {
.features .inner .icons {
font-size: 4rem;
}
}
@media only screen and (min-width: 1024px) {
.features .inner .icons {
font-size: 5rem;
}
}
.features .inner .icontitle {
font-size: 1.2rem;
}
.features .inner:hover {
background: #f4f4f4;
color: #567adf;
}
.features .inner:hover .icons {
color: #567adf;
}
@ -476,13 +404,11 @@ h1, h2, h3, h4 {
font-weight: 500;
color: #3d5cb3;
}
@media only screen and (min-width: 420px) {
.sectionheader .title {
font-size: 2.3rem;
}
}
@media only screen and (min-width: 768px) {
.sectionheader .title {
text-align: left;
@ -490,27 +416,23 @@ h1, h2, h3, h4 {
font-size: 2.6rem;
}
}
@media only screen and (min-width: 1024px) {
.sectionheader .title {
padding-top: 40px;
font-size: 3rem;
}
}
.sectionheader .title-small {
text-align: center;
font-size: 1.4rem;
font-weight: 500;
color: #3d5cb3;
}
@media only screen and (min-width: 420px) {
.sectionheader .title-small {
font-size: 1.6rem;
}
}
@media only screen and (min-width: 768px) {
.sectionheader .title-small {
text-align: left;
@ -518,53 +440,44 @@ h1, h2, h3, h4 {
font-size: 1.8rem;
}
}
@media only screen and (min-width: 1024px) {
.sectionheader .title-small {
padding-top: 30px;
font-size: 2rem;
}
}
.sectionheader .subtitle {
text-align: center;
font-size: .9rem;
font-size: 0.9rem;
}
@media only screen and (min-width: 420px) {
.sectionheader .subtitle {
font-size: 1rem;
}
}
@media only screen and (min-width: 768px) {
.sectionheader .subtitle {
text-align: left;
font-size: 1.1rem;
}
}
@media only screen and (min-width: 1024px) {
.sectionheader .subtitle {
font-size: 1.3rem;
}
}
.sectionheader .npmicons {
text-align: center;
}
.sectionheader .text {
text-align: center;
padding-top: 10px;
}
@media only screen and (min-width: 768px) {
.sectionheader .text {
text-align: left;
}
}
.sectionheader hr {
margin-top: 40px;
margin-bottom: 0px;
@ -574,19 +487,15 @@ h1, h2, h3, h4 {
.index {
margin: 0 0 10px 0;
}
.index .text, .index .subtitle, .index .title, .index .title-small, .index .npmicons {
text-align: center;
}
.index .larger {
font-size: 1.2rem;
}
.index a {
text-decoration: none;
}
.index a:hover {
text-decoration: none;
color: #567adf;
@ -608,34 +517,28 @@ ul {
margin-top: 40px;
text-align: center;
}
.number-section .numbers {
font-size: 2rem;
}
@media only screen and (min-width: 420px) {
.number-section .numbers {
font-size: 2.4rem;
}
}
@media only screen and (min-width: 768px) {
.number-section .numbers {
font-size: 2.8rem;
}
}
.number-section .title {
color: #999;
font-size: 1rem;
}
@media only screen and (min-width: 420px) {
.number-section .title {
font-size: 1.1rem;
}
}
@media only screen and (min-width: 768px) {
.number-section .title {
font-size: 1.2rem;
@ -645,60 +548,49 @@ ul {
.menu {
display: none;
}
@media only screen and (min-width: 768px) {
.menu {
margin-top: 30px;
display: inline-block;
}
}
.menu .title {
margin: 25px 0 5px 0;
color: #000;
}
.menu .title a {
width: 100%;
color: #000;
text-decoration: none;
}
.menu .title a:hover {
color: #567adf;
}
.menu .title .navtitle {
font-size: 1.3rem;
margin-bottom: 5px;
display: inline-block;
color: #3d5cb3;
}
.menu hr {
margin: 5px 0;
}
.menu ul {
list-style-type: none;
margin: 0;
padding: 0;
}
.menu ul li {
padding: 2px 0 1px 0;
}
.menu ul li a {
width: 100%;
color: #666;
text-decoration: none;
}
.menu ul li a:hover {
color: #567adf;
}
.menu ul li.active > a {
color: #567adf;
font-weight: 500;
@ -734,20 +626,16 @@ pre {
.example td:first-child {
background-color: #fff !important;
}
.example td:last-child {
background-color: #f8faff !important;
}
.example h5 {
padding-top: 5px;
padding-left: 10px;
}
.example pre {
background-color: unset;
}
.example pre .js {
background-color: #f0f0f4;
}
@ -759,22 +647,17 @@ footer {
padding-bottom: 30px;
position: relative;
}
footer .home {
color: #3d5cb3;
font-size: 1.1rem;
}
footer a {
color: #000;
}
footer a:hover {
text-decoration: none;
}
footer .badge {
color: #fff;
font-size: 0.9rem;
}
/*# sourceMappingURL=styles.css.map */
}/*# sourceMappingURL=styles.css.map */

File diff suppressed because one or more lines are too long

View File

@ -14,6 +14,14 @@ h1, h2, h3, h4 {
.bold {
font-weight: 500;
}
.warning {
font-weight: 500;
color: rgb(156, 1, 1);
}
.larger {
margin-top: 10px;
font-size: 1.5rem !important;
}
.medium {
font-weight: 500;
}

View File

@ -62,20 +62,21 @@
<pre><code class="js">SYSTEMINFORMATION - Test Scripts - Version: 5.x.y
═══════════════════════════════════════════════════════════
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ a ... Audio h ... Bluetooth s ... Services Y ... Battery ? ... Get Object │
│ b ... BIOS i ... INET Latency S ... Shell z ... Users , ... All Static │
│ B ... Baseboard I ... INET Check Site t ... time 1 ... NET Iface Default . ... All Dynamic │
│ C ... Chassis j ... CPU Current Speed T ... CPU Temperature 2 ... NET Gateway Default / ... All │
│ c ... CPU l ... CPU Current Load u ... USB 3 ... NET Interfaces │
│ d ... DiskLayout L ... Full Load U ... UUID 4 ... NET Stats │
│ D ... DiskIO m ... Memory v ... Versions 5 ... NET Connections │
│ e ... Block Devices M ... MEM Layout V ... Virtual Box 6 ... Docker Info │
│ E ... Open Files o ... OS Info w ... WIFI networks 7 ... Docker Container │
│ f ... FS Size p ... Processes W ... WIFI interfaces 8 ... Docker Cont Stats │
│ F ... FS Stats P ... Process Load x ... WIFI connections 9 ... Docker Cont Proc │
│ g ... Graphics r ... Printer y ... System 0 ... Docker All q >>> QUIT │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘</code></pre>
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ a ... Audio i ... INET Latency t ... time 1 ... NET Iface Default ? ... Get Object │
│ b ... BIOS I ... INET Check Site T ... CPU Temperature 2 ... NET Gateway Default , ... All Static │
│ B ... Baseboard j ... CPU Current Speed u ... USB 3 ... NET Interfaces . ... All Dynamic │
│ C ... Chassis l ... CPU Current Load U ... UUID 4 ... NET Stats / ... All │
│ c ... CPU L ... Full Load v ... Versions 5 ... NET Connections │
│ d ... DiskLayout m ... Memory V ... Virtual Box │
│ D ... DiskIO M ... MEM Layout w ... WIFI networks │
│ e ... Block Devices o ... OS Info W ... WIFI interfaces │
│ E ... Open Files p ... Processes x ... WIFI connections 6 ... Docker Info │
│ f ... FS Size P ... Process Load y ... System 7 ... Docker Images │
│ F ... FS Stats r ... Printer Y ... Battery 8 ... Docker Container │
│ g ... Graphics s ... Services z ... Users 9 ... Docker Cont Stats │
│ h ... Bluetooth S ... Shell 0 ... Docker Cont Proc q >>> QUIT │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘</code></pre>
<p><span class="bold">Press q</span> to exit the test suite</p>
<p>Here a sample output for the e.g. <span class="bold">c ... CPU</span></p>
<pre><code class="js">┌────────────────────────────────────────────────┐

View File

@ -727,7 +727,7 @@
</tr>
<tr>
<td></td>
<td>id</td>
<td>[0].id</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -737,7 +737,7 @@
</tr>
<tr>
<td></td>
<td>mem_usage</td>
<td>[0].mem_usage</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -747,7 +747,7 @@
</tr>
<tr>
<td></td>
<td>mem_limit</td>
<td>[0].mem_limit</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -757,7 +757,7 @@
</tr>
<tr>
<td></td>
<td>mem_percent</td>
<td>[0].mem_percent</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -767,7 +767,7 @@
</tr>
<tr>
<td></td>
<td>cpu_percent</td>
<td>[0].cpu_percent</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -777,7 +777,7 @@
</tr>
<tr>
<td></td>
<td>pids</td>
<td>[0].pids</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -787,7 +787,7 @@
</tr>
<tr>
<td></td>
<td>netIO.rx</td>
<td>[0].netIO.rx</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -797,7 +797,7 @@
</tr>
<tr>
<td></td>
<td>netIO.wx</td>
<td>[0].netIO.wx</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -807,7 +807,7 @@
</tr>
<tr>
<td></td>
<td>blockIO.r</td>
<td>[0].blockIO.r</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -817,7 +817,7 @@
</tr>
<tr>
<td></td>
<td>blockIO.w</td>
<td>[0].blockIO.w</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -827,7 +827,7 @@
</tr>
<tr>
<td></td>
<td>restartCount</td>
<td>[0].restartCount</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -837,7 +837,7 @@
</tr>
<tr>
<td></td>
<td>cpu_stats</td>
<td>[0].cpu_stats</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -847,7 +847,7 @@
</tr>
<tr>
<td></td>
<td>percpu_stats</td>
<td>[0].percpu_stats</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -857,7 +857,7 @@
</tr>
<tr>
<td></td>
<td>memory_stats</td>
<td>[0].memory_stats</td>
<td>X</td>
<td>X</td>
<td>X</td>
@ -867,7 +867,7 @@
</tr>
<tr>
<td></td>
<td>networks</td>
<td>[0].networks</td>
<td>X</td>
<td>X</td>
<td>X</td>

View File

@ -83,6 +83,41 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">4.34.19</th>
<td>2021-03-16</td>
<td><span class="code">inetLatency()</span> <span class="code">inetChecksite()</span> schema avlidation</td>
</tr>
<tr>
<th scope="row">4.34.18</th>
<td>2021-03-16</td>
<td>code refactoring</td>
</tr>
<tr>
<th scope="row">4.34.17</th>
<td>2021-03-14</td>
<td><span class="code">sanitizeShellString()</span> and other security improvements</td>
</tr>
<tr>
<th scope="row">4.34.16</th>
<td>2021-03-14</td>
<td><span class="code">sanitizeShellString()</span> improvements</td>
</tr>
<tr>
<th scope="row">4.34.15</th>
<td>2020-02-23</td>
<td><span class="code">dockerContainerStats()</span> fixed issue parameter *</td>
</tr>
<tr>
<th scope="row">4.34.14</th>
<td>2020-02-20</td>
<td><span class="code">sanitizeShellString()</span> optimized strict sanitation</td>
</tr>
<tr>
<th scope="row">4.34.13</th>
<td>2020-02-15</td>
<td><span class="code">dockerContainerStats()</span> fix correct ID splitting</td>
</tr>
<tr>
<th scope="row">4.34.12</th>
<td>2020-02-15</td>

View File

@ -165,12 +165,12 @@
<body>
<header class="bg-image-full">
<div class="container">
<a href="security.html" class="recommendation">Security advisory:<br>Update to v4.34.11</a>
<a href="security.html" class="recommendation">Security advisory:<br>Update to v4.34.17</a>
<img class="logo" src="assets/logo.png">
<div class="title">systeminformation </div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version larger">Version 4 documentation</div>
<div class="version">Current Version: <span id="version">4.34.12</span></div>
<div class="version">Current Version: <span id="version">4.34.19</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">
@ -192,6 +192,8 @@
<a href="https://lgtm.com/projects/g/sebhildebrandt/systeminformation/alerts" rel="nofollow"><img src="https://camo.githubusercontent.com/66428127fdde80fc8247a0c1df4c651f3a6b1c0a/68747470733a2f2f696d672e736869656c64732e696f2f6c67746d2f616c657274732f672f73656268696c64656272616e64742f73797374656d696e666f726d6174696f6e2e7376673f7374796c653d666c61742d737175617265" alt="Total alerts" data-canonical-src="https://img.shields.io/lgtm/alerts/g/sebhildebrandt/systeminformation.svg?style=flat-square" style="max-width:100%;"></a>
<a href="https://github.com/sebhildebrandt/systeminformation/blob/master/LICENSE"><img src="https://camo.githubusercontent.com/4b5966a2a252ee0f241a1e03b13417178eb4964f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265" alt="MIT license" data-canonical-src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" style="max-width:100%;"></a>
</div>
<div class="text"><span class="bold">Version 4 maintenance</span>: We are still maintaining version 4 and providing especially fixes to security issues and other important fixes. New functionality is only added to the new version 5, so please consider upgrading to version 5 soon. <span class="bold">Version 5 is NOT fully backward compatible to version 4!</span> Be aware, there are some breaking changes. Please refer to the <a href="../changes.html">Version 5 - Changes</a> page to see a full documentation of all changes you should have a look on.</div>
<div class="text larger"><span class="bold">Version 5 documentation</span> can be found <a href="../index.html">here</a>.</div>
</div>
</div>
<div class="row justify-content-center sectionheader index">
@ -318,11 +320,8 @@
<div class="row">
<div class="col-12 sectionheader index">
<div class="title-small">Issues</div>
<div class="text"><span class="bold">Security issues</span>: Please have a look at our <a href="security.html">security advisories</a></div>
<div class="text"><span class="warning">Security issues</span>: Please have a look at our <a href="security.html">security advisories</a></div>
<div class="text">If you run into problems, please check out <a href="issues.html">known issues page</a> first. 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></div>
<div class="title-small">Upcoming ...</div>
<div class="text"><span class="bold">MacOS on ARM</span> - new hardware already arrived and we made quite a few changes to support Apple silicon M1 chips. <a href="https://github.com/sebhildebrandt/systeminformation/issues/453">Current status is documented here.</a><br /></div>
<div class="text"><span class="bold">Verion 5:</span> We are planning a new major version with some minor breaking changes and some additional features. We will try to make this available Q1 of 2021.<br /><br /></div>
</div>
</div>
</section>

View File

@ -64,6 +64,11 @@
<p>In some cases you need to install the linux <span class="code">sensors</span> package to be able to measure temperature e.g. on DEBIAN based systems by running</p>
<pre>$ sudo apt-get install lm-sensors</pre>
<h4>Windows, macOS - CPU Speed</h4>
<p><span class="code">node.js</span> and <span class="code">wmic</span> are not able to determine correct CPU current speed on windows and macOS.
This means, you will have constant values here on both platforms for all processor cores in <span class="code">cpuCurrentSpeed()</span>.</p>
<h4>Linux S.M.A.R.T. Status</h4>
<p>To be able to detect S.M.A.R.T. status on Linux you need to install <span class="code">smartmontools</span>. On DEBIAN based linux distributions you can install it by running:</p>

View File

@ -42,6 +42,28 @@
<div class="col-12 sectionheader">
<div class="title">Security Advisories</div>
<div class="text">
<h2>Passing User Paramters to Systeminformation</h2>
<p>For most of the applications that are using <span class="code">systeminformation</span>, there is no reason to worry. <span class="bold">But be aware!</span> If you are using <span class="code">inetLatency()</span>, <span class="code">inetChecksite()</span>, <span class="code">services()</span>, <span class="code">processLoad()</span> with arbitrary untrusted user input, you should pay extra attention! We are doing a lot of input sanitation for those functions inside this package but we cannot handle all cases!</p>
<p class="warning">This can lead to serious impact on your servers!</p>
<p>We highly recommend to always upgrade to the latest version of our package. We maintain security updates for version 5 AND also version 4. For version 4 you can install latest version by placing <span class="code">"systeminformation": "^4"</span> in your package.json (dependencies) and run <span class="code">npm install</span></p>
<h2>Command Injection Vulnerability</h2>
<p><span class="bold">Affected versions:</span>
&lt; 4.34.17<br>
<span class="bold">Date:</span> 2021-03-15<br>
<span class="bold">CVE indentifier</span> -
</p>
<h4>Impact</h4>
<p>We had an issue that there was a possibility to perform a potential command injection possibility by passing a manipulated string prototype as a parameter to the following functions. Affected commands: <span class="code">inetLatency()</span>, <span class="code">inetChecksite()</span>, <span class="code">services()</span>, <span class="code">processLoad()</span>.</p>
<h4>Patch</h4>
<p>Problem was fixed with additional parameter checking. Please upgrade to version >= 4.34.17 if you are using version 4.</p>
<h4>Workarround</h4>
<p>If you cannot upgrade, be sure to check or sanitize parameter strings that are passed to <span class="code">inetLatency()</span>, <span class="code">inetChecksite()</span>, <span class="code">services()</span>, <span class="code">processLoad()</span> (string only)</p>
<hr>
<br>
<h2>Insufficient File Scheme Validation</h2>
<p><span class="bold">Affected versions:</span>
4.34.12<br>
@ -63,7 +85,7 @@
<p><span class="bold">Affected versions:</span>
&lt; 4.34.11<br>
<span class="bold">Date:</span> 2021-02-14<br>
<span class="bold">CVE indentifier</span> -
<span class="bold">CVE indentifier</span> CVE-2021-21315
</p>
<h4>Impact</h4>

View File

@ -17,6 +17,11 @@ h1, h2, h3, h4 {
font-weight: 700;
}
.warning {
font-weight: 500;
color: #9c0101;
}
.bg-image-full {
background: no-repeat center center scroll;
background-color: #4b2313;
@ -28,41 +33,20 @@ h1, h2, h3, h4 {
height: 100vh;
height: calc(var(--vh, 1vh) * 100);
opacity: 0.95;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
justify-content: center;
text-align: center;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
flex-direction: column;
}
.bg-image-full .container {
text-align: center;
-ms-flex-item-align: center;
align-self: center;
display: -webkit-box;
display: -ms-flexbox;
align-self: center;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
justify-content: center;
flex-direction: column;
align-items: center;
flex-grow: 1;
}
.bg-image-full .recommendation {
position: absolute;
top: 40px;
@ -71,26 +55,22 @@ h1, h2, h3, h4 {
display: inline-block;
width: 330px;
text-align: center;
padding: .25em 0;
padding: 0.25em 0;
color: white;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
transform: rotate(45deg);
background: #971d1d;
font-size: 0.9rem;
}
@media only screen and (min-width: 420px) {
.bg-image-full .recommendation {
font-size: 1.0rem;
font-size: 1rem;
}
}
@media only screen and (min-width: 768px) {
.bg-image-full .recommendation {
font-size: 1.1rem;
}
}
@media only screen and (min-width: 1024px) {
.bg-image-full .recommendation {
top: 50px;
@ -98,148 +78,123 @@ h1, h2, h3, h4 {
font-size: 1.2rem;
}
}
.bg-image-full .recommendation:hover {
text-decoration: none;
}
.bg-image-full .title {
color: #fff;
padding-top: 10px;
font-size: 1.8rem;
margin-bottom: 10px;
}
@media only screen and (min-width: 420px) {
.bg-image-full .title {
font-size: 2.4rem;
}
}
@media only screen and (min-width: 768px) {
.bg-image-full .title {
font-size: 3.2rem;
}
}
@media only screen and (min-width: 1024px) {
.bg-image-full .title {
font-size: 4rem;
}
}
.bg-image-full .logo {
width: 100px;
}
@media only screen and (min-width: 420px) {
.bg-image-full .logo {
width: 120px;
}
}
@media only screen and (min-width: 768px) {
.bg-image-full .logo {
width: 160px;
}
}
@media only screen and (min-width: 1024px) {
.bg-image-full .logo {
width: 200px;
}
}
.bg-image-full .subtitle {
text-align: center;
color: #bbb;
font-size: 0.78rem;
}
@media only screen and (min-width: 375px) {
.bg-image-full .subtitle {
font-size: 0.9rem;
}
}
@media only screen and (min-width: 420px) {
.bg-image-full .subtitle {
font-size: 1rem;
}
}
@media only screen and (min-width: 768px) {
.bg-image-full .subtitle {
font-size: 1.1rem;
}
}
@media only screen and (min-width: 1024px) {
.bg-image-full .subtitle {
font-size: 1.3rem;
}
}
.bg-image-full .text > a {
text-align: center;
color: #fff;
font-size: 0.9rem;
}
.bg-image-full .text > a:hover {
color: #aaa;
text-decoration: none;
}
@media only screen and (min-width: 375px) {
.bg-image-full .text > a {
font-size: 0.9rem;
}
}
@media only screen and (min-width: 420px) {
.bg-image-full .text > a {
font-size: 1rem;
}
}
@media only screen and (min-width: 768px) {
.bg-image-full .text > a {
font-size: 1rem;
}
}
@media only screen and (min-width: 1024px) {
.bg-image-full .text > a {
font-size: 1.1rem;
}
}
.bg-image-full .version {
text-align: center;
margin-bottom: 10px;
color: #fff;
font-size: .9rem;
font-size: 0.9rem;
}
@media only screen and (min-width: 420px) {
.bg-image-full .version {
font-size: .9rem;
font-size: 0.9rem;
}
}
@media only screen and (min-width: 768px) {
.bg-image-full .version {
font-size: 1rem;
}
}
@media only screen and (min-width: 1024px) {
.bg-image-full .version {
font-size: 1.1rem;
}
}
.bg-image-full .down {
text-align: center;
color: #fff;
@ -248,7 +203,6 @@ h1, h2, h3, h4 {
margin-bottom: 15px;
cursor: pointer;
}
.bg-image-full .down .caret {
font-size: 3rem;
}
@ -264,12 +218,10 @@ h1, h2, h3, h4 {
height: 65px;
position: relative;
}
.nav .logo {
width: 60px;
margin-top: 12px;
}
.nav .title {
display: none;
color: #fff;
@ -277,55 +229,45 @@ h1, h2, h3, h4 {
margin-left: 15px;
margin-top: 18px;
}
@media only screen and (min-width: 768px) {
.nav .title {
display: inline-block;
}
}
@media only screen and (min-width: 1024px) {
.nav .title {
font-size: 1.2rem;
}
}
.nav .text {
margin-top: 18px;
}
.nav .text a {
color: #fff;
margin-top: 12px;
font-size: 1.0rem;
font-size: 1rem;
}
@media only screen and (min-width: 1023px) {
.nav .text a {
margin-top: 10px;
font-size: 1.2rem;
}
}
.nav .text a:hover {
color: #aaa;
text-decoration: none;
}
.nav .github {
display: none;
}
@media only screen and (min-width: 768px) {
.nav .github {
display: inline-block;
}
}
.nav .todocs {
display: inline-block;
}
@media only screen and (min-width: 768px) {
.nav .todocs {
display: none;
@ -336,50 +278,41 @@ h1, h2, h3, h4 {
text-align: center;
color: #333;
}
.features .inner {
padding: 10px 0px;
}
@media only screen and (min-width: 768px) {
.features .inner {
padding: 15px 20px;
}
}
.features .inner .icons {
display: block;
font-size: 3rem;
color: #bbb;
}
@media only screen and (min-width: 420px) {
.features .inner .icons {
font-size: 3.5rem;
}
}
@media only screen and (min-width: 768px) {
.features .inner .icons {
font-size: 4rem;
}
}
@media only screen and (min-width: 1024px) {
.features .inner .icons {
font-size: 5rem;
}
}
.features .inner .icontitle {
font-size: 1.2rem;
}
.features .inner:hover {
background: #f4f4f4;
color: #567adf;
}
.features .inner:hover .icons {
color: #567adf;
}
@ -389,13 +322,11 @@ h1, h2, h3, h4 {
padding-top: 20px;
font-size: 2rem;
}
@media only screen and (min-width: 420px) {
.sectionheader .title {
font-size: 2.3rem;
}
}
@media only screen and (min-width: 768px) {
.sectionheader .title {
text-align: left;
@ -403,25 +334,21 @@ h1, h2, h3, h4 {
font-size: 2.6rem;
}
}
@media only screen and (min-width: 1024px) {
.sectionheader .title {
padding-top: 30px;
font-size: 3rem;
}
}
.sectionheader .title-small {
text-align: center;
font-size: 1.4rem;
}
@media only screen and (min-width: 420px) {
.sectionheader .title-small {
font-size: 1.6rem;
}
}
@media only screen and (min-width: 768px) {
.sectionheader .title-small {
text-align: left;
@ -429,53 +356,44 @@ h1, h2, h3, h4 {
font-size: 1.8rem;
}
}
@media only screen and (min-width: 1024px) {
.sectionheader .title-small {
padding-top: 30px;
font-size: 2rem;
}
}
.sectionheader .subtitle {
text-align: center;
font-size: .9rem;
font-size: 0.9rem;
}
@media only screen and (min-width: 420px) {
.sectionheader .subtitle {
font-size: 1rem;
}
}
@media only screen and (min-width: 768px) {
.sectionheader .subtitle {
text-align: left;
font-size: 1.1rem;
}
}
@media only screen and (min-width: 1024px) {
.sectionheader .subtitle {
font-size: 1.3rem;
}
}
.sectionheader .npmicons {
text-align: center;
}
.sectionheader .text {
text-align: center;
padding-top: 10px;
}
@media only screen and (min-width: 768px) {
.sectionheader .text {
text-align: left;
}
}
.sectionheader hr {
margin-top: 40px;
margin-bottom: 0px;
@ -485,15 +403,12 @@ h1, h2, h3, h4 {
.index {
margin: 0 0 10px 0;
}
.index .text, .index .subtitle, .index .title, .index .title-small, .index .npmicons {
text-align: center;
}
.index a {
text-decoration: none;
}
.index a:hover {
text-decoration: none;
color: #567adf;
@ -515,34 +430,28 @@ ul {
margin-top: 40px;
text-align: center;
}
.number-section .numbers {
font-size: 2rem;
}
@media only screen and (min-width: 420px) {
.number-section .numbers {
font-size: 2.4rem;
}
}
@media only screen and (min-width: 768px) {
.number-section .numbers {
font-size: 2.8rem;
}
}
.number-section .title {
color: #999;
font-size: 1rem;
}
@media only screen and (min-width: 420px) {
.number-section .title {
font-size: 1.1rem;
}
}
@media only screen and (min-width: 768px) {
.number-section .title {
font-size: 1.2rem;
@ -552,53 +461,43 @@ ul {
.menu {
display: none;
}
@media only screen and (min-width: 768px) {
.menu {
margin-top: 30px;
display: inline-block;
}
}
.menu .title {
margin: 25px 0 5px 0;
color: #000;
}
.menu .title a {
width: 100%;
color: #000;
text-decoration: none;
}
.menu .title a:hover {
color: #567adf;
}
.menu hr {
margin: 5px 0;
}
.menu ul {
list-style-type: none;
margin: 0;
padding: 0;
}
.menu ul li {
padding: 2px 0;
}
.menu ul li a {
width: 100%;
color: #666;
text-decoration: none;
}
.menu ul li a:hover {
color: #567adf;
}
.menu ul li.active > a {
color: #567adf;
}
@ -633,20 +532,16 @@ pre {
.example td:first-child {
background-color: #fff !important;
}
.example td:last-child {
background-color: #f8faff !important;
}
.example h5 {
padding-top: 5px;
padding-left: 10px;
}
.example pre {
background-color: unset;
}
.example pre .js {
background-color: #f0f0f4;
}
@ -658,11 +553,9 @@ footer {
padding-bottom: 30px;
position: relative;
}
footer a {
color: #000;
}
footer .badge {
color: #fff;
font-size: 0.9rem;
@ -675,5 +568,4 @@ footer .badge {
.v5 {
color: #567adf;
}
/*# sourceMappingURL=styles.css.map */
}/*# sourceMappingURL=styles.css.map */

File diff suppressed because one or more lines are too long

View File

@ -13,6 +13,10 @@ h1, h2, h3, h4 {
.bold {
font-weight: 700;
}
.warning {
font-weight: 500;
color: rgb(156, 1, 1);
}
.bg-image-full {
background: no-repeat center center scroll;
background-color: #4b2313; /* For browsers that do not support gradients */

View File

@ -750,88 +750,88 @@ function getCpu() {
}
if (_windows) {
try {
util.wmic('cpu get /value').then((stdout, error) => {
if (!error) {
let lines = stdout.split('\r\n');
let name = util.getValue(lines, 'name', '=') || '';
if (name.indexOf('@') >= 0) {
result.brand = name.split('@')[0].trim();
result.speed = name.split('@')[1] ? parseFloat(name.split('@')[1].trim()) : 0;
_cpu_speed = result.speed;
} else {
result.brand = name.trim();
result.speed = 0;
}
result = cpuBrandManufacturer(result);
result.revision = util.getValue(lines, 'revision', '=');
result.cache.l1d = 0;
result.cache.l1i = 0;
result.cache.l2 = util.getValue(lines, 'l2cachesize', '=');
result.cache.l3 = util.getValue(lines, 'l3cachesize', '=');
if (result.cache.l2) { result.cache.l2 = parseInt(result.cache.l2, 10) * 1024; }
if (result.cache.l3) { result.cache.l3 = parseInt(result.cache.l3, 10) * 1024; }
result.vendor = util.getValue(lines, 'manufacturer', '=');
result.speedMax = Math.round(parseFloat(util.getValue(lines, 'maxclockspeed', '=').replace(/,/g, '.')) / 10.0) / 100;
if (result.speed === 0 && (result.brand.indexOf('AMD') > -1 || result.brand.toLowerCase().indexOf('ryzen') > -1)) {
result.speed = getAMDSpeed(result.brand);
}
if (result.speed === 0) {
result.speed = result.speedMax;
}
result.speedMin = result.speed;
const workload = [];
workload.push(util.wmic('cpu get /value'));
workload.push(util.wmic('path Win32_CacheMemory get CacheType,InstalledSize,Purpose'));
let description = util.getValue(lines, 'description', '=').split(' ');
for (let i = 0; i < description.length; i++) {
if (description[i].toLowerCase().startsWith('family') && (i + 1) < description.length && description[i + 1]) {
result.family = description[i + 1];
}
if (description[i].toLowerCase().startsWith('model') && (i + 1) < description.length && description[i + 1]) {
result.model = description[i + 1];
}
if (description[i].toLowerCase().startsWith('stepping') && (i + 1) < description.length && description[i + 1]) {
result.stepping = description[i + 1];
}
Promise.all(
workload
).then(data => {
let lines = data[0].split('\r\n');
let name = util.getValue(lines, 'name', '=') || '';
if (name.indexOf('@') >= 0) {
result.brand = name.split('@')[0].trim();
result.speed = name.split('@')[1] ? parseFloat(name.split('@')[1].trim()) : 0;
_cpu_speed = result.speed;
} else {
result.brand = name.trim();
result.speed = 0;
}
result = cpuBrandManufacturer(result);
result.revision = util.getValue(lines, 'revision', '=');
result.cache.l1d = 0;
result.cache.l1i = 0;
result.cache.l2 = util.getValue(lines, 'l2cachesize', '=');
result.cache.l3 = util.getValue(lines, 'l3cachesize', '=');
if (result.cache.l2) { result.cache.l2 = parseInt(result.cache.l2, 10) * 1024; }
if (result.cache.l3) { result.cache.l3 = parseInt(result.cache.l3, 10) * 1024; }
result.vendor = util.getValue(lines, 'manufacturer', '=');
result.speedMax = Math.round(parseFloat(util.getValue(lines, 'maxclockspeed', '=').replace(/,/g, '.')) / 10.0) / 100;
if (result.speed === 0 && (result.brand.indexOf('AMD') > -1 || result.brand.toLowerCase().indexOf('ryzen') > -1)) {
result.speed = getAMDSpeed(result.brand);
}
if (result.speed === 0) {
result.speed = result.speedMax;
}
result.speedMin = result.speed;
let description = util.getValue(lines, 'description', '=').split(' ');
for (let i = 0; i < description.length; i++) {
if (description[i].toLowerCase().startsWith('family') && (i + 1) < description.length && description[i + 1]) {
result.family = description[i + 1];
}
// socket type
const socketId = util.getValue(lines, 'UpgradeMethod', '=');
if (socketTypes[socketId]) {
result.socket = socketTypes[socketId];
if (description[i].toLowerCase().startsWith('model') && (i + 1) < description.length && description[i + 1]) {
result.model = description[i + 1];
}
// # threads / # cores
const countProcessors = util.countLines(lines, 'Caption');
const countThreads = util.getValue(lines, 'NumberOfLogicalProcessors', '=');
const countCores = util.getValue(lines, 'NumberOfCores', '=');
if (countProcessors) {
result.processors = parseInt(countProcessors) || 1;
}
if (countCores && countThreads) {
result.cores = parseInt(countThreads) || util.cores();
result.physicalCores = parseInt(countCores) || util.cores();
}
if (countProcessors > 1) {
result.cores = result.cores * countProcessors;
result.physicalCores = result.physicalCores * countProcessors;
if (description[i].toLowerCase().startsWith('stepping') && (i + 1) < description.length && description[i + 1]) {
result.stepping = description[i + 1];
}
}
util.wmic('path Win32_CacheMemory get CacheType,InstalledSize,Purpose').then((stdout, error) => {
if (!error) {
let lines = stdout.split('\r\n').filter(line => line.trim() !== '').filter((line, idx) => idx > 0);
lines.forEach(function (line) {
if (line !== '') {
line = line.trim().split(/\s\s+/);
// L1 Instructions
if (line[2] === 'L1 Cache' && line[0] === '3') {
result.cache.l1i = parseInt(line[1], 10);
}
// L1 Data
if (line[2] === 'L1 Cache' && line[0] === '4') {
result.cache.l1d = parseInt(line[1], 10);
}
}
});
// socket type
const socketId = util.getValue(lines, 'UpgradeMethod', '=');
if (socketTypes[socketId]) {
result.socket = socketTypes[socketId];
}
// # threads / # cores
const countProcessors = util.countLines(lines, 'Caption');
const countThreads = util.getValue(lines, 'NumberOfLogicalProcessors', '=');
const countCores = util.getValue(lines, 'NumberOfCores', '=');
if (countProcessors) {
result.processors = parseInt(countProcessors) || 1;
}
if (countCores && countThreads) {
result.cores = parseInt(countThreads) || util.cores();
result.physicalCores = parseInt(countCores) || util.cores();
}
if (countProcessors > 1) {
result.cores = result.cores * countProcessors;
result.physicalCores = result.physicalCores * countProcessors;
}
lines = data[1].split('\r\n').filter(line => line.trim() !== '').filter((line, idx) => idx > 0);
lines.forEach(function (line) {
if (line !== '') {
line = line.trim().split(/\s\s+/);
// L1 Instructions
if (line[2] === 'L1 Cache' && line[0] === '3') {
result.cache.l1i = parseInt(line[1], 10);
}
// L1 Data
if (line[2] === 'L1 Cache' && line[0] === '4') {
result.cache.l1d = parseInt(line[1], 10);
}
}
resolve(result);
});
resolve(result);
});
} catch (e) {
resolve(result);
@ -930,9 +930,32 @@ function cpuTemperature(callback) {
let result = {
main: null,
cores: [],
max: null
max: null,
socket: [],
chipset: null
};
if (_linux) {
// CPU Chipset, Socket
try {
const cmd = 'cat /sys/class/thermal/thermal_zone*/type 2>/dev/null; echo "-----"; cat /sys/class/thermal/thermal_zone*/temp 2>/dev/null;';
const parts = execSync(cmd).toString().split('-----\n');
if (parts.length === 2) {
const lines = parts[0].split('\n');
const lines2 = parts[1].split('\n');
for (let i = 0; i < lines.length; i++) {
const line = lines[i].trim();
if (line.startsWith('acpi') && lines2[i]) {
result.socket.push(Math.round(parseInt(lines2[i], 10) / 100) / 10);
}
if (line.startsWith('pch') && lines2[i]) {
result.chipset = Math.round(parseInt(lines2[i], 10) / 100) / 10;
}
}
}
} catch (e) {
util.noop();
}
const cmd = 'for mon in /sys/class/hwmon/hwmon*; do for label in "$mon"/temp*_label; do if [ -f $label ]; then value=$(echo $label | rev | cut -c 7- | rev)_input; if [ -f "$value" ]; then echo $(cat "$label")___$(cat "$value"); fi; fi; done; done;';
try {
exec(cmd, function (error, stdout) {
@ -963,15 +986,37 @@ function cpuTemperature(callback) {
resolve(result);
return;
}
// }
exec('sensors', function (error, stdout) {
if (!error) {
let lines = stdout.toString().split('\n');
let tdieTemp = null;
let newSectionStarts = true;
let section = '';
lines.forEach(function (line) {
// determine section
if (line.trim() === '') {
newSectionStarts = true;
} else if (newSectionStarts) {
if (line.trim().toLowerCase().startsWith('acpi')) { section = 'acpi'; }
if (line.trim().toLowerCase().startsWith('pch')) { section = 'pch'; }
if (line.trim().toLowerCase().startsWith('core')) { section = 'core'; }
newSectionStarts = false;
}
let regex = /[+-]([^°]*)/g;
let temps = line.match(regex);
let firstPart = line.split(':')[0].toUpperCase();
if (section === 'acpi') {
// socket temp
if (firstPart.indexOf('TEMP') !== -1) {
result.socket.push(parseFloat(temps));
}
} else if (section === 'pch') {
// chipset temp
if (firstPart.indexOf('TEMP') !== -1) {
result.chipset = parseFloat(temps);
}
}
// cpu temp
if (firstPart.indexOf('PHYSICAL') !== -1 || firstPart.indexOf('PACKAGE') !== -1) {
result.main = parseFloat(temps);
}

View File

@ -91,6 +91,118 @@ function dockerInfo(callback) {
exports.dockerInfo = dockerInfo;
function dockerImages(all, callback) {
// fallback - if only callback is given
if (util.isFunction(all) && !callback) {
callback = all;
all = false;
}
if (typeof all === 'string' && all === 'true') {
all = true;
}
if (typeof all !== 'boolean' && all !== undefined) {
all = false;
}
all = all || false;
let result = [];
return new Promise((resolve) => {
process.nextTick(() => {
if (!_docker_socket) {
_docker_socket = new DockerSocket();
}
const workload = [];
_docker_socket.listImages(all, data => {
let dockerImages = {};
try {
dockerImages = data;
if (dockerImages && Object.prototype.toString.call(dockerImages) === '[object Array]' && dockerImages.length > 0) {
dockerImages.forEach(function (element) {
if (element.Names && Object.prototype.toString.call(element.Names) === '[object Array]' && element.Names.length > 0) {
element.Name = element.Names[0].replace(/^\/|\/$/g, '');
}
workload.push(dockerImagesInspect(element.Id.trim(), element));
});
if (workload.length) {
Promise.all(
workload
).then(data => {
if (callback) { callback(data); }
resolve(data);
});
} else {
if (callback) { callback(result); }
resolve(result);
}
} else {
if (callback) { callback(result); }
resolve(result);
}
} catch (err) {
if (callback) { callback(result); }
resolve(result);
}
});
});
});
}
// --------------------------
// container inspect (for one container)
function dockerImagesInspect(imageID, payload) {
return new Promise((resolve) => {
process.nextTick(() => {
imageID = imageID || '';
if (typeof imageID !== 'string') {
resolve();
}
const imageIDSanitized = (util.isPrototypePolluted() ? '' : util.sanitizeShellString(imageID, true)).trim();
if (imageIDSanitized) {
if (!_docker_socket) {
_docker_socket = new DockerSocket();
}
_docker_socket.inspectImage(imageIDSanitized.trim(), data => {
try {
resolve({
id: payload.Id,
container: data.Container,
comment: data.Comment,
os: data.Os,
architecture: data.Architecture,
parent: data.Parent,
dockerVersion: data.DockerVersion,
size: data.Size,
sharedSize: payload.SharedSize,
virtualSize: data.VirtualSize,
author: data.Author,
created: data.Created ? Math.round(new Date(data.Created).getTime() / 1000) : 0,
containerConfig: data.ContainerConfig ? data.ContainerConfig : {},
graphDriver: data.GraphDriver ? data.GraphDriver : {},
repoDigests: data.RepoDigests ? data.RepoDigests : {},
repoTags: data.RepoTags ? data.RepoTags : {},
config: data.Config ? data.Config : {},
rootFS: data.RootFS ? data.RootFS : {},
});
} catch (err) {
resolve();
}
});
} else {
resolve();
}
});
});
}
exports.dockerImages = dockerImages;
function dockerContainers(all, callback) {
function inContainers(containers, id) {
@ -109,6 +221,9 @@ function dockerContainers(all, callback) {
callback = all;
all = false;
}
if (typeof all === 'string' && all === 'true') {
all = true;
}
if (typeof all !== 'boolean' && all !== undefined) {
all = false;
}
@ -350,13 +465,18 @@ function dockerContainerStats(containerIDs, callback) {
containerIDsSanitized.__proto__.replace = util.stringReplace;
containerIDsSanitized.__proto__.trim = util.stringTrim;
const s = (util.isPrototypePolluted() ? '' : util.sanitizeShellString(containerIDs, true)).trim();
for (let i = 0; i <= 2000; i++) {
if (!(s[i] === undefined)) {
s[i].__proto__.toLowerCase = util.stringToLower;
const sl = s[i].toLowerCase();
if (sl && sl[0] && !sl[1]) {
containerIDsSanitized = containerIDsSanitized + sl[0];
containerIDsSanitized = containerIDs;
containerIDsSanitized = containerIDsSanitized.trim();
if (containerIDsSanitized !== '*') {
containerIDsSanitized = '';
const s = (util.isPrototypePolluted() ? '' : util.sanitizeShellString(containerIDs, true)).trim();
for (let i = 0; i <= util.mathMin(s.length, 2000); i++) {
if (!(s[i] === undefined)) {
s[i].__proto__.toLowerCase = util.stringToLower;
const sl = s[i].toLowerCase();
if (sl && sl[0] && !sl[1]) {
containerIDsSanitized = containerIDsSanitized + sl[0];
}
}
}
}
@ -374,10 +494,15 @@ function dockerContainerStats(containerIDs, callback) {
for (let container of allContainers) {
containerArray.push(container.id);
}
dockerContainerStats(containerArray.join(',')).then(result => {
if (containerArray.length) {
dockerContainerStats(containerArray.join(',')).then(result => {
if (callback) { callback(result); }
resolve(result);
});
} else {
if (callback) { callback(result); }
resolve(result);
});
}
});
} else {
for (let containerID of containerArray) {
@ -547,6 +672,48 @@ function dockerContainerProcesses(containerID, callback) {
exports.dockerContainerProcesses = dockerContainerProcesses;
function dockerVolumes(callback) {
let result = [];
return new Promise((resolve) => {
process.nextTick(() => {
if (!_docker_socket) {
_docker_socket = new DockerSocket();
}
_docker_socket.listVolumes(data => {
let dockerVolumes = {};
try {
dockerVolumes = data;
if (dockerVolumes && dockerVolumes.Volumes && Object.prototype.toString.call(dockerVolumes.Volumes) === '[object Array]' && dockerVolumes.Volumes.length > 0) {
dockerVolumes.Volumes.forEach(function (element) {
result.push({
name: element.Name,
driver: element.Driver,
labels: element.Labels,
mountpoint: element.Mountpoint,
options: element.Options,
scope: element.Scope,
created: element.CreatedAt ? Math.round(new Date(element.CreatedAt).getTime() / 1000) : 0,
});
});
if (callback) { callback(result); }
resolve(result);
} else {
if (callback) { callback(result); }
resolve(result);
}
} catch (err) {
if (callback) { callback(result); }
resolve(result);
}
});
});
});
}
exports.dockerVolumes = dockerVolumes;
function dockerAll(callback) {
return new Promise((resolve) => {
process.nextTick(() => {

View File

@ -55,6 +55,82 @@ class DockerSocket {
}
}
listImages(all, callback) {
try {
let socket = net.createConnection({ path: socketPath });
let alldata = '';
let data;
socket.on('connect', () => {
socket.write('GET http:/images/json' + (all ? '?all=1' : '') + ' HTTP/1.0\r\n\r\n');
});
socket.on('data', data => {
alldata = alldata + data.toString();
});
socket.on('error', () => {
socket = false;
callback({});
});
socket.on('end', () => {
let startbody = alldata.indexOf('\r\n\r\n');
alldata = alldata.substring(startbody + 4);
socket = false;
try {
data = JSON.parse(alldata);
callback(data);
} catch (err) {
callback({});
}
});
} catch (err) {
callback({});
}
}
inspectImage(id, callback) {
id = id || '';
if (id) {
try {
let socket = net.createConnection({ path: socketPath });
let alldata = '';
let data;
socket.on('connect', () => {
socket.write('GET http:/images/' + id + '/json?stream=0 HTTP/1.0\r\n\r\n');
});
socket.on('data', data => {
alldata = alldata + data.toString();
});
socket.on('error', () => {
socket = false;
callback({});
});
socket.on('end', () => {
let startbody = alldata.indexOf('\r\n\r\n');
alldata = alldata.substring(startbody + 4);
socket = false;
try {
data = JSON.parse(alldata);
callback(data);
} catch (err) {
callback({});
}
});
} catch (err) {
callback({});
}
} else {
callback({});
}
}
listContainers(all, callback) {
try {
@ -210,6 +286,42 @@ class DockerSocket {
callback({});
}
}
listVolumes(callback) {
try {
let socket = net.createConnection({ path: socketPath });
let alldata = '';
let data;
socket.on('connect', () => {
socket.write('GET http:/volumes HTTP/1.0\r\n\r\n');
});
socket.on('data', data => {
alldata = alldata + data.toString();
});
socket.on('error', () => {
socket = false;
callback({});
});
socket.on('end', () => {
let startbody = alldata.indexOf('\r\n\r\n');
alldata = alldata.substring(startbody + 4);
socket = false;
try {
data = JSON.parse(alldata);
callback(data);
} catch (err) {
callback({});
}
});
} catch (err) {
callback({});
}
}
}
module.exports = DockerSocket;

37
lib/index.d.ts vendored
View File

@ -104,6 +104,8 @@ export namespace Systeminformation {
main: number;
cores: number[];
max: number;
socket?: number[];
chipset?: number;
}
interface MemData {
@ -641,6 +643,27 @@ export namespace Systeminformation {
productLicense: string;
}
interface DockerImageData {
id: string;
container: string;
comment: string;
os: string;
architecture: string;
parent: string;
dockerVersion: string;
size: number;
sharedSize: number;
virtualSize: number;
author: string;
created: number;
containerConfig: any;
graphDriver: any;
repoDigests: any;
repoTags: any;
config: any;
rootFS: any;
}
interface DockerContainerData {
id: string;
name: string;
@ -691,6 +714,16 @@ export namespace Systeminformation {
networks: any;
}
interface DockerVolumeData {
name: string;
driver: string;
labels: any;
mountpoint: string;
options: any;
scope: string;
created: number;
}
// 9. Virtual Box
interface VboxInfoData {
@ -843,6 +876,8 @@ export function inetChecksite(url: string, cb?: (data: Systeminformation.InetChe
export function inetLatency(host?: string, cb?: (data: number) => any): Promise<number>;
export function wifiNetworks(cb?: (data: Systeminformation.WifiNetworkData[]) => any): Promise<Systeminformation.WifiNetworkData[]>;
export function wifiInterfaces(cb?: (data: Systeminformation.WifiInterfaceData[]) => any): Promise<Systeminformation.WifiInterfaceData[]>;
export function wifiConnections(cb?: (data: Systeminformation.WifiConnectionData[]) => any): Promise<Systeminformation.WifiConnectionData[]>;
export function users(cb?: (data: Systeminformation.UserData[]) => any): Promise<Systeminformation.UserData[]>;
@ -851,9 +886,11 @@ export function processLoad(processName: string, cb?: (data: Systeminformation.P
export function services(serviceName: string, cb?: (data: Systeminformation.ServicesData[]) => any): Promise<Systeminformation.ServicesData[]>;
export function dockerInfo(cb?: (data: Systeminformation.DockerInfoData) => any): Promise<Systeminformation.DockerInfoData>;
export function dockerImages(all?: boolean, cb?: (data: Systeminformation.DockerImageData[]) => any): Promise<Systeminformation.DockerImageData[]>;
export function dockerContainers(all?: boolean, cb?: (data: Systeminformation.DockerContainerData[]) => any): Promise<Systeminformation.DockerContainerData[]>;
export function dockerContainerStats(id?: string, cb?: (data: Systeminformation.DockerContainerStatsData[]) => any): Promise<Systeminformation.DockerContainerStatsData[]>;
export function dockerContainerProcesses(id?: string, cb?: (data: any) => any): Promise<any>;
export function dockerVolumes(cb?: (data: Systeminformation.DockerVolumeData[]) => any): Promise<Systeminformation.DockerVolumeData[]>;
export function dockerAll(cb?: (data: any) => any): Promise<any>;
export function vboxInfo(cb?: (data: Systeminformation.VboxInfoData[]) => any): Promise<Systeminformation.VboxInfoData[]>;

View File

@ -362,12 +362,17 @@ function get(valueObject, callback) {
// result is in an array, go through all elements of array and pick only the right ones
const partialArray = [];
data[i].forEach(element => {
const partialRes = {};
keys.forEach(k => {
if ({}.hasOwnProperty.call(element, k)) {
partialRes[k] = element[k];
}
});
let partialRes = {};
if (keys.length === 1 && (keys[0] === '*' || keys[0] === 'all')) {
partialRes = element;
} else {
keys.forEach(k => {
if ({}.hasOwnProperty.call(element, k)) {
partialRes[k] = element[k];
}
});
}
// if there is a filter, then just take those elements
if (filter && filterParts.length === 2) {
if ({}.hasOwnProperty.call(partialRes, filterParts[0].trim())) {
const val = partialRes[filterParts[0].trim()];
@ -482,9 +487,11 @@ exports.inetChecksite = internet.inetChecksite;
exports.inetLatency = internet.inetLatency;
exports.dockerInfo = docker.dockerInfo;
exports.dockerImages = docker.dockerImages;
exports.dockerContainers = docker.dockerContainers;
exports.dockerContainerStats = docker.dockerContainerStats;
exports.dockerContainerProcesses = docker.dockerContainerProcesses;
exports.dockerVolumes = docker.dockerVolumes;
exports.dockerAll = docker.dockerAll;
exports.vboxInfo = vbox.vboxInfo;

View File

@ -13,8 +13,7 @@
// 12. Internet
// ----------------------------------------------------------------------------------
const exec = require('child_process').exec;
const execFile = require('child_process').execFile;
// const exec = require('child_process').exec;
const util = require('./util');
let _platform = process.platform;
@ -46,11 +45,11 @@ function inetChecksite(url, callback) {
}
let urlSanitized = '';
const s = util.sanitizeShellString(url, true);
for (let i = 0; i <= 2000; i++) {
for (let i = 0; i <= util.mathMin(s.length, 2000); i++) {
if (!(s[i] === undefined)) {
s[i].__proto__.toLowerCase = util.stringToLower;
const sl = s[i].toLowerCase();
if (sl && sl[0] && !sl[1]) {
if (sl && sl[0] && !sl[1] && sl[0].length === 1) {
urlSanitized = urlSanitized + sl[0];
}
}
@ -59,18 +58,20 @@ function inetChecksite(url, callback) {
try {
if (urlSanitized && !util.isPrototypePolluted()) {
urlSanitized.__proto__.startsWith = util.stringStartWith;
if (urlSanitized.startsWith('file:')) {
if (urlSanitized.startsWith('file:') || urlSanitized.startsWith('gopher:') || urlSanitized.startsWith('telnet:') || urlSanitized.startsWith('mailto:') || urlSanitized.startsWith('news:') || urlSanitized.startsWith('nntp:')) {
if (callback) { callback(result); }
return resolve(result);
}
let t = Date.now();
if (_linux || _freebsd || _openbsd || _netbsd || _darwin || _sunos) {
let args = ' -I --connect-timeout 5 -m 5 ' + urlSanitized + ' 2>/dev/null | head -n 1 | cut -d " " -f2';
let args = ['-I', '--connect-timeout', '5', '-m', '5'];
args.push(urlSanitized);
let cmd = 'curl';
exec(cmd + args, function (error, stdout) {
let statusCode = parseInt(stdout.toString());
util.execSafe(cmd, args).then((stdout) => {
const lines = stdout.split('\n');
let statusCode = lines[0] && lines[0].indexOf(' ') >= 0 ? parseInt(lines[0].split(' ')[1], 10) : 404;
result.status = statusCode || 404;
result.ok = !error && (statusCode === 200 || statusCode === 301 || statusCode === 302 || statusCode === 304);
result.ok = (statusCode === 200 || statusCode === 301 || statusCode === 302 || statusCode === 304);
result.ms = (result.ok ? Date.now() - t : null);
if (callback) { callback(result); }
resolve(result);
@ -142,7 +143,7 @@ function inetLatency(host, callback) {
}
let hostSanitized = '';
const s = (util.isPrototypePolluted() ? '8.8.8.8' : util.sanitizeShellString(host, true)).trim();
for (let i = 0; i <= 2000; i++) {
for (let i = 0; i <= util.mathMin(s.length, 2000); i++) {
if (!(s[i] === undefined)) {
s[i].__proto__.toLowerCase = util.stringToLower;
const sl = s[i].toLowerCase();
@ -152,7 +153,7 @@ function inetLatency(host, callback) {
}
}
hostSanitized.__proto__.startsWith = util.stringStartWith;
if (hostSanitized.startsWith('file:')) {
if (hostSanitized.startsWith('file:') || hostSanitized.startsWith('gopher:') || hostSanitized.startsWith('telnet:') || hostSanitized.startsWith('mailto:') || hostSanitized.startsWith('news:') || hostSanitized.startsWith('nntp:')) {
if (callback) { callback(null); }
return resolve(null);
}
@ -160,21 +161,21 @@ function inetLatency(host, callback) {
let filt;
if (_linux || _freebsd || _openbsd || _netbsd || _darwin) {
if (_linux) {
params = '-c 2 -w 3 ' + hostSanitized;
params = ['-c', '2', '-w', '3', hostSanitized];
filt = 'rtt';
}
if (_freebsd || _openbsd || _netbsd) {
params = '-c 2 -t 3 ' + hostSanitized;
params = ['-c', '2', '-t', '3', hostSanitized];
filt = 'round-trip';
}
if (_darwin) {
params = '-c2 -t3 ' + hostSanitized;
params = ['-c2', '-t3', hostSanitized];
filt = 'avg';
}
execFile('ping', params.split(' '), function (error, stdout) {
util.execSafe('ping', params).then((stdout) => {
let result = null;
if (!error) {
const lines = stdout.toString().split('\n').filter(line => line.indexOf(filt) >= 0).join('\n');
if (stdout) {
const lines = stdout.split('\n').filter(line => line.indexOf(filt) >= 0).join('\n');
const line = lines.split('=');
if (line.length > 1) {
@ -189,12 +190,12 @@ function inetLatency(host, callback) {
});
}
if (_sunos) {
const params = '-s -a ' + hostSanitized + ' 56 2';
const params = ['-s', '-a', hostSanitized, '56', '2'];
const filt = 'avg';
execFile('ping', params.split(' '), { timeout: 3000 }, function (error, stdout) {
util.execSafe('ping', params, { timeout: 3000 }).then((stdout) => {
let result = null;
if (!error) {
const lines = stdout.toString().split('\n').filter(line => line.indexOf(filt) >= 0).join('\n');
if (stdout) {
const lines = stdout.split('\n').filter(line => line.indexOf(filt) >= 0).join('\n');
const line = lines.split('=');
if (line.length > 1) {
const parts = line[1].split('/');
@ -210,10 +211,10 @@ function inetLatency(host, callback) {
if (_windows) {
let result = null;
try {
const params = hostSanitized + ' -n 1';
execFile('ping', params.split(' '), util.execOptsWin, function (error, stdout) {
if (!error) {
let lines = stdout.toString().split('\r\n');
const params = [hostSanitized, '-n', '1'];
util.execSafe('ping', params, util.execOptsWin).then((stdout) => {
if (stdout) {
let lines = stdout.split('\r\n');
lines.shift();
lines.forEach(function (line) {
if ((line.toLowerCase().match(/ms/g) || []).length === 3) {

View File

@ -221,6 +221,7 @@ function parseLinesWindowsNics(sections, nconfigsections) {
let netEnabled = util.getValue(lines, 'NetEnabled', '=');
let adapterType = util.getValue(lines, 'AdapterTypeID', '=') === '9' ? 'wireless' : 'wired';
let ifacename = util.getValue(lines, 'Name', '=').replace(/\]/g, ')').replace(/\[/g, '(');
let iface = util.getValue(lines, 'NetConnectionID', '=').replace(/\]/g, ')').replace(/\[/g, '(');
if (ifacename.toLowerCase().indexOf('wi-fi') >= 0 || ifacename.toLowerCase().indexOf('wireless') >= 0) {
adapterType = 'wireless';
}
@ -230,6 +231,7 @@ function parseLinesWindowsNics(sections, nconfigsections) {
mac: util.getValue(lines, 'MACAddress', '=').toLowerCase(),
dhcp: util.getValue(linesNicConfig, 'dhcpEnabled', '=').toLowerCase(),
name: ifacename,
iface,
netEnabled: netEnabled === 'TRUE',
speed: isNaN(speed) ? null : speed,
operstate: util.getValue(lines, 'NetConnectionStatus', '=') === '2' ? 'up' : 'down',
@ -243,7 +245,7 @@ function parseLinesWindowsNics(sections, nconfigsections) {
}
function getWindowsNics() {
const cmd = util.getWmic() + ' nic get MACAddress, name, NetEnabled, Speed, NetConnectionStatus, AdapterTypeId /value';
const cmd = util.getWmic() + ' nic get MACAddress, name, NetConnectionId, NetEnabled, Speed, NetConnectionStatus, AdapterTypeId /value';
const cmdnicconfig = util.getWmic() + ' nicconfig get dhcpEnabled /value';
try {
const nsections = execSync(cmd, util.execOptsWin).split(/\n\s*\n/);
@ -774,6 +776,7 @@ function networkInterfaces(callback, rescan = true) {
_dhcpNics = getLinuxDHCPNics();
}
for (let dev in ifaces) {
let iface = dev;
let ip4 = '';
let ip4subnet = '';
let ip6 = '';
@ -873,6 +876,7 @@ function networkInterfaces(callback, rescan = true) {
dnsSuffix = getWindowsIfaceDNSsuffix(dnsSuffixes.ifaces, dev);
nics.forEach(detail => {
if (detail.mac === mac) {
iface = detail.iface || iface;
ifaceName = detail.name;
dhcp = detail.dhcp;
operstate = detail.operstate;
@ -895,7 +899,7 @@ function networkInterfaces(callback, rescan = true) {
}
const virtual = internal ? false : testVirtualNic(dev, ifaceName, mac);
result.push({
iface: dev,
iface,
ifaceName,
ip4,
ip4subnet,
@ -1057,7 +1061,7 @@ function networkStatsSingle(iface) {
process.nextTick(() => {
let ifaceSanitized = '';
const s = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(iface);
for (let i = 0; i <= 2000; i++) {
for (let i = 0; i <= util.mathMin(s.length, 2000); i++) {
if (!(s[i] === undefined)) {
ifaceSanitized = ifaceSanitized + s[i];
}

View File

@ -1,22 +0,0 @@
let si = require('./internet');
si.inetChecksite([]).then((a) => {
if (a.ok == false)
console.log("inetChecksite is fixed!")
else
console.log("inetChecksite is not fixed!")
});
si.inetLatency([]).then((a) => {
if (a == null)
console.log("inetLatency is fixed!")
else
console.log("inetLatency is not fixed!")
});
si = require('./processes');
si.services([]).then((a) => {
if (typeof a == typeof [])
console.log("services is fixed!")
else
console.log("services is not fixed!")
});

View File

@ -18,8 +18,6 @@ const fs = require('fs');
const path = require('path');
const exec = require('child_process').exec;
const execSync = require('child_process').execSync;
const execFile = require('child_process').execFile;
const util = require('./util');
@ -111,7 +109,7 @@ function services(srv, callback) {
srvString.__proto__.trim = util.stringTrim;
const s = util.sanitizeShellString(srv);
for (let i = 0; i <= 2000; i++) {
for (let i = 0; i <= util.mathMin(s.length, 2000); i++) {
if (!(s[i] === undefined)) {
srvString = srvString + s[i];
}
@ -164,11 +162,15 @@ function services(srv, callback) {
}
}
}
let comm = (_darwin) ? 'ps -caxo pcpu,pmem,pid,command' : 'ps -axo pcpu,pmem,pid,command';
if ((_darwin) && srvString === '*') { // service enumeration not yet suported on mac OS
if (callback) { callback(result); }
resolve(result);
}
let args = (_darwin) ? ['-caxo', 'pcpu,pmem,pid,command'] : ['-axo', 'pcpu,pmem,pid,command'];
if (srvString !== '' && srvs.length > 0) {
exec(comm + ' | grep -v grep | grep -iE "' + srvString + '"', { maxBuffer: 1024 * 20000 }, function (error, stdout) { // lgtm [js/shell-command-constructed-from-input]
if (!error) {
let lines = stdout.toString().replace(/ +/g, ' ').replace(/,+/g, '.').split('\n');
util.execSafe('ps', args).then((stdout) => {
if (stdout) {
let lines = stdout.replace(/ +/g, ' ').replace(/,+/g, '.').split('\n');
srvs.forEach(function (srv) {
let ps;
if (_darwin) {
@ -263,9 +265,10 @@ function services(srv, callback) {
resolve(result);
}
} else {
exec('ps -o comm | grep -v grep | egrep "' + srvString + '"', { maxBuffer: 1024 * 20000 }, function (error, stdout) { // lgtm [js/shell-command-constructed-from-input]
if (!error) {
let lines = stdout.toString().replace(/ +/g, ' ').replace(/,+/g, '.').split('\n');
args = ['-o', 'comm'];
util.execSafe('ps', args).then((stdout) => {
if (stdout) {
let lines = stdout.replace(/ +/g, ' ').replace(/,+/g, '.').split('\n');
srvs.forEach(function (srv) {
let ps = lines.filter(function (e) {
return e.indexOf(srv) !== -1;
@ -905,7 +908,7 @@ function processLoad(proc, callback) {
processesString.__proto__.trim = util.stringTrim;
const s = util.sanitizeShellString(proc);
for (let i = 0; i <= 2000; i++) {
for (let i = 0; i <= util.mathMin(s.length, 2000); i++) {
if (!(s[i] === undefined)) {
processesString = processesString + s[i];
}
@ -1053,9 +1056,9 @@ function processLoad(proc, callback) {
}
if (_darwin || _linux || _freebsd || _openbsd || _netbsd) {
const params = '-axo pid,pcpu,pmem,comm';
execFile('ps', params.split(' '), { maxBuffer: 1024 * 20000 }, function (error, stdout) {
if (!error) {
const params = ['-axo', 'pid,pcpu,pmem,comm'];
util.execSafe('ps', params).then((stdout) => {
if (stdout) {
let procStats = [];
let lines = stdout.toString().split('\n').filter(function (line) {
if (processesString === '*') { return true; }

View File

@ -58,6 +58,7 @@ const stringToString = new String().toString;
const stringSubstr = new String().substr;
const stringTrim = new String().trim;
const stringStartWith = new String().startsWith;
const mathMin = Math.min;
function isFunction(functionToCheck) {
let getType = {};
@ -389,6 +390,42 @@ function powerShell(cmd) {
});
}
function execSafe(cmd, args, options) {
let result = '';
options = options || {};
return new Promise((resolve) => {
process.nextTick(() => {
try {
const child = spawn(cmd, args, options);
if (child && !child.pid) {
child.on('error', function () {
resolve(result);
});
}
if (child && child.pid) {
child.stdout.on('data', function (data) {
result += data.toString();
});
child.on('close', function () {
child.kill();
resolve(result);
});
child.on('error', function () {
child.kill();
resolve(result);
});
} else {
resolve(result);
}
} catch (e) {
resolve(result);
}
});
});
}
function getCodepage() {
if (_windows) {
if (!codepage) {
@ -506,7 +543,7 @@ function countLines(lines, startingWith) {
function sanitizeShellString(str, strict = false) {
const s = str || '';
let result = '';
for (let i = 0; i <= 2000; i++) {
for (let i = 0; i <= mathMin(s.length, 2000); i++) {
if (!(s[i] === undefined ||
s[i] === '>' ||
s[i] === '<' ||
@ -529,10 +566,11 @@ function sanitizeShellString(str, strict = false) {
s[i] === '\'' ||
s[i] === '`' ||
s[i] === '"' ||
strict && s[i] === '@' ||
strict && s[i] === ' ' ||
strict && s[i] == '{' ||
strict && s[i] == ')')) {
s[i].length > 1 ||
(strict && s[i] === '@') ||
(strict && s[i] === ' ') ||
(strict && s[i] == '{') ||
(strict && s[i] == ')'))) {
result = result + s[i];
}
}
@ -924,6 +962,7 @@ exports.wmic = wmic;
exports.darwinXcodeExists = darwinXcodeExists;
exports.getVboxmanage = getVboxmanage;
exports.powerShell = powerShell;
exports.execSafe = execSafe;
exports.nanoSeconds = nanoSeconds;
exports.countUniqueLines = countUniqueLines;
exports.countLines = countLines;
@ -942,5 +981,6 @@ exports.stringToString = stringToString;
exports.stringSubstr = stringSubstr;
exports.stringTrim = stringTrim;
exports.stringStartWith = stringStartWith;
exports.mathMin = mathMin;
exports.WINDIR = WINDIR;
exports.getFilesInPath = getFilesInPath;

View File

@ -1,6 +1,6 @@
{
"name": "systeminformation",
"version": "5.3.3",
"version": "5.6.8",
"description": "Simple system and OS information library",
"license": "MIT",
"author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",

View File

@ -49,10 +49,11 @@ function test(f) {
else if (f === '4') { si.networkStats().then(data => { if (data !== null) { resolve({ data, title: 'NET Stats' }); } else { resolve('not_supported'); } }); }
else if (f === '5') { si.networkConnections().then(data => { if (data !== null) { resolve({ data, title: 'NET Connections' }); } else { resolve('not_supported'); } }); }
else if (f === '6') { si.dockerInfo().then(data => { if (data !== null) { resolve({ data, title: 'Docker Info' }); } else { resolve('not_supported'); } }); }
else if (f === '7') { si.dockerContainers(true).then(data => { if (data !== null) { resolve({ data, title: 'Docker Containers' }); } else { resolve('not_supported'); } }); }
else if (f === '8') { si.dockerContainerStats('1').then(data => { if (data !== null) { resolve({ data, title: 'Docker Cont Stats' }); } else { resolve('not_supported'); } }); }
else if (f === '9') { si.dockerContainerProcesses('1').then(data => { if (data !== null) { resolve({ data, title: 'Docker Cont Processes' }); } else { resolve('not_supported'); } }); }
else if (f === '0') { si.dockerAll().then(data => { if (data !== null) { resolve({ data, title: 'Docker All' }); } else { resolve('not_supported'); } }); }
else if (f === '7') { si.dockerImages().then(data => { if (data !== null) { resolve({ data, title: 'Docker Images' }); } else { resolve('not_supported'); } }); }
else if (f === '8') { si.dockerContainers(true).then(data => { if (data !== null) { resolve({ data, title: 'Docker Containers' }); } else { resolve('not_supported'); } }); }
else if (f === '9') { si.dockerContainerStats('*').then(data => { if (data !== null) { resolve({ data, title: 'Docker Cont Stats' }); } else { resolve('not_supported'); } }); }
else if (f === '0') { si.dockerContainerProcesses('*').then(data => { if (data !== null) { resolve({ data, title: 'Docker Cont Processes' }); } else { resolve('not_supported'); } }); }
else if (f === '+') { si.dockerVolumes().then(data => { if (data !== null) { resolve({ data, title: 'Docker Volumes' }); } else { resolve('not_supported'); } }); }
else if (f === ',') { si.getStaticData().then(data => { if (data !== null) { resolve({ data, title: 'All Static Data' }); } else { resolve('not_supported'); } }); }
else if (f === '.') { si.getDynamicData('apache2, postgres, wsearch').then(data => { if (data !== null) { resolve({ data, title: 'All Dynamic Data' }); } else { resolve('not_supported'); } }); }
else if (f === '/') { si.getAllData('apache2, postgres, wsearch').then(data => { if (data !== null) { resolve({ data, title: 'All Data' }); } else { resolve('not_supported'); } }); }

View File

@ -15,21 +15,21 @@ function printHeader() {
function printMenu() {
console.log('');
console.log('┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐');
console.log('│ a ... Audio h ... Bluetooth s ... Services Y ... Battery ? ... Get Object │');
console.log('│ b ... BIOS i ... INET Latency S ... Shell z ... Users , ... All Static │');
console.log('│ B ... Baseboard I ... INET Check Site t ... time 1 ... NET Iface Default . ... All Dynamic │');
console.log('│ C ... Chassis j ... CPU Current Speed T ... CPU Temperature 2 ... NET Gateway Default / ... All │');
console.log('│ c ... CPU l ... CPU Current Load u ... USB 3 ... NET Interfaces │');
console.log('│ d ... DiskLayout L ... Full Load U ... UUID 4 ... NET Stats │');
console.log('│ D ... DiskIO m ... Memory v ... Versions 5 ... NET Connections │');
console.log('│ e ... Block Devices M ... MEM Layout V ... Virtual Box 6 ... Docker Info │');
console.log('│ E ... Open Files o ... OS Info w ... WIFI networks 7 ... Docker Container │');
console.log('│ f ... FS Size p ... Processes W ... WIFI interfaces 8 ... Docker Cont Stats │');
console.log('│ F ... FS Stats P ... Process Load x ... WIFI connections 9 ... Docker Cont Proc │');
console.log('│ g ... Graphics r ... Printer y ... System 0 ... Docker All q >>> QUIT │');
console.log('└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘');
console.log('┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐');
console.log('│ a ... Audio i ... INET Latency t ... time 1 ... NET Iface Default ? ... Get Object │');
console.log('│ b ... BIOS I ... INET Check Site T ... CPU Temperature 2 ... NET Gateway Default , ... All Static │');
console.log('│ B ... Baseboard j ... CPU Current Speed u ... USB 3 ... NET Interfaces . ... All Dynamic │');
console.log('│ C ... Chassis l ... CPU Current Load U ... UUID 4 ... NET Stats / ... All │');
console.log('│ c ... CPU L ... Full Load v ... Versions 5 ... NET Connections │');
console.log('│ d ... DiskLayout m ... Memory V ... Virtual Box │');
console.log('│ D ... DiskIO M ... MEM Layout w ... WIFI networks │');
console.log('│ e ... Block Devices o ... OS Info W ... WIFI interfaces 6 ... Docker Info │');
console.log('│ E ... Open Files p ... Processes x ... WIFI connections 7 ... Docker Images │');
console.log('│ f ... FS Size P ... Process Load y ... System 8 ... Docker Container │');
console.log('│ F ... FS Stats r ... Printer Y ... Battery 9 ... Docker Cont Stats │');
console.log('│ g ... Graphics s ... Services z ... Users 0 ... Docker Cont Proc │');
console.log('│ h ... Bluetooth S ... Shell + ... Docker Volumes q >>> QUIT │');
console.log('└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘');
}
function EnableUserInput() {