mem() bug parsing linux in other languages
This commit is contained in:
parent
0104f3fe60
commit
a3683e8635
@ -100,6 +100,7 @@ Other changes
|
||||
|
||||
| Version | Date | Comment |
|
||||
| -------------- | -------------- | -------- |
|
||||
| 3.45.6 | 2018-09-12 | `mem()` bug parsing linux in other languages |
|
||||
| 3.45.5 | 2018-09-07 | `diskLayout()` tiny bug S.M.A.R.T status windows |
|
||||
| 3.45.4 | 2018-09-06 | added icon to README.md |
|
||||
| 3.45.3 | 2018-09-06 | `diskLayout()` optimized media type detection (HD, SSD) on Windows |
|
||||
|
||||
@ -113,7 +113,7 @@ function mem(callback) {
|
||||
};
|
||||
|
||||
if (_linux) {
|
||||
exec('free -b', function (error, stdout) {
|
||||
exec('export LC_ALL=C; free -b ; unset LC_ALL', function (error, stdout) {
|
||||
if (!error) {
|
||||
let lines = stdout.toString().split('\n');
|
||||
|
||||
@ -244,7 +244,7 @@ function memLayout(callback) {
|
||||
let result = [];
|
||||
|
||||
if (_linux || _freebsd || _openbsd) {
|
||||
exec('dmidecode -t memory | grep -iE "Size:|Type|Speed|Manufacturer|Form Factor|Locator|Memory Device|Serial Number|Voltage|Part Number"', function (error, stdout) {
|
||||
exec('export LC_ALL=C; dmidecode -t memory | grep -iE "Size:|Type|Speed|Manufacturer|Form Factor|Locator|Memory Device|Serial Number|Voltage|Part Number"; unset LC_ALL', function (error, stdout) {
|
||||
if (!error) {
|
||||
let devices = stdout.toString().split('Memory Device');
|
||||
devices.shift();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user