memLayout() added ECC flag, bios() added language, features (linux)
This commit is contained in:
parent
00faa546e8
commit
3c20d765a5
@ -30,7 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| Version | Date | Comment |
|
||||||
| -------------- | -------------- | -------- |
|
| -------------- | -------------- | -------- |
|
||||||
| 5.1.0 | 2020-02-08 | `memLayout()` added ECC flag |
|
| 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.11 | 2020-02-07 | `fsSize()` fixed windows WSL issue |
|
||||||
| 5.0.10 | 2020-02-06 | `getDynamicData()` 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.9 | 2020-02-02 | `fsSize()` fixed parsing edge case issue mac OS |
|
||||||
|
|||||||
@ -101,7 +101,7 @@ si.cpu()
|
|||||||
|
|
||||||
(last 7 major and minor version releases)
|
(last 7 major and minor version releases)
|
||||||
|
|
||||||
- Version 5.1.0: `memLayout()` added ECC flag
|
- 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 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.34.0: `system()` added flag virtual (linux, windows)
|
||||||
- Version 4.33.0: `graphics()` added nvidia-smi support (linux, windows)
|
- Version 4.33.0: `graphics()` added nvidia-smi support (linux, windows)
|
||||||
|
|||||||
@ -59,7 +59,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">5.1.0</th>
|
<th scope="row">5.1.0</th>
|
||||||
<td>2020-02-08</td>
|
<td>2020-02-08</td>
|
||||||
<td><span class="code">memLayout()</span> added ECC flag</td>
|
<td><span class="code">memLayout()</span> added ECC flag, <span class="code">bios()</span> added language, features (linux)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">5.0.11</th>
|
<th scope="row">5.0.11</th>
|
||||||
|
|||||||
@ -361,6 +361,7 @@ si.memLayout().then(data => console.log(data));</code></pre class="example">
|
|||||||
size: 34359738368,
|
size: 34359738368,
|
||||||
bank: 'BANK 0',
|
bank: 'BANK 0',
|
||||||
type: 'DDR4',
|
type: 'DDR4',
|
||||||
|
ecc: false,
|
||||||
clockSpeed: 2667,
|
clockSpeed: 2667,
|
||||||
formFactor: 'SODIMM',
|
formFactor: 'SODIMM',
|
||||||
manufacturer: '029E',
|
manufacturer: '029E',
|
||||||
@ -374,6 +375,7 @@ si.memLayout().then(data => console.log(data));</code></pre class="example">
|
|||||||
size: 34359738368,
|
size: 34359738368,
|
||||||
bank: 'BANK 2',
|
bank: 'BANK 2',
|
||||||
type: 'DDR4',
|
type: 'DDR4',
|
||||||
|
ecc: false,
|
||||||
clockSpeed: 2667,
|
clockSpeed: 2667,
|
||||||
formFactor: 'SODIMM',
|
formFactor: 'SODIMM',
|
||||||
manufacturer: '029E',
|
manufacturer: '029E',
|
||||||
|
|||||||
@ -292,6 +292,26 @@ si.uuid().then(data => console.log(data));</code></pre class="example">
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td>revision</td>
|
<td>revision</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>language</td>
|
||||||
|
<td>X</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>bios language</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>features</td>
|
||||||
|
<td>X</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>supported features</td>
|
||||||
|
</tr>
|
||||||
<tr class="example">
|
<tr class="example">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="7">
|
<td colspan="7">
|
||||||
@ -303,7 +323,20 @@ si.bios().then(data => console.log(data));</code></pre class="example">
|
|||||||
vendor: 'American Megatrends Inc.',
|
vendor: 'American Megatrends Inc.',
|
||||||
version: 'P4.20',
|
version: 'P4.20',
|
||||||
releaseDate: '2019-09-05',
|
releaseDate: '2019-09-05',
|
||||||
revision: '5.13'
|
revision: '5.13',
|
||||||
|
langage: 'en',
|
||||||
|
features: [
|
||||||
|
'PCI',
|
||||||
|
'Boot from CD',
|
||||||
|
'Selectable boot',
|
||||||
|
'EDD',
|
||||||
|
'Print screen service',
|
||||||
|
'ACPI',
|
||||||
|
'USB legacy',
|
||||||
|
'BIOS boot specification',
|
||||||
|
'Targeted content distribution',
|
||||||
|
'UEFI'
|
||||||
|
]
|
||||||
}</pre>
|
}</pre>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
2
lib/index.d.ts
vendored
2
lib/index.d.ts
vendored
@ -38,6 +38,8 @@ export namespace Systeminformation {
|
|||||||
version: string;
|
version: string;
|
||||||
releaseDate: string;
|
releaseDate: string;
|
||||||
revision: string;
|
revision: string;
|
||||||
|
language?: string;
|
||||||
|
features?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
interface BaseboardData {
|
interface BaseboardData {
|
||||||
|
|||||||
@ -452,9 +452,8 @@ function bios(callback) {
|
|||||||
if (_linux || _freebsd || _openbsd || _netbsd) {
|
if (_linux || _freebsd || _openbsd || _netbsd) {
|
||||||
if (process.arch === 'arm') {
|
if (process.arch === 'arm') {
|
||||||
cmd = 'cat /proc/cpuinfo | grep Serial';
|
cmd = 'cat /proc/cpuinfo | grep Serial';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
cmd = 'export LC_ALL=C; dmidecode --type 0 2>/dev/null; unset LC_ALL';
|
cmd = 'export LC_ALL=C; dmidecode -t bios 2>/dev/null; unset LC_ALL';
|
||||||
}
|
}
|
||||||
exec(cmd, function (error, stdout) {
|
exec(cmd, function (error, stdout) {
|
||||||
let lines = stdout.toString().split('\n');
|
let lines = stdout.toString().split('\n');
|
||||||
@ -463,6 +462,20 @@ function bios(callback) {
|
|||||||
let datetime = util.getValue(lines, 'Release Date');
|
let datetime = util.getValue(lines, 'Release Date');
|
||||||
result.releaseDate = util.parseDateTime(datetime).date;
|
result.releaseDate = util.parseDateTime(datetime).date;
|
||||||
result.revision = util.getValue(lines, 'BIOS Revision');
|
result.revision = util.getValue(lines, 'BIOS Revision');
|
||||||
|
let language = util.getValue(lines, 'Currently Installed Language').split('|')[0];
|
||||||
|
if (language) {
|
||||||
|
result.language = language;
|
||||||
|
}
|
||||||
|
if (lines.length && stdout.toString().indexOf('Characteristics:') >= 0) {
|
||||||
|
const features = [];
|
||||||
|
lines.forEach(line => {
|
||||||
|
if (line.indexOf(' is supported') >= 0) {
|
||||||
|
const feature = line.split(' is supported')[0].trim();
|
||||||
|
features.push(feature);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
result.features = features;
|
||||||
|
}
|
||||||
// Non-Root values
|
// Non-Root values
|
||||||
const cmd = `echo -n "bios_date: "; cat /sys/devices/virtual/dmi/id/bios_date 2>/dev/null; echo;
|
const cmd = `echo -n "bios_date: "; cat /sys/devices/virtual/dmi/id/bios_date 2>/dev/null; echo;
|
||||||
echo -n "bios_vendor: "; cat /sys/devices/virtual/dmi/id/bios_vendor 2>/dev/null; echo;
|
echo -n "bios_vendor: "; cat /sys/devices/virtual/dmi/id/bios_vendor 2>/dev/null; echo;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user