LinuxÏÂcoreÎļþ
1.1 coreÎļþµÄ¼òµ¥½éÉÜ
ÔÚÒ»¸ö³ÌÐò±ÀÀ£Ê±£¬ËüÒ»°ã»áÔÚÖ¸¶¨Ä¿Â¼ÏÂÉú³ÉÒ»¸öcoreÎļþ¡£coreÎļþ½ö½öÊÇÒ»¸öÄÚ´æÓ³Ïó(ͬʱ¼ÓÉϵ÷ÊÔÐÅÏ¢)£¬Ö÷ÒªÊÇÓÃÀ´µ÷ÊԵġ£
1.2 ¿ªÆô»ò¹Ø±ÕcoreÎļþµÄÉú³É
ÓÃÒÔÏÂÃüÁîÀ´×èֹϵͳÉú³ÉcoreÎļþ:
ulimit -c 0
Ò²¿ÉÒÔÐÞ¸ÄϵͳÎļþÀ´µ÷ÕûcoreÑ¡Ïî
ÔÚ/etc/profileͨ³£»áÓÐÕâÑùÒ»¾ä»°À´½ûÖ¹²úÉúcoreÎļþ£¬Í¨³£ÕâÖÖÉèÖÃÊǺÏÀíµÄ:
# No core files by default
ulimit -S -c 0 > /dev/null 2>&1
ÏÂÃæµÄÃüÁî¿ÉÒÔ¼ì²éÉú³ÉcoreÎļþµÄÑ¡ÏîÊÇ·ñ´ò¿ª:
ulimit -c
Èç¹ûÏÔʾ0£¬ÔòΪ¹Ø±Õ
ulimit -c unlimitedÀ´ÈÃÌض¨µÄÓû§¿ÉÒÔ²úÉúcoreÎļþ£¬¶øulimit -c 1024ÔòÏÞÖƲúÉúµÄcoreÎļþµÄ´óС²»Äܳ¬¹ý1024 blcoks
ÔÚÓû§µÄ~/.bash_profileÀï¼ÓÉÏulimit -c unlimitedÀ´ÈÃÌض¨µÄÓû§¿ÉÒÔ²úÉúcoreÎļþ
1.3 ÉèÖÃCore DumpµÄºËÐÄת´¢ÎļþĿ¼ºÍÃüÃû¹æÔò
/proc/sys/kernel/core_uses_pid¿ÉÒÔ¿ØÖƲúÉúµÄcoreÎļþµÄÎļþÃûÖÐÊÇ·ñÌí¼Ópid×÷ΪÀ©Õ¹£¬Èç¹ûÌí¼ÓÔòÎļþÄÚÈÝΪ1£¬·ñÔòΪ0
/proc/sys/kernel/core_pattern¿ÉÒÔÉèÖøñʽ»¯µÄcoreÎļþ±£´æλÖûòÎļþÃû£¬±ÈÈçÔÀ´ÎļþÄÚÈÝÊÇcore-%e
¿ÉÒÔÕâÑùÐÞ¸Ä:
echo "/corefile/core-%e-%p-%t" > /proc/sys/kernel/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 filename Ìí¼ÓÃüÁîÃû
1.4 ʹÓÃcoreÎļþ
ÔÚcoreÎļþËùÔÚĿ¼Ï¼üÈë:
gdb -c core
Ëü»áÆô¶¯GNUµÄµ÷ÊÔÆ÷£¬À´µ÷ÊÔcoreÎļþ£¬²¢ÇÒ»áÏÔʾÉú³É´ËcoreÎļþµÄ³ÌÐòÃû£¬ÖÐÖ¹´Ë³ÌÐòµÄÐźŵȵÈ
ÈôÐèÒª½øÒ»²½²é¿´core dumpÎļþ½øÐÐÅÅ´í£¬ÐèÒª½øÒ»²½Á˽âgdbµÄÓ÷¨¡£
Ïà¹ØÎĵµ£º
Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......
Linux ϵͳÏÂÈçºÎ·ÖÇø²Å×îºÏÀí
ÒÔÏÂÕª×Ô¡¶Gentoo Linux x86Êֲᡷ
http://www.gentoo.org/doc/zh_cn/handbook/handbook-x86.xml
·ÖÇøµÄÊýÄ¿Ö÷Òª¸ù¾ÝÄãµÄϵͳ»·¾³À´¾ö¶¨¡£
ÀýÈ磬Èç¹ûÄãÓкܶàÓû§£¬Äã¿ÉÄܸüÏ£Íû°ÑÄãµÄ/homeĿ¼¶ÀÁ¢³öÀ´£¬ÒòΪÕâÑù×ö¿ÉÒÔÔö¼Ó°²È«ÐÔ£¬±¸·ÝÆðÀ´Ò²¸üÈÝÒס£Èç¹ûÄã°²×°GentooÓÃÀ´×öÓʼþ·þÎñÆ÷ ......
LinuxµÄÍøÂçÐÒéÕ»
LinuxµÄÐÒéÕ»ÆäʵÊÇÔ´ÓÚBSDµÄÐÒéÕ»£¬ËüÏòÉÏÒÔ¼°ÏòϵĽӿÚÒÔ¼°ÐÒéÕ»±¾ÉíµÄÈí¼þ·Ö²ã×éÖ¯µÄ·Ç³£ºÃ¡£
LinuxµÄÐÒéÕ»»ùÓÚ·Ö²ãµÄÉè¼Æ˼Ï룬×ܹ²·ÖΪËIJ㣬´ÓÏÂÍùÉÏÒÀ´ÎÊÇ £ºÎïÀí²ã£¬Á´Â·²ã£¬ÍøÂç²ã£¬Ó¦Óò㡣
& ......
¡¡¡¡½ÓÏÂÀ´ÈýÐÐÉèÖÃÈýÖÖ¹¦ÄÜ£¬treeview.set_search_column(0)£¬µ±ÔÚ½çÃæÖа´“Control+F”ʱ¿ÉÒÔËÑË÷µÚ0ÁÐÖеÄÄÚÈÝ£¬tvcolumn.set_sort_column_id(0)£¬µ±µã»÷´ËÁбêÌâµÄʱºòËùÓеÄÐа´´óС˳ÐòÖØÐÂÅÅÁС£²ÎÊý0ÊÇ
ÁÐÔÚModelÀïµÄÐòºÅ¡£½ÓÏÂÀ´treeview.set_reorderable·½·¨Ê¹µÃ¿ÉÒÔÓÃÊó±êÍ϶¯ÐнøÐÐÖØÐÂÅÅÁУ¬±ÈÈç£ ......