Linuxϵͳµ÷ÓÃÁбí
Linuxϵͳµ÷ÓÃÁбí
±¾ÎÄÁгöÁ˴󲿷ֳ£¼ûµÄLinuxϵͳµ÷Ó㬲¢¸½ÓмòÒªÖÐÎÄ˵Ã÷¡£
ÒÔÏÂÊÇLinuxϵͳµ÷ÓõÄÒ»¸öÁÐ±í£¬°üº¬Á˴󲿷ֳ£ÓÃϵͳµ÷ÓúÍÓÉϵͳµ÷ÓÃÅÉÉú³öµÄµÄº¯Êý¡£Õâ¿ÉÄÜÊÇÄãÔÚ»¥ÁªÍøÉÏËùÄÜ¿´µ½µÄΨһһƪÖÐÎÄ×¢Ê͵ÄLinuxϵͳµ÷ÓÃÁÐ±í£¬¼´Ê¹ÊǼòµ¥µÄ×ÖĸÐòÓ¢ÎÄÁÐ±í£¬ÄÜ×öµ½ÕâôÍêÈ«Ò²ÊǺܺ±¼ûµÄ¡£
°´ÕÕ¹ßÀý£¬Õâ¸öÁбíÒÔman pagesµÚ2½Ú£¬¼´ÏµÍ³µ÷ÓýÚΪÀ¶±¾¡£°´ÕÕ±ÊÕßµÄÀí½â£¬¶ÔÆä×÷ÁË´óÖµķÖÀ࣬ͬʱҲ×÷ÁËһЩССµÄÐ޸ģ¬É¾È¥Á˼¸¸ö½ö¹©ÄÚºËʹÓ㬲»ÔÊÐíÓû§µ÷ÓõÄϵͳµ÷Ó㬶Ըö±ð±¾ÈËÉÔ¾õ²»Í׵ĵط½×÷ÁËһЩСµÄÐ޸ģ¬²¢¶ÔËùÓÐÁгöµÄϵͳµ÷Óø½ÉϼòҪעÊÍ¡£
ÆäÖÐÓÐһЩº¯ÊýµÄ×÷ÓÃÍêÈ«Ïàͬ£¬Ö»ÊDzÎÊý²»Í¬¡££¨¿ÉÄܺܶàÊìϤC++ÅóÓÑÂíÉϾÍÄÜÁªÏëÆðº¯ÊýÖØÔØ£¬µ«ÊDZðÍüÁËLinuxºËÐÄÊÇÓÃCÓïÑÔдµÄ£¬ËùÒÔÖ»ÄÜÈ¡³É²»Í¬µÄº¯ÊýÃû£©¡£»¹ÓÐһЩº¯ÊýÒѾ¹ýʱ£¬±»ÐµĸüºÃµÄº¯ÊýËù´úÌæÁË£¨gccÔÚÁ´½ÓÕâЩº¯Êýʱ»á·¢³ö¾¯¸æ£©£¬µ«ÒòΪ¼æÈݵÄÔÒò»¹±£Áô×Å£¬ÕâЩº¯ÊýÎÒ»áÔÚÇ°Ãæ±êÉÏ“*”ºÅÒÔʾÇø±ð¡£
Ò»¡¢½ø³Ì¿ØÖÆ£º
fork
´´½¨Ò»¸öнø³Ì
clone
°´Ö¸¶¨Ìõ¼þ´´½¨×Ó½ø³Ì
execve
ÔËÐпÉÖ´ÐÐÎļþ
exit
ÖÐÖ¹½ø³Ì
_exit
Á¢¼´ÖÐÖ¹µ±Ç°½ø³Ì
getdtablesize
½ø³ÌËùÄÜ´ò¿ªµÄ×î´óÎļþÊý
getpgid
»ñÈ¡Ö¸¶¨½ø³Ì×é±êʶºÅ
setpgid
ÉèÖÃÖ¸¶¨½ø³Ì×é±êÖ¾ºÅ
getpgrp
»ñÈ¡µ±Ç°½ø³Ì×é±êʶºÅ
setpgrp
ÉèÖõ±Ç°½ø³Ì×é±êÖ¾ºÅ
getpid
»ñÈ¡½ø³Ì±êʶºÅ
getppid
»ñÈ¡¸¸½ø³Ì±êʶºÅ
getpriority
»ñÈ¡µ÷¶ÈÓÅÏȼ¶
setpriority
ÉèÖõ÷¶ÈÓÅÏȼ¶
modify_ldt
¶Áд½ø³ÌµÄ±¾µØÃèÊö±í
nanosleep
ʹ½ø³Ì˯ÃßÖ¸¶¨µÄʱ¼ä
nice
¸Ä±ä·Öʱ½ø³ÌµÄÓÅÏȼ¶
pause
¹ÒÆð½ø³Ì£¬µÈ´ýÐźÅ
personality
ÉèÖýø³ÌÔËÐÐÓò
prctl
¶Ô½ø³Ì½øÐÐÌض¨²Ù×÷
ptrace
½ø³Ì¸ú×Ù
sched_get_priority_max
È¡µÃ¾²Ì¬ÓÅÏȼ¶µÄÉÏÏÞ
sched_get_priority_min
È¡µÃ¾²Ì¬ÓÅÏȼ¶µÄÏÂÏÞ
sched_getparam
È¡µÃ½ø³ÌµÄµ÷¶È²ÎÊý
sched_getscheduler
È¡µÃÖ¸¶¨½ø³ÌµÄµ÷¶È²ßÂÔ
sched_rr_get_interval
È¡µÃ°´RRËã·¨µ÷¶ÈµÄʵʱ½ø³ÌµÄʱ¼äƬ³¤¶È
sched_setparam
ÉèÖýø³ÌµÄµ÷¶È²ÎÊý
sched_setscheduler
ÉèÖÃÖ¸¶¨½ø³ÌµÄµ÷¶È²ßÂԺͲÎÊý
sched_yield
½ø³ÌÖ÷¶¯Èóö´¦ÀíÆ÷,²¢½«×Ô¼ºµÈºòµ÷¶È¶ÓÁжÓβ
vfork
´´½¨Ò»¸ö×Ó½ø³Ì£¬ÒÔ¹©Ö´ÐÐгÌÐò£¬³£ÓëexecveµÈͬʱʹÓÃ
wait
µÈ´ý×Ó½ø³ÌÖÕÖ¹
wait3
²Î¼ûwait
waitpid
µÈ´ýÖ¸¶¨×Ó½ø³ÌÖÕÖ¹
wait4
Ïà¹ØÎĵµ£º
1
¡¢°²×°Ç°µÄ×¼±¸
1.1
¼ì²éÓ²¼þ
ÎïÀíÄڴ棺
# grep
MemTotal /proc/meminfo
½»»»¿Õ¼ä£º
# grep
SwapTotal /proc/meminfo
½»»»¿Õ¼äµÄ´óСÊǸù¾ÝÎïÀíÄÚ´æµÄ´óСÀ´ÉèÖõģ¬ÎïÀíÄÚ´æÉÙÓÚ
2G
µÄÔò½»»»¿Õ¼äÉèΪÎïÀíÄÚ´æµÄÁ½±¶£¬ÎïÀíÄÚ´æ´óÓÚ
2G
µÄÔò½»»»¿Õ¼äºÍÎïÀíÄÚ´æ´óСһÑù¡£Èç¹û²»·ûºÏÉÏÊö¹æ¶¨£¬ÄÇô¾ÍÐèÒª ......
ǰЩÌì×Ô¼ºÔÚLinuxÏ´ÁËftp·þÎñ£¬½ñÌìÓÖ¼ÓÉîÁËѧϰ£¬×ܽáÈçÏ£º
1¡¢ftp¿ª»ú×Ô¶¯ÔËÐУº¿ª»ú×Ô¶¯ÔËÐÐÓм¸ÖÖ·½·¨£¬ÆäÖпÉÒÔÓÃÃüÁîchkconfig vsftpd on£¬ÕâÑù¿ª»úºó¾Í×Ô¶¯ÔËÐÐÁË¡£
ÏàÓ¦µÄÏë¹Ø±ÕµÄ»°chkconfig vsftpd off
2¡¢ssh·þÎñ¿ª»ú×Ô¶¯ÔËÐУºÍ¬ÉÏÃüÁîΪ£ºchkconfig sshd on;chkconfig ssh ......
¶ÔÓÚÒ»¸ö³õѧLinuxµÄÐÂÊÖÀ´Ëµ£¬¸Õ¿ªÊ¼×îÈÃÎÒÃÔ»óµÄÊÇÄں˵Ť×÷ģʽ£¬ÒÔΪÓû§¿Õ¼äµÄģʽ——Èç¶à½ø/Ïß³ÌÒ²ÊÊÓÃÓÚÄںˣ¬µ«ÕâÑù¾Í²úÉúÁËÒ»¸öã£ÂÛ£¬Óû§¿Õ¼äµÄ½ø³Ìµ÷¶ÈÊÇÓÉÄÚºËÍê³ÉµÄ£¬ÄÇôÄں˿ռäµÄ½ø³Ìµ÷¶ÈÊÇÓÉËÍê³ÉµÄ£¿Äª·ÇÄں˿ÉÒÔÖ±½Óµ÷¶È×Ô¼º²»³É£¿
ºÝKÁ˼¸ÌìÊéºó£ ......
ÇëÕÒͬѧ°ïæװÁËlinuxµÄ²Ù×÷ϵͳ£¬ubuntu9.1£¬´Ó´ËÎÒҲ̤ÉÏÁË˫ϵͳµÄÕ÷³Ì……
²»¹ýÕâ¸ö¹ý³Ì²¢²»ÊÇÒ»·«·ç˳µÄ¡£
Ê×ÏÈÒ»¸öºÜ´óµÄÎÊÌ⣬¾ÍÊDz»ÄÜÉÏÍø£¬Ñ§Ð£µÄ¿Í»§¶ËÔÚlinuxϲ»ÄÜʹÓ㬾Ý˵ҪÓÃÒ»¸öʲôÈí¼þ²ÅÐУ¬Õâ¸öÎÊÌâ´ý½â¾ö¡£
Æä´Î¾ÍÊÇ×ÖÌåÎÊÌ⣬linuxÏÂ×Ô´øµÄ×ÖÌåÌ«ÉÙ£¬ºÜ¶à¶«Î÷¶¼ÏÔʾ²»Õý³£¡£´Ówindow ......
linuxµÄ/etcÏÂÃæµÄprofileÎļþ¼Ç¼ÁËһЩËùÓÐÓû§¹«ÓõĻ·¾³±äÁ¿£¬rc.local¼Ç¼Óû§µÇ½µÄʱºòÒªÖ´ÐеÄshellÃüÁî¡£¸÷¸öÓû§µÄhomeĿ¼ÏÂÒ²ÓÐ.bashprofileÓÃÓÚÅäÖÃÓû§×Ô¼ºµÄ»·¾³±äÁ¿,.bashrcÓû§µÇ½µÄʱºòÖ´ÐеÄÃüÁî¡£
linuxÓÐ×Ô¼ºÒ»Ì×ÍêÕûµÄÆô¶¯Ìåϵ£¬×¥×¡ÁËlinuxÆô¶¯µÄÂöÂ磬linuxµÄÆô¶¯¹ý³Ì½«²»ÔÙÉñÃØ¡£
±¾ÎÄÖÐ ......