LinuxϵͳLoad average¸ºÔØÏêϸ½âÊÍ
Õª×Ôhttp://blog.chinaunix.net/u3/108043/showart_2125958.html
LinuxϵͳLoad average¸ºÔØÏêϸ½âÊÍ
ÎÒÃÇÖªµÀÅжÏÒ»¸öϵͳµÄ¸ºÔØ¿ÉÒÔʹÓÃtop£¬uptimeµÈÃüÁîÈ¥²é¿´£¬Ëü·Ö±ð¼Ç¼ÁËÒ»·ÖÖÓ¡¢Îå·ÖÖÓ¡¢ÒÔ¼°Ê®Îå·ÖÖÓµÄϵͳƽ¾ù¸ºÔØ
ÀýÈçÎÒµÄij̨·þÎñÆ÷£º
$ uptime
09:50:21 up 200 days, 15:07, 1 user, load average: 0.27, 0.33, 0.37
´ó²¿·ÖµÄÈ˶¼ÈÏΪÕâ¸öÊý×ÖԽСԽºÃ£¬ÆäʵÓкܶà¹ØÁªµÄÌáʾÐÅÏ¢£¬½ñÌì¿´µ½Õâ¸öºÃÎÄ£¬Ó¦¸Ã¿ÉÒÔ¸ø´ó¼Ò˵Çå³þºÜ¶àÎÊÌ⣬תһÏ£º
ÔÎÄÁ´½Ó£º http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages
Äã¿ÉÄܶÔÓÚ Linux µÄ¸ºÔؾùÖµ£¨load averages£©ÒÑÓÐÁ˳ä·ÖµÄÁ˽⡣¸ºÔؾùÖµÔÚ uptime »òÕß top ÃüÁîÖпÉÒÔ¿´µ½£¬ËüÃÇ¿ÉÄÜ»áÏÔʾ³ÉÕâ¸öÑù×Ó£º
load average: 0.09, 0.05, 0.01
ºÜ¶àÈË»áÕâÑùÀí½â¸ºÔؾùÖµ£ºÈý¸öÊý·Ö±ð´ú±í²»Í¬Ê±¼ä¶ÎµÄϵͳƽ¾ù¸ºÔØ£¨Ò»·ÖÖÓ¡¢Îå ·ÖÖÓ¡¢ÒÔ¼°Ê®Îå·ÖÖÓ£©£¬ËüÃǵÄÊý×Öµ±È»ÊÇԽСԽºÃ¡£Êý×ÖÔ½¸ß£¬ËµÃ÷·þÎñÆ÷µÄ¸ºÔØÔ½ ´ó£¬ÕâÒ²¿ÉÄÜÊÇ·þÎñÆ÷³öÏÖijÖÖÎÊÌâµÄÐźš£
¶øÊÂʵ²»ÍêÈ«Èç´Ë£¬ÊÇʲôÒòËع¹³ÉÁ˸ºÔؾùÖµµÄ´óС£¬ÒÔ¼°ÈçºÎÇø·ÖËüÃÇÄ¿Ç°µÄ×´¿öÊÇ “ºÃ”»¹ÊÇ“Ôã¸â”£¿Ê²Ã´Ê±ºòÓ¦¸Ã×¢ÒâÄÄЩ²»Õý³£µÄÊýÖµ£¿
»Ø´ðÕâЩÎÊÌâ֮ǰ£¬Ê×ÏÈÐèÒªÁ˽âÏÂÕâЩÊýÖµ±³ºóµÄЩ֪ʶ¡£ÎÒÃÇÏÈÓÃ×î¼òµ¥µÄÀý×Ó˵Ã÷£¬ һֻ̨Å䱸һ¿éµ¥ºË´¦ÀíÆ÷µÄ·þÎñÆ÷¡£
Ðгµ¹ýÇÅ
Ò»Ö»µ¥ºËµÄ´¦ÀíÆ÷¿ÉÒÔÐÎÏóµÃ±ÈÓ÷³ÉÒ»Ìõµ¥³µµÀ¡£ÉèÏëÏ£¬ÄãÏÖÔÚÐèÒªÊÕÈ¡ÕâÌõµÀ·µÄ¹ýÇÅ ·Ñ — æÓÚ´¦ÀíÄÇЩ½«Òª¹ýÇŵijµÁ¾¡£ÄãÊ×Ïȵ±È»ÐèÒªÁ˽âЩÐÅÏ¢£¬ÀýÈç³µÁ¾µÄÔØÖØ¡¢ÒÔ¼°»¹ÓжàÉÙ³µÁ¾ÕýÔڵȴý¹ýÇÅ¡£Èç¹ûÇ°ÃæûÓгµÁ¾Ôڵȴý£¬ÄÇôÄã¿ÉÒÔ¸æËߺóÃæµÄ˾»úͨ¹ý¡£ Èç¹û³µÁ¾Öڶ࣬ÄÇôÐèÒª¸æÖªËûÃÇ¿ÉÄÜÐèÒªÉÔµÈÒ»»á¡£
Òò´Ë£¬ÐèҪЩÌض¨µÄ´úºÅ±íʾĿǰµÄ³µÁ÷Çé¿ö£¬ÀýÈ磺
0.00 ±íʾĿǰÇÅÃæÉÏûÓÐÈκεijµÁ÷¡£ ʵ¼ÊÉÏÕâÖÖÇé¿öÓë 0.00 ºÍ 1.00 Ö®¼äÊÇÏàͬµÄ£¬×ܶøÑÔÖ®ºÜͨ³©£¬¹ýÍùµÄ³µÁ¾¿ÉÒÔË¿ºÁ²»ÓõȴýµÄͨ¹ý¡£
1.00 ±íʾ¸ÕºÃÊÇÔÚÕâ×ùÇŵijÐÊÜ·¶Î§ÄÚ¡£ ÕâÖÖÇé¿ö²»ËãÔã¸â£¬Ö»ÊdzµÁ÷»áÓÐЩ¶Â£¬²»¹ýÕâÖÖÇé¿ö¿ÉÄÜ»áÔì³É½»Í¨Ô½À´Ô½Âý¡£
³¬¹ý 1.00£¬ÄÇô˵Ã÷Õâ×ùÇÅÒѾ³¬³ö¸ººÉ£¬½»Í¨ÑÏÖصÄÓµ¶Â¡£ ÄÇôÇé¿öÓжàÔã¸â£¿ ÀýÈç 2.00 µÄÇé¿ö˵Ã÷³µÁ÷ÒѾ³¬³öÁËÇÅËùÄܳÐÊܵÄÒ»±¶£¬ÄÇô½«ÓжàÓà¹ýÇÅÒ»±¶µÄ³µÁ¾ÕýÔÚ½¹¼±µÄµÈ´ý¡£3.00 µÄ»°Çé¿ö¾Í¸ü²»ÃîÁË£¬ËµÃ÷Õâ×ùÇÅ»ù±¾ÉÏÒѾ¿ì³ÐÊܲ»ÁË£¬»¹Óг¬³öÇŸºÔØÁ½
Ïà¹ØÎĵµ£º
Ô´´ÎÄÕ£¬×ªÔØÇë×¢Ã÷³ö´¦£¬Ð»Ð»£¡
×÷ÕߣºÇåÁÖ£¬²©¿ÍÃû£º·É¿Õ¾²¶É
ÕâÊÇһƪ×Ô¼ººÜÔçдµÄÎÄÕÂÁË£¬µ±Ê±¸ù¾ÝÍøÉϵÄһЩ½Ì³ÌÒ»²½Ò»²½ÖÆ×÷£¬±¾À´Ïë°Ñ×Ô¼º×öµÄ¹ý³Ì·Åµ½ÍøÉÏ£¬¿ÉÒÔÎ÷һֵæÓÚ¹«Ë¾ÏîÄ¿£¬Ã»ÓÐʱ ......
µÚÊ®¶þ²¿·Ö: È«²¿É¾³ý
¡¡¡¡Instrumentation support
µÚÊ®Èý²¿·Ö£ºÈ«²¿É¾³ý
¡¡¡¡Kernel hacking --->ÆƽâºËÐÄ£¿¿É²»Êǵ±º¡¿ÍÀ²£¬²»Ñ¡
µÚÊ®ËIJ¿·Ö£ºÈ«²¿É¾³ý
¡¡¡¡Security options --->
µÚÊ®Î岿·Ö£ºÈ«²¿É¾³ý
¡¡¡¡Cryptographic options --->ÕâÊǺËÐÄÖ§³Ö¼ÓÃܵÄÑ¡Ïî
µÚÊ®Áù²¿·Ö£ºÈ«²¿É¾³ý
¡¡¡¡Library rout ......
1¡¢ÔÚX11½çÃæÉÏÐÞ¸ÄIPµØÖ·µÈÍøÂçÐÅÏ¢ºó±ØÐëÖØÆôϵͳ²Å»áÉúЧ¡£
2¡¢±àÒëmipsÖ¸Áî³ÌÐòʱ£¬ÓÃmipsel-linux-gccÃüÁîÌáʾmipsel-linux-gcc:command not found£¬¿ÉÒÔÐÞ¸Ä~/.bash_profileÎļþµÄPATH»·¾³±äÁ¿ºóÌí¼Ó:/opt/i686-mipsel-linux-gcc-sdk-3.4.4/cross/bin¡£
¡¡¡¡PATHµÄÖµÊÇһϵÁÐĿ¼£¬µ±ÄúÔËÐÐÒ»¸ö³ÌÐòʱ£¬LinuxÔÚÕâЩ ......
selectº¯ÊýÊÇÓÃÓÚ³ÌÐò¼àÊÓ¶à¸öÎļþÃèÊö·û(file descrīptor)µÄ״̬±ä»¯¡£³ÌÐò»áÍ£ÔÚselectÕâÀïµÈ´ý£¬Ö±µ½±»¼àÊÓµÄÎļþÃèÊö·ûÓÐijһ¸ö»ò¶à¸ö·¢ÉúÁË״̬¸Ä±ä¡£select()µÄ»úÖÆÖÐÌṩһfd_setµÄÊý¾Ý½á¹¹£¬Êµ¼ÊÉÏÊÇÒ»longÀàÐ͵ÄÊý×飬 ÿһ¸öÊý×éÔªËض¼ÄÜÓëÒ»´ò¿ªµÄÎļþÃèÊö·û£¨²»¹ÜÊÇSocketÃèÊö·û,»¹ÊÇÆäËû Îļþ»òÃüÃû¹ÜµÀ» ......