linux coredumpÅäÖÃÓëµ÷ÊÔ
linux coredumpÅäÖÃÓëµ÷ÊÔ
À´Ô´:
ChinaUnix²©¿Í ¡¡ÈÕÆÚ£º
2009.02.09 17:11¡¡(¹²ÓÐ0
ÌõÆÀÂÛ) ÎÒÒªÆÀÂÛ
linux coredumpÅäÖÃÓëµ÷ÊÔ
Linux
Core Dump ÅäÖÃÓëµ÷ÊÔ
1.coreÎļþµÄÉú³É¿ª¹ØºÍ´óСÏÞÖÆ
---------------------------------
1£©Ê¹ÓÃulimit
-cÃüÁî¿É²é¿´coreÎļþµÄÉú³É¿ª¹Ø¡£Èô½á¹ûΪ0£¬Ôò±íʾ¹Ø±ÕÁ˴˹¦ÄÜ£¬²»»áÉú³ÉcoreÎļþ¡£
2£©
ʹÓÃulimit
-cfilesizeÃüÁ¿ÉÒÔÏÞÖÆcoreÎļþµÄ´óС£¨filesizeµÄµ¥Î»Îªkbyte£©¡£Èôulimit
-cunlimited£¬Ôò±íʾcoreÎļþµÄ´óС²»ÊÜÏÞÖÆ¡£Èç¹ûÉú³ÉµÄÐÅÏ¢³¬¹ý´Ë´óС£¬½«»á±»²Ã¼ô£¬×îÖÕÉú³ÉÒ»¸ö²»ÍêÕûµÄcoreÎļþ¡£ÔÚµ÷ÊÔ´Ë
coreÎļþµÄʱºò£¬gdb»áÌáʾ´íÎó¡£
2.coreÎļþµÄÃû³ÆºÍÉú³É·¾¶
----------------------------
ÈôϵͳÉú³ÉµÄcoreÎļþ²»´øÆäËüÈκÎÀ©Õ¹Ãû³Æ£¬ÔòÈ«²¿ÃüÃûΪcore¡£ÐµÄcoreÎļþÉú³É½«¸²¸ÇÔÀ´µÄcoreÎļþ¡£
1£©/proc/sys/kernel/core_uses_pid¿ÉÒÔ¿ØÖÆcoreÎļþµÄÎļþÃûÖÐÊÇ·ñÌí¼Ópid×÷ΪÀ©Õ¹¡£ÎļþÄÚÈÝΪ1£¬±íʾÌí¼Ópid×÷ΪÀ©Õ¹Ãû£¬Éú³ÉµÄcoreÎļþ¸ñʽΪcore.xxxx£»Îª0Ôò±íʾÉú³ÉµÄcoreÎļþͬһÃüÃûΪcore¡£
¿Éͨ¹ýÒÔÏÂÃüÁîÐ޸ĴËÎļþ£º
echo
"1" >
/proc/sys/kernel/core_uses_pid
2£©proc/sys/kernel/core_pattern¿ÉÒÔ¿ØÖÆcoreÎļþ±£´æλÖúÍÎļþÃû¸ñʽ¡£
¿Éͨ¹ýÒÔÏÂÃüÁîÐ޸ĴËÎļþ£º
echo
"/corefile/core-%e-%p-%t" >
core_pattern£¬¿ÉÒÔ½«coreÎļþͳһÉú³Éµ½/corefileĿ¼Ï£¬²úÉúµÄÎļþÃûΪcore-ÃüÁîÃû-pid-ʱ¼ä´Á
ÒÔÏÂÊDzÎÊýÁбí:
%p - insert pid into filename Ìí¼Ópid
%u - insert current uid into filename Ìí¼Óµ±Ç°uid
%g - insert current gid into filename Ìí¼Óµ±Ç°gid
%s - insert signal that caused the coredump into the filename
Ìí¼Óµ¼Ö²úÉúcoreµÄÐźÅ
%t - insert UNIX time that the coredump occurred into filename
Ìí¼ÓcoreÎļþÉú³ÉʱµÄunixʱ¼ä
%h - insert hostname where the coredump happened into filename
Ìí¼ÓÖ÷»úÃû
%e - insert coredumping executable name into f
Ïà¹ØÎĵµ£º
×ÜÀÀ
ÓÃiptables -ADC À´Ö¸¶¨Á´µÄ¹æ
Ôò
£¬-AÌí¼Ó -Dɾ³ý -C ÐÞ¸Ä
iptables - [RI] chain rule num rule-specification[option]
ÓÃiptables - RI ͨ¹ý¹æÔòµÄ˳ÐòÖ¸¶¨
iptables -D chain rule num[option]
ɾ³ýÖ¸¶¨¹æÔò
iptables -[LFZ] [chain][option]
ÓÃiptables -LFZ Á´Ãû [Ñ¡Ïî]
iptables -[NX] chain
ÓÃ -NX ......
²»Í¬Ö®´¦Ö÷ÒªÌåÏÖÔÚ×ÅÑ۵㣺
£¨1£©UbuntuÊÇΪÁËÌá¸ßͼÐνçÃæϵÄÓû§ÌåÑé
ËùÒÔ¹¦·ò¶¼×öÔÚ¼ÒÓûúÉÏÓ²¼þ¼æÈÝÐÔ
³õ¼¶Óû§µÄÒ×ÓÃÐÔ
£¨2£©SuseÊÇΪÁËÌá¸ßÆóÒµÓû§µÄÈÏ¿É
ÐèÒª×î¸ßµÄÎȶ¨ÐÔ£¬ÈÝÒ×µÄÅäÖ÷þÎñ
¿ÉÒÔºÜÈÝÒ×ʹÓÃSuseºÍRethat´î½¨Ò»¸ö¿É¿¿µÄÍøÕ¾
£¨3£©ArchlinuxÊÇΪÁ˼ò»¯Öм¶Ó ......
1¡¢RootµÇ¼
2¡¢²éip:ifcongfig
3¡¢ÐÞ¸ÄÍøÂçÉèÖÃ
vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=VirtualBox
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.2
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
4¡¢Ìí¼ÓÐÂÓû§º ......
aep1000
Ö§³Ö¿ìËÙ¼ÓÃÜ´¦Àí¿¨ÒÔ¼ÓËÙ°²È«Ì×½Ó×ֲ㣨SSL£©¼ÓÃÜ£¬ÔÚ±¾ÊéÖв»ÓÃÓÚ½¨Á¢¼¯Èº¡£
anacron
ÓëcronºÍatÀàËÆ£¬¶¼ÊÇÔÚÌض¨Ê±¼ä¡¢ÉõÖÁÔÚϵͳûÓÐÁ¬ÐøÔËÐÐʱÆô¶¯ÃüÁîµÄ£¬ÔÚRed HatÉÏ£¬/etc/anacrontabÎļþÁгöÁËÿÌìÖ´ÐеÄcron×÷ÒµµÄÑ»·³£¹æÈÕÖ¾£¬Èç¹ûÄã½ûÓÃÁËËü£¬Ä㽫²»ÄÜÔÙÖ´ÐÐÈÕ־ѻ·£¬ÄãµÄϵͳ´ÅÅÌ×îºó½«±»ÌîÂú£¬Ô ......