linuxÏÂulimitÃüÁîÏê½â
1,˵Ã÷:
ulimitÓÃÓÚshellÆô¶¯½ø³ÌËùÕ¼ÓõÄ×ÊÔ´.
2,Àà±ð:
shellÄÚ½¨ÃüÁî
3,Óï·¨¸ñʽ:
ulimit [-acdfHlmnpsStvw] [size]
4,²ÎÊý½éÉÜ:
-H ÉèÖÃÓ²¼þ×ÊÔ´ÏÞÖÆ.
-S ÉèÖÃÈí¼þ×ÊÔ´ÏÞÖÆ.
-a ÏÔʾµ±Ç°ËùÓеÄ×ÊÔ´ÏÞÖÆ.
-c size:ÉèÖÃcoreÎļþµÄ×î´óÖµ.µ¥Î»:blocks
-d size:ÉèÖÃÊý¾Ý¶ÎµÄ×î´óÖµ.µ¥Î»:kbytes
-f size:ÉèÖô´½¨ÎļþµÄ×î´óÖµ.µ¥Î»:blocks
-l size:ÉèÖÃÔÚÄÚ´æÖÐËø¶¨½ø³ÌµÄ×î´óÖµ.µ¥Î»:kbytes
-m size:ÉèÖÿÉÒÔʹÓõij£×¤ÄÚ´æµÄ×î´óÖµ.µ¥Î»:kbytes
-n size:ÉèÖÃÄں˿ÉÒÔͬʱ´ò¿ªµÄÎļþÃèÊö·ûµÄ×î´óÖµ.µ¥Î»:n
-p size:ÉèÖùܵÀ»º³åÇøµÄ×î´óÖµ.µ¥Î»:kbytes
-s size:ÉèÖöÑÕ»µÄ×î´óÖµ.µ¥Î»:kbytes
-t size:ÉèÖÃCPUʹÓÃʱ¼äµÄ×î´óÉÏÏÞ.µ¥Î»:seconds
-v size:ÉèÖÃÐéÄâÄÚ´æµÄ×î´óÖµ.µ¥Î»:kbytes 5,¼òµ¥ÊµÀý:
5.¾ÙÀý
ÔÚLinuxÏÂд³ÌÐòµÄʱºò£¬Èç¹û³ÌÐò±È½Ï´ó£¬¾³£»áÓöµ½“¶Î´íÎ󔣨segmentation
fault£©ÕâÑùµÄÎÊÌ⣬ÕâÖ÷Òª¾ÍÊÇÓÉÓÚLinuxϵͳ³õʼµÄ¶ÑÕ»´óС£¨stack size£©Ì«Ð¡µÄÔµ¹Ê£¬Ò»°ãΪ10M¡£ÎÒÒ»°ã°Ñstack
sizeÉèÖóÉ256M£¬ÕâÑù¾ÍûÓжδíÎóÁË£¡ÃüÁîΪ£º
ulimit -s 262140
Èç¹ûҪϵͳ×Ô¶¯¼ÇסÕâ¸öÅäÖ㬾ͱà¼/etc/profileÎļþ£¬ÔÚ “ulimit -S -c 0 > /dev/null
2>&1”ÐÐÏ£¬Ìí¼Ó“ulimit -s 262140”£¬±£´æÖØÆôϵͳ¾Í¿ÉÒÔÁË£¡
1]ÔÚRH8µÄ»·¾³Îļþ/etc/profileÖÐ,ÎÒÃÇ¿ÉÒÔ¿´µ½ÏµÍ³ÊÇÈçºÎÅäÖÃulimitµÄ:
#grep ulimit /etc/profile
ulimit -S -c 0 > /dev/null 2>&1
ÕâÌõÓï¾äÉèÖÃÁ˶ÔÈí¼þ×ÊÔ´ºÍ¶ÔcoreÎļþ´óСµÄÉèÖÃ
2]Èç¹ûÎÒÃÇÏëÒª¶ÔÓÉshell´´½¨µÄÎļþ´óС×÷ЩÏÞÖÆ,Èç:
#ll h
-rw-r--r-- 1 lee lee 150062 7ÔÂ 22 02:39 h
#ulimit -f 100 #ÉèÖô´½¨ÎļþµÄ×î´ó¿é(Ò»¿é=512×Ö½Ú)
#cat h>newh
File size limit exceeded
#ll newh
-rw-r--r-- 1 lee lee 51200 11ÔÂ 8 11:47 newh
ÎļþhµÄ´óСÊÇ150062×Ö½Ú,¶øÎÒÃÇÉ趨µÄ´´½¨ÎļþµÄ´óСÊÇ512×Ö½Úx100¿é=51200×Ö½Ú
µ±È»ÏµÍ³¾Í»á¸ù¾ÝÄãµÄÉèÖÃÉú³ÉÁË51200×Ö½ÚµÄnewhÎļþ.
3]¿ÉÒÔÏñʵÀý1]Ò»Ñù,°ÑÄãÒªÉèÖõÄulimit·ÅÔÚ/etc/profileÕâ¸ö»·¾³ÎļþÖÐ.
ÓÃ;
ÉèÖûò±¨¸æÓû§×ÊÔ´¼«ÏÞ¡£
Óï·¨
ulimit [ -H ] [ -S ] [ -a ] [ -c ] [ -d ] [ -f ] [ -m ] [ -n ] [ -s ] [
-t ] [ Limit ]
ÃèÊö
ulimit ÃüÁîÉèÖûò±¨¸æÓû§½ø³Ì×ÊÔ´¼«ÏÞ£¬Èç /etc/security/limits ÎļþËù¶¨Òå¡£Îļþ°üº
Ïà¹ØÎĵµ£º
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
ÓÉÓÚҪʹÓõ½log4cppµÄ¿â£¬¶ølog4cµÄ×ÊÁÏÊǷdz£µÄÉÙ£¬Ò²ÀÁµÃÈ¥Ñо¿ËüµÄÓ÷¨£¬ÓÚÊǾ;ö¶¨ÊÔÊÔ»ìºÏ±à³ÌÕßÍæÒâ¡£
Ê×ÏÈÏÈÒýÓÃÏÂC++ËüµÄfather: StroustrupµÄһƪÎÄÕ¡¶C++ Style and Technique FAQ¡·£¨http://www2.research.att.com/~bs/bs_faq2.html£©ÀïµÄһС¸öÆ ......
sourceÃüÁ
sourceÃüÁîÒ²³ÆΪ“µãÃüÁ¬Ò²¾ÍÊÇÒ»¸öµã·ûºÅ£¨.£©¡£sourceÃüÁîͨ³£ÓÃÓÚÖØÐÂÖ´ÐиÕÐ޸ĵijõʼ»¯Îļþ£¬Ê¹Ö®Á¢¼´ÉúЧ£¬¶ø²»±Ø×¢Ïú²¢ÖØеǼ¡£
Ó÷¨£º
#vim ~/.bashrc
#source ~/.bashrc
......
2.1 LinuxÄÚºËģʽ
µ¥ÄÚºËģʽµÄÄں˿ÉÒÔ´ÖÂԵķÖΪÈý¸ö²ã´Î£ºµ÷Ó÷þÎñµÄÖ÷³ÌÐò²ã¡¢Ö´ÐÐϵͳµ÷ÓõķþÎñ²ãºÍÖ§³Öϵͳµ÷Óõĵײ㺯Êý¡£
2.2 LinuxÄÚºËÌåϵ½á¹¹
LinuxÄÚºËÓÉÎå¸öÄ£¿é×é³É£º½ø³Ìµ÷¶ÈÄ£¿é¡¢ÄÚ´æ¹ÜÀíÄ£¿é¡¢Îļþϵͳģ¿é¡¢½ø³Ì¼äͨР......
ÎļþϵͳºÍÄÚ´æ¹ÜÀí£¬ÒÔ¼°½ø³Ì¹ÜÀíÊDzÙ×÷ϵͳµÄºËÐIJ¿·Ö¡£Êý¾Ýͨ³£ÒÔÎļþµÄÐÎʽ´æ´¢ÔÚÉè ±¸ÉÏ£¬Òò´ËÎļþϵͳµÄ»ù±¾¹¦ÄܾÍÊÇÒÔijÖÖ¸ñʽ´æÈ¡/¿ØÖÆÎļþ¡£0.11°æµÄÄÚºËÖвÉÓÃÁËminix1.0°æµÄÎļþϵͳ¡£ÔÚ×îеÄ2.6°æÄÚºËÖУ¬½èÖúÓÚ VFS£¬ÏµÍ³Ö§³Ö50¶àÖÖÎļþϵͳ¡£
Ê×ÏȽéÉÜÒ»ÏÂminixÎļþϵͳ
minixÎļþϵͳºÍ±ê×¼unixÎļþϵͳ» ......