graphics() improved nvidia-smi detection (windows)

This commit is contained in:
Sebastian Hildebrandt 2026-01-23 16:44:19 +01:00
parent 5231c64cb6
commit 53cca2f690
4 changed files with 10 additions and 3 deletions

View File

@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.30.6 | 2026-01-22 | `graphics()` improved nvidia-smi detection (windows) |
| 5.30.5 | 2026-01-16 | `networkInterfaces()` fix uppercase iface names (linux) |
| 5.30.4 | 2026-01-15 | `powerShell()` fix UTF8 output (windows) |
| 5.30.3 | 2026-01-11 | Updated docs, code cleanup |

View File

@ -57,6 +57,12 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.30.6
</th>
<td>2026-01-22</td>
<td><span class="code">graphics()</span> improved nvidia-smi detection (windows)</td>
</tr>
<tr>
<th scope="row">5.30.5
</th>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.30.5</span></div>
<div class="version">New Version: <span id="version">5.30.6</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">

View File

@ -455,12 +455,12 @@ function graphics(callback) {
if (nvidiaSmiExe) {
const nvidiaSmiOpts =
'--query-gpu=driver_version,pci.sub_device_id,name,pci.bus_id,fan.speed,memory.total,memory.used,memory.free,utilization.gpu,utilization.memory,temperature.gpu,temperature.memory,power.draw,power.limit,clocks.gr,clocks.mem --format=csv,noheader,nounits';
const cmd = nvidiaSmiExe + ' ' + nvidiaSmiOpts;
const cmd = `"${nvidiaSmiExe}" ${nvidiaSmiOpts}`;
if (_linux) {
options.stdio = ['pipe', 'pipe', 'ignore'];
}
try {
const sanitized = util.sanitizeShellString(cmd) + (_linux ? ' 2>/dev/null' : '') + (_windows ? ' 2> nul' : '');
const sanitized = cmd + (_linux ? ' 2>/dev/null' : '') + (_windows ? ' 2> nul' : '');
const res = execSync(sanitized, options).toString();
return res;
} catch {