memLayout() added ECC flag
This commit is contained in:
parent
412d9573c3
commit
00faa546e8
@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
|
||||
|
||||
| Version | Date | Comment |
|
||||
| -------------- | -------------- | -------- |
|
||||
| 5.1.0 | 2020-02-08 | `memLayout()` added ECC flag |
|
||||
| 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 |
|
||||
|
||||
@ -101,13 +101,13 @@ si.cpu()
|
||||
|
||||
(last 7 major and minor version releases)
|
||||
|
||||
- Version 5.1.0: `memLayout()` added ECC flag
|
||||
- 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
|
||||
- Version 4.30.0: `get()` added possibility to provide parameters
|
||||
- Version 4.29.0: `fsSize()` correct fs type detection macOS (HFS, APFS, NFS)
|
||||
- ...
|
||||
|
||||
You can find all changes here: [detailed changelog][changelog-url]
|
||||
|
||||
@ -56,6 +56,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">5.1.0</th>
|
||||
<td>2020-02-08</td>
|
||||
<td><span class="code">memLayout()</span> added ECC flag</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">5.0.11</th>
|
||||
<td>2020-02-07</td>
|
||||
|
||||
@ -170,7 +170,7 @@
|
||||
<img class="logo" src="assets/logo.png">
|
||||
<div class="title">systeminformation</div>
|
||||
<div class="subtitle"><span id="typed"></span> </div>
|
||||
<div class="version">New Version: <span id="version">5.0.11</span></div>
|
||||
<div class="version">New Version: <span id="version">5.1.0</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">
|
||||
|
||||
@ -259,6 +259,16 @@ si.mem().then(data => console.log(data));</code></pre class="example">
|
||||
<td></td>
|
||||
<td>memory type</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].ecc</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>ECC memory</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>[0].clockSpeed</td>
|
||||
|
||||
1
lib/index.d.ts
vendored
1
lib/index.d.ts
vendored
@ -123,6 +123,7 @@ export namespace Systeminformation {
|
||||
size: number;
|
||||
bank: string;
|
||||
type: string;
|
||||
ecc?: boolean;
|
||||
clockSpeed: number;
|
||||
formFactor: string;
|
||||
partNum: string;
|
||||
|
||||
@ -317,10 +317,13 @@ function memLayout(callback) {
|
||||
const sizeString = util.getValue(lines, 'Size');
|
||||
const size = sizeString.indexOf('GB') >= 0 ? parseInt(sizeString, 10) * 1024 * 1024 * 1024 : parseInt(sizeString, 10) * 1024 * 1024;
|
||||
if (parseInt(util.getValue(lines, 'Size'), 10) > 0) {
|
||||
const totalWidth = util.toInt(util.getValue(lines, 'Total Width'));
|
||||
const dataWidth = util.toInt(util.getValue(lines, 'Data Width'));
|
||||
result.push({
|
||||
size,
|
||||
bank: util.getValue(lines, 'Bank Locator'),
|
||||
type: util.getValue(lines, 'Type:'),
|
||||
ecc: dataWidth && totalWidth ? totalWidth > dataWidth : false,
|
||||
clockSpeed: (util.getValue(lines, 'Configured Clock Speed:') ? parseInt(util.getValue(lines, 'Configured Clock Speed:'), 10) : (util.getValue(lines, 'Speed:') ? parseInt(util.getValue(lines, 'Speed:'), 10) : null)),
|
||||
formFactor: util.getValue(lines, 'Form Factor:'),
|
||||
manufacturer: getManufacturerLinux(util.getValue(lines, 'Manufacturer:')),
|
||||
@ -335,6 +338,7 @@ function memLayout(callback) {
|
||||
size: 0,
|
||||
bank: util.getValue(lines, 'Bank Locator'),
|
||||
type: 'Empty',
|
||||
ecc: null,
|
||||
clockSpeed: 0,
|
||||
formFactor: util.getValue(lines, 'Form Factor:'),
|
||||
partNum: '',
|
||||
@ -351,6 +355,7 @@ function memLayout(callback) {
|
||||
size: os.totalmem(),
|
||||
bank: '',
|
||||
type: '',
|
||||
ecc: null,
|
||||
clockSpeed: 0,
|
||||
formFactor: '',
|
||||
partNum: '',
|
||||
@ -375,10 +380,11 @@ function memLayout(callback) {
|
||||
'2': 450,
|
||||
'3': 3200
|
||||
};
|
||||
result[0].clockSpeed = version && version[2] && clockSpeed[version[2]] || 400;
|
||||
result[0].clockSpeed = version && version[4] && version[4] === 'd' ? '500' : result[0].clockSpeed;
|
||||
result[0].type = 'LPDDR2';
|
||||
result[0].type = version && version[2] && version[2] === '3' ? 'LPDDR4' : result[0].type;
|
||||
result[0].ecc = false;
|
||||
result[0].clockSpeed = version && version[2] && clockSpeed[version[2]] || 400;
|
||||
result[0].clockSpeed = version && version[4] && version[4] === 'd' ? '500' : result[0].clockSpeed;
|
||||
result[0].formFactor = 'SoC';
|
||||
|
||||
stdout = execSync('vcgencmd get_config sdram_freq 2>/dev/null');
|
||||
@ -410,6 +416,8 @@ function memLayout(callback) {
|
||||
if (_darwin) {
|
||||
exec('system_profiler SPMemoryDataType', function (error, stdout) {
|
||||
if (!error) {
|
||||
const allLines = stdout.toString().split('\n');
|
||||
const eccStatus = util.getValue(allLines, 'ecc', ':', true).toLowerCase();
|
||||
let devices = stdout.toString().split(' BANK ');
|
||||
let hasBank = true;
|
||||
if (devices.length === 1) {
|
||||
@ -426,6 +434,7 @@ function memLayout(callback) {
|
||||
size: size * 1024 * 1024 * 1024,
|
||||
bank: bank,
|
||||
type: util.getValue(lines, ' Type:'),
|
||||
ecc: eccStatus ? eccStatus === 'enabled' : null,
|
||||
clockSpeed: parseInt(util.getValue(lines, ' Speed:'), 10),
|
||||
formFactor: '',
|
||||
manufacturer: getManufacturerDarwin(util.getValue(lines, ' Manufacturer:')),
|
||||
@ -440,6 +449,7 @@ function memLayout(callback) {
|
||||
size: 0,
|
||||
bank: bank,
|
||||
type: 'Empty',
|
||||
ecc: null,
|
||||
clockSpeed: 0,
|
||||
formFactor: '',
|
||||
manufacturer: '',
|
||||
@ -461,6 +471,7 @@ function memLayout(callback) {
|
||||
size: size * 1024 * 1024 * 1024,
|
||||
bank: 0,
|
||||
type,
|
||||
ecc: false,
|
||||
clockSpeed: 0,
|
||||
formFactor: '',
|
||||
manufacturer: 'Apple',
|
||||
@ -492,10 +503,13 @@ function memLayout(callback) {
|
||||
devices.shift();
|
||||
devices.forEach(function (device) {
|
||||
let lines = device.split('\r\n');
|
||||
const dataWidth = util.toInt(util.getValue(lines, 'DataWidth', '='));
|
||||
const totalWidth = util.toInt(util.getValue(lines, 'TotalWidth', '='));
|
||||
result.push({
|
||||
size: parseInt(util.getValue(lines, 'Capacity', '='), 10) || 0,
|
||||
bank: util.getValue(lines, 'abel', '='), // BankLabel
|
||||
type: memoryTypes[parseInt(util.getValue(lines, 'MemoryType', '='), 10)],
|
||||
ecc: dataWidth && totalWidth ? totalWidth > dataWidth : false,
|
||||
clockSpeed: parseInt(util.getValue(lines, 'ConfiguredClockSpeed', '='), 10) || 0,
|
||||
formFactor: FormFactors[parseInt(util.getValue(lines, 'FormFactor', '='), 10) || 0],
|
||||
manufacturer: util.getValue(lines, 'Manufacturer', '='),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user