-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtips
More file actions
206 lines (153 loc) · 5.82 KB
/
Copy pathtips
File metadata and controls
206 lines (153 loc) · 5.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# cmd 中文乱码
在cmd中输入 CHCP 65001
CHCP是一个计算机指令,能够显示或设置活动代码页编号。
代码页 描述
65001 UTF-8代码页
950 繁体中文
936 简体中文默认的GBK
437 MS-DOS 美国英语
# 正则表达式查找
进行正则表达式查找的时候, 对于vim, 一定要关闭 ignorecase.
# syscall
grep -rn "SYSCALL_DEFINE[0-9](ptrace" ./*
# cat ifcfg-enp5s0
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp5s0
UUID=f981e110-2f0a-49e7-9ac2-9ba99f16da4e
DEVICE=enp5s0
ONBOOT=yes
BRIDGE=br0
# cat ifcfg-br0
TYPE=Bridge
BOOTPROTO=none
NAME=br0
DEVICE=br0
ONBOOT=yes
IPADDR=10.10.10.10
NETMASK=255.255.255.0
STP=on
DELAY=0
# cat qemu-ifup
#!/bin/bash
switch=br0
if [ -n "$1" ] ; then
#tunctl -u $(whoami) -t $1
ifconfig $1 up
sleep 1
brctl addif $switch $1
exit 0
else
echo 'Error: no specifed interface.'
exit 1
fi
# cat qemu-ifdown
#!/bin/bash
switch=br0
if [ -n $1 ] ; then
tunctl -d $1
brctl delif ${switch} $1
ip link set $1 down
exit 0
else
echo "Error: no interface specified"
exit 1
fi
# qemu-system-x86_64 -drive file=centos7.img,format=qcow2 -cdrom /opt/CentOS-7-x86_64-DVD-1804.iso -enable-kvm -m 1G -net nic -net tap,ifname=tap1,script=etc/qemu-ifup,downscript=etc/qemu-ifdown
# https://github.com/bianjp/popup-dict
# https://buildlogs.centos.org/c7.1708.u.x86_64/kernel/20180125201039/3.10.0-693.17.1.el7.x86_64/kernel-debuginfo-common-x86_64-3.10.0-693.17.1.el7.x86_64.rpm
No kdump initial ramdisk found.
Rebuilding /boot/initramfs-3.10.0-862.el7.x86_64kdump.img
dracut-033-535.el7
Executing: /usr/sbin/dracut --hostonly --hostonly-cmdline --hostonly-i18n -o "plymouth dash resume ifcfg" --mount "/dev/mapper/centos-root /sysroot ext4 defaults" --no-hostonly-default-device -f /boot/initramfs-3.10.0-862.el7.x86_64kdump.img 3.10.0-862.el7.x86_64
The command name of the process currently executing on the CPU that initiated the panic. If this is "swapper" then the CPU was idle at the time and has probably panicked within an interrupt handler.
1、硬件问题
使用了 SCSI-device 并且使用了未知命令
#WDIOS_TEMPPANIC Kernel panic on temperature trip
#
# The SETOPTIONS call can be used to enable and disable the card
# and to ask the driver to call panic if the system overheats.
#
# If one uses a SCSI-device of unsupported type/commands, one
# immediately runs into a kernel-panic caused by Command Error. To better
# understand which SCSI-command caused the problem, I extended this
# specific panic-message slightly.
#
#read/write causes a command error from
# the subsystem and this causes kernel-panic
2、系统过热
如果系统过热会调用panci,系统挂起
#WDIOS_TEMPPANIC Kernel panic on temperature trip
#
# The SETOPTIONS call can be used to enable and disable the card
# and to ask the driver to call panic if the system overheats.
3、文件系统引起
#A variety of panics and hangs with /tmp on a reiserfs filesystem
#Any other panic, hang, or strange behavior
#
# It turns out that there's a limit of six environment variables on the
# kernel command line. When that limit is reached or exceeded, argument
# processing stops, which means that the 'root=' argument that UML
# usually adds is not seen. So, the filesystem has no idea what the
# root device is, so it panics.
# The fix is to put less stuff on the command line. Glomming all your
# setup variables into one is probably the best way to go.
Linux内核命令行有6个环境变量。如果即将达到或者已经超过了的话 root= 参数会没有传进去
启动时会引发panics错误。
vi grub.conf
#####################
title Red Hat Enterprise Linux AS (2.6.9-67.0.15.ELsmp)
root (hd0,0)
kernel /boot/vmlinuz-2.6.9-67.0.15.ELsmp ro root=LABEL=/
initrd /boot/initrd-2.6.9-67.0.15.ELsmp.img
title Red Hat Enterprise Linux AS-up (2.6.9-67.EL)
root (hd0,0)
kernel /boot/vmlinuz-2.6.9-67.EL ro root=LABEL=/
initrd /boot/initrd-2.6.9-67.EL.img
应该是 其中的 root=LABEL=/ 没有起作用。
4、内核更新
网上相关文档多半是因为升级内核引起的,建议使用官方标准版、稳定版
另外还有使用磁盘的lvm 逻辑卷,添加CPU和内存。可在BIOS中禁掉声卡驱动等不必要的设备。
也有报是ext3文件系统的问题。
解决: 手工编译内核,把 ext3相关的模块都编译进去,
5、处理panic后的系统自动重启
panic.c源文件有个方法,当panic挂起后,指定超时时间,可以重新启动机器
if (panic_timeout > 0)
{
int i;
/*
* Delay timeout seconds before rebooting the machine.
* We can't use the "normal" timers since we just panicked..
*/
printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
for (i = 0; i < panic_timeout; i++) {
touch_nmi_watchdog();
mdelay(1000);
}
修改方法:
/etc/sysctl.conf文件中加入
kernel.panic = 30 #panic错误中自动重启,等待时间为30秒
kernel.sysrq=1 #激活Magic SysRq! 否则,键盘鼠标没有响应
原文:https://blog.csdn.net/willand1981/article/details/5663356
https://www.slideshare.net/liranbh/android-internals-65695961
Android internals
https://www.slideshare.net/HaoRanLiu12
# auditctl
auditctl -a always,exit -F arch=b64 -S open -F dir=/home/cloud/tmp -F auid=1000
auditctl -a always,exit -F arch=b64 -S open -F path=/home/cloud/tmp/ps.eF -F auid=1000
ausearch -ts 07/15/2018 20:37:00
# astyle
find . -iname "*.[c|h]" -print0 | xargs -0 -n1 -I "ZZZZZ" astyle --style=ansi --indent=spaces=4 --indent-switches --pad-oper --pad-header --add-brackets --suffix=none "ZZZZZ"
https://mp.weixin.qq.com/s/cX1ciAsYZ0WZm6baFDl-NA
http://web.mit.edu/kerberos/dialogue.html
https://www.anquanke.com/post/id/171552#h3-5
https://www.zhihu.com/question/22177404