我有一台运行 Ubuntu 14.04 LTS 的不稳定机器,它通过了 9 小时的 memtest86。
我得到这些:
Hardware event. This is not a software error.
MCE 0
CPU 1 BANK 0
TIME 1414735539 Fri Oct 31 17:05:39 2014
MCG status:
MCi status:
Corrected error
Error enabled
MCA: Internal parity error
STATUS 9000004000010005 MCGSTATUS 0
MCGCAP c09 APICID 2 SOCKETID 0
CPUID Vendor Intel Family 6 Model 58`
Run Code Online (Sandbox Code Playgroud)
这是机器继续运转的时候。当机器冻结时,我还没有一个。
什么是“MCE 0”?还有“马华”?我是在查看 CPU 错误还是 RAM 错误?
我有一根 8 GB 的 RAM。
更换硬件(RAM、CPU、主板、电源)的顺序是什么?这台机器以前很稳定。我应该稍微提高CPU电压吗?
我已经阅读了 mcelog 常见问题解答。谷歌搜索结果很少,而且大多数都有其他格式的类似消息(即可能是旧版本的内核/MCE)。
我知道从 bash 中读取命令的基本方法:
cal | while IFS= read -r line ; do
echo X${line}X
done
Run Code Online (Sandbox Code Playgroud)
但是,如果我想在循环中从多个文件/命令中读取一行怎么办?我试过命名管道,但他们只会吐出一行。
$ cal > myfifo &
$ IFS= read -r line < myfifo
[cal exits]
$ echo $line
February 2015
Run Code Online (Sandbox Code Playgroud)
所以我真正想要的是:
while [all pipes are not done]; do
IFS=
read line1 < pipe1 # reading one line from this one
read line2 < pipe2 # and one line from this one
read line3 < pipe3 # and one line from this one
print things with …Run Code Online (Sandbox Code Playgroud) 我有一个设备/var/iot/data,我试图在其中远程获取数据。
在机器本身上:
# cat /var/iot/data | xxd -ps -c 32
80de004a030270055678013ac591e5c6abac2185f4319c8088e3
Run Code Online (Sandbox Code Playgroud)
那是正确的数据。
如果我远程运行相同的东西,它看起来是正确的:
$ ssh -T -x dragino 'cat /var/iot/data | xxd -ps -c 32'
80de004a030270055678013ac591e5c6abac2185f4319c8088e3
Run Code Online (Sandbox Code Playgroud)
但它实际上带有一堆转义序列:
$ ssh -T -x dragino 'cat /var/iot/data | xxd -ps -c 32' | xxd
00000000: 1b5d 3131 3b23 3138 3464 3666 0738 3064 .]11;#184d6f.80d
00000010: 6530 3034 6130 3330 3237 3030 3535 3637 e004a03027005567
00000020: 3830 3133 6163 3539 3165 3563 3661 6261 8013ac591e5c6aba
00000030: 6332 3138 3566 3433 3139 6338 …Run Code Online (Sandbox Code Playgroud)