graphics() subVendor fix

This commit is contained in:
Sebastian Hildebrandt 2023-08-28 15:23:50 +02:00
parent 954dd229cc
commit 88d654a64c
9 changed files with 56 additions and 47 deletions

View File

@ -83,7 +83,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment | | Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- | | ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.21.0 | 2023-08-28 | `graphics()` added subvendor (linux) `memLayout()` DDR5 detection (windows) | | 5.21.0 | 2023-08-28 | `graphics()` added subVendor (linux) `memLayout()` DDR5 detection (windows) |
| 5.20.0 | 2023-08-25 | `mem()` added writenack and dirty (linux) | | 5.20.0 | 2023-08-25 | `mem()` added writenack and dirty (linux) |
| 5.19.1 | 2023-08-23 | `wifiNetworks()` improved SSID parsing (macOS) | | 5.19.1 | 2023-08-23 | `wifiNetworks()` improved SSID parsing (macOS) |
| 5.19.0 | 2023-08-22 | `currentLoad()` added steal and guest time (linux) | | 5.19.0 | 2023-08-22 | `currentLoad()` added steal and guest time (linux) |

View File

@ -128,6 +128,7 @@ si.cpu()
(last 7 major and minor version releases) (last 7 major and minor version releases)
- Version 5.21.0: `graphics()` added subVendor (linux)
- Version 5.20.0: `mem()` added writeback and dirty (linux) - Version 5.20.0: `mem()` added writeback and dirty (linux)
- Version 5.19.0: `currentLoad()` added steal and guest time (linux) - Version 5.19.0: `currentLoad()` added steal and guest time (linux)
- Version 5.18.0: `fsSize()` added optional drive parameter - Version 5.18.0: `fsSize()` added optional drive parameter
@ -329,7 +330,7 @@ Full function reference with examples can be found at [https://systeminformation
| si.graphics(cb) | {...} | X | | X | X | | arrays of graphics controllers and displays | | si.graphics(cb) | {...} | X | | X | X | | arrays of graphics controllers and displays |
| | controllers[] | X | | X | X | | graphics controllers array | | | controllers[] | X | | X | X | | graphics controllers array |
| | ...[0].vendor | X | | X | X | | e.g. NVIDIA | | | ...[0].vendor | X | | X | X | | e.g. NVIDIA |
| | ...[0].subvendor | X | | | | | e.g. Gigabyte | | | ...[0].subVendor | X | | | | | e.g. Gigabyte |
| | ...[0].vendorId | | | X | | | vendor ID | | | ...[0].vendorId | | | X | | | vendor ID |
| | ...[0].model | X | | X | X | | graphics controller model | | | ...[0].model | X | | X | X | | graphics controller model |
| | ...[0].deviceId | | | X | | | device ID | | | ...[0].deviceId | | | X | | | device ID |
@ -635,38 +636,38 @@ Full function reference with examples can be found at [https://systeminformation
#### 14. Wifi #### 14. Wifi
| Function | Result object | Linux | BSD | Mac | Win | Sun | Comments | | Function | Result object | Linux | BSD | Mac | Win | Sun | Comments |
| ---------------------- | --------------- | ----- | --- | --- | --- | --- | --------------------------------- | | ---------------------- | --------------- | ----- | --- | --- | --- | --- | --------------------------------------------- |
| si.wifiNetworks(cb) | [{...}] | X | | X | X | | array of available wifi networks | | si.wifiNetworks(cb) | [{...}] | X | | X | X | | array of available wifi networks |
| | [0].ssid | X | | X | X | | Wifi network SSID | | | [0].ssid | X | | X | X | | Wifi network SSID |
| | [0].bssid | X | | X | X | | BSSID (mac) | | | [0].bssid | X | | X | X | | BSSID (mac) |
| | [0].mode | X | | | | | mode | | | [0].mode | X | | | | | mode |
| | [0].channel | X | | X | X | | channel | | | [0].channel | X | | X | X | | channel |
| | [0].frequency | X | | X | X | | frequency in MHz | | | [0].frequency | X | | X | X | | frequency in MHz |
| | [0].signalLevel | X | | X | X | | signal level in dB | | | [0].signalLevel | X | | X | X | | signal level in dB |
| | [0].quality | X | | X | X | | quality in % | | | [0].quality | X | | X | X | | quality in % |
| | [0].security | X | | X | X | | array e.g. WPA, WPA-2 | | | [0].security | X | | X | X | | array e.g. WPA, WPA-2 |
| | [0].wpaFlags | X | | X | X | | array of WPA flags | | | [0].wpaFlags | X | | X | X | | array of WPA flags |
| | [0].rsnFlags | X | | | | | array of RDN flags | | | [0].rsnFlags | X | | | | | array of RDN flags |
| si.wifiInterfaces(cb) | [{...}] | X | | X | X | | array of detected wifi interfaces | | si.wifiInterfaces(cb) | [{...}] | X | | X | X | | array of detected wifi interfaces |
| | [0].id | X | | X | X | | ID | | | [0].id | X | | X | X | | ID |
| | [0].iface | X | | X | X | | interface | | | [0].iface | X | | X | X | | interface |
| | [0].model | X | | X | X | | model | | | [0].model | X | | X | X | | model |
| | [0].vendor | X | | X | X | | vendor | | | [0].vendor | X | | X | X | | vendor |
| | [0].mac | X | | X | X | | MAC address | | | [0].mac | X | | X | X | | MAC address |
| si.wifiConnections(cb) | [{...}] | X | | X | X | | array of active wifi connections | | si.wifiConnections(cb) | [{...}] | X | | X | X | | array of active wifi connections |
| | [0].id | X | | X | X | | ID | | | [0].id | X | | X | X | | ID |
| | [0].iface | X | | X | X | | interface | | | [0].iface | X | | X | X | | interface |
| | [0].name | X | | X | X | | name | | | [0].name | X | | X | X | | name |
| | [0].mode | X | | X | X | | model | | | [0].mode | X | | X | X | | model |
| | [0].bssid | X | | X | X | | BSSID (mac) | | | [0].bssid | X | | (X) | X | | BSSID (mac) - macOS only on older os versions |
| | [0].mode | X | | | | | mode | | | [0].mode | X | | | | | mode |
| | [0].channel | X | | X | X | | channel | | | [0].channel | X | | X | X | | channel |
| | [0].frequency | X | | X | X | | frequency in MHz | | | [0].frequency | X | | X | X | | frequency in MHz |
| | [0].signalLevel | X | | X | X | | signal level in dB | | | [0].signalLevel | X | | X | X | | signal level in dB |
| | [0].quality | X | | X | X | | quality in % | | | [0].quality | X | | X | X | | quality in % |
| | [0].security | X | | X | X | | array e.g. WPA, WPA-2 | | | [0].security | X | | X | X | | array e.g. WPA, WPA-2 |
| | [0].txRate | X | | X | X | | transfer rate MBit/s | | | [0].txRate | X | | X | X | | transfer rate MBit/s |
#### 15. Bluetooth #### 15. Bluetooth

View File

@ -181,6 +181,7 @@
<li><span class="code">fsSize()</span>: added <span class="code">available</span></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">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> <li><span class="code">getData()</span>: support for passing parameters and filters (see <a href="general.html">section General / getData</a>)</li>
<li><span class="code">graphics()</span>: extended properties linux</li>
<li><span class="code">graphics()</span>: extended properties macOS</li> <li><span class="code">graphics()</span>: extended properties macOS</li>
<li><span class="code">graphics()</span>: extended nvidia-smi parsing</li> <li><span class="code">graphics()</span>: extended nvidia-smi parsing</li>
<li><span class="code">networkInterfaces()</span>: type detection improved (win - wireless)</li> <li><span class="code">networkInterfaces()</span>: type detection improved (win - wireless)</li>

View File

@ -99,13 +99,13 @@
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
<td>...[0].subvendor</td> <td>...[0].subVendor</td>
<td>X</td> <td>X</td>
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
<td>Subvendor e.g. Gigabyte</td> <td>Sub-Vendor e.g. Gigabyte</td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>

View File

@ -57,10 +57,15 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr>
<th scope="row">5.21.1</th>
<td>2023-08-28</td>
<td><span class="code">graphics()</span> subVendor fix (linux)</td>
</tr>
<tr> <tr>
<th scope="row">5.21.0</th> <th scope="row">5.21.0</th>
<td>2023-08-28</td> <td>2023-08-28</td>
<td><span class="code">graphics()</span> added subvendor (linux) <span class="code">mamLayout()</span> DDR5 detection (windows)</td> <td><span class="code">graphics()</span> added subVendor (linux) <span class="code">mamLayout()</span> DDR5 detection (windows)</td>
</tr> </tr>
<tr> <tr>
<th scope="row">5.20.0</th> <th scope="row">5.20.0</th>

View File

@ -236,7 +236,9 @@ si.mem().then(data => console.log(data));</code></pre class="example">
buffcache: 1132142592, buffcache: 1132142592,
swaptotal: 8589930496, swaptotal: 8589930496,
swapused: 0, swapused: 0,
swapfree: 8589930496 swapfree: 8589930496,
writeback: 0,
dirty: 8192
} }
</pre> </pre>
</tr> </tr>

View File

@ -393,10 +393,10 @@ si.wifiInterfaces().then(data => console.log(data));</code></pre class="example"
<td>[0].bssid</td> <td>[0].bssid</td>
<td>X</td> <td>X</td>
<td></td> <td></td>
<td>X</td> <td>(X)</td>
<td>X</td> <td>X</td>
<td></td> <td></td>
<td>BSSID (mac)</td> <td>BSSID (mac) - macOS only on older os versions</td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
@ -472,7 +472,7 @@ si.wifiConnections().then(data => console.log(data));</code></pre class="example
name: 'AirPort', name: 'AirPort',
model: 'AirPort', model: 'AirPort',
ssid: 'my-own-internet', ssid: 'my-own-internet',
bssid: '01:23:45:67:89:0a', bssid: '01:23:45:67:89:0a', // no longer supported on newer macOS versions
channel: 36, channel: 36,
frequency: 5180, frequency: 5180,
type: '802.11', type: '802.11',
@ -539,4 +539,4 @@ si.wifiConnections().then(data => console.log(data));</code></pre class="example
</script> </script>
</body> </body>
</html> </html>

View File

@ -204,7 +204,7 @@ function graphics(callback) {
let controllers = []; let controllers = [];
let currentController = { let currentController = {
vendor: '', vendor: '',
subvendor: '', subVendor: '',
model: '', model: '',
bus: '', bus: '',
busAddress: '', busAddress: '',
@ -293,9 +293,9 @@ function graphics(callback) {
} }
} }
if (currentController.model && subsystem.indexOf(currentController.model) !== -1) { if (currentController.model && subsystem.indexOf(currentController.model) !== -1) {
const subvendor = subsystem.split(currentController.model)[0].trim(); const subVendor = subsystem.split(currentController.model)[0].trim();
if (subvendor) { if (subVendor) {
currentController.subvendor = subvendor; currentController.subVendor = subVendor;
} }
} }
} }

2
lib/index.d.ts vendored
View File

@ -306,7 +306,7 @@ export namespace Systeminformation {
interface GraphicsControllerData { interface GraphicsControllerData {
vendor: string; vendor: string;
subvendor?: string; subVendor?: string;
vendorId?: string; vendorId?: string;
model: string; model: string;
deviceId?: string; deviceId?: string;