Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Unix/Linux µÄ LoadÎÊÌâ


Ô­ÎÄÍøÖ·: http://www.dbanotes.net/arch/unix_linux_load.html
      ¼¸ºõÿ¸ö½Ó´¥Àà Unix ²Ù×÷ϵͳµÄ¹¤³Ìʦ¶¼ÖªµÀÈçºÎ²é¿´ÏµÍ³¸ºÔØ¡£µ«ÕⶫÎ÷µÄ¹¤×÷»úÀíµ½µ×ÊÇÔõÑùµÄ£¬¿ÉÄÜûÓжàÉÙÄÜ˵Çå³þ¡£¶Ô±ÈÁËһЩÏà¹ØÐÅÏ¢£¬¼ÓÉÏ×Ô¼ºµÄÀí½â£¬×öһϱʼǡ£
ʲôÊÇ Load ? ʲôÊÇ Load Average ?
       Load ¾ÍÊǶԼÆËã»ú¸É»î¶àÉٵĶÈÁ¿(WikiPedia
: the system load is a measure of the amount of work that a computer system is doing)¡£Ò²Óмòµ¥µÄ˵Êǽø³Ì¶ÓÁеij¤¶È. Load Average ¾ÍÊÇÒ»¶Îʱ¼ä (1 ·ÖÖÓ¡¢5·ÖÖÓ¡¢15·ÖÖÓ) ÄÚƽ¾ù Load ¡£¡¾×îºÃµÄ²Î¿¼ÎÄÕ£ºUNIX® Load Average Part 1: How It Works
¡¿
ÏÂÃæÊÇÒ»¸ö uptime ÃüÁîÊä³ö£º
$ uptime
18:57:48 up 423 days, 3:55, 2 users, load average: 1.16, 1.12, 1.20
      ¾¡¹Ü¸÷ÖÖÐÅÏ¢À´Ô´µÄ¶¨Ò嶼²»Ì«È·¶¨¡£ÄÜÈ·¶¨µÄÒ»¼þÊÂÇéÊÇ£¬Äã²»Äܾ«È·»ñÈ¡µ±Ç°Ê±¼äµÄ Load . ×îСµÄ¼ÆËãÁ£¶ÈÊÇ 5 ÃëÖÓ(CALC_LOAD ÿ 5HZ ¼ÆËãÒ»´Î
, 5HZ Ϊ 5ÃëÖÓ£¬ÕâÀïµÄ HZ ÊÇϵͳ¶¨ÒåµÄ±äÁ¿). ²Î¼û Linux Kernel Õâ¶Î´úÂë
:
869 count -= ticks;
870 if (unlikely(count < 0)) {
871 active_tasks = count_active_tasks();
872 do {
873 CALC_LOAD(avenrun[0], EXP_1, active_tasks);
874 CALC_LOAD(avenrun[1], EXP_5, active_tasks);
875 CALC_LOAD(avenrun[2], EXP_15, active_tasks);
876 count += LOAD_FREQ;
877 } while (count < 0);
878 }
879}
ÈçºÎÅжÏϵͳÊÇ·ñÒѾ­ Over Load ?
      ¶ÔÒ»°ãµÄϵͳÀ´Ëµ£¬¸ù¾Ý CPU
ÊýÁ¿È¥Åжϣ¬ÈçÉÏÃæµÄÀý×Ó£¬ Èç¹ûƽ¾ù¸ºÔØʼÖÕÔÚ 1.2 ÒÔÏ£¬¶øÄãÊÇ 2 ¿Å CPU
µÄ»úÆ÷¡£ÄÇô»ù±¾²»»á³öÏÖ CPU
²»¹»ÓõÄÇé¿ö¡£Ò²¾ÍÊÇ Load ƽ¾ùҪСÓÚ CPU
µÄÊýÁ¿¡£
      ÕâÊÇ Solaris ÐÔÄÜÓ빤¾ß(Solaris Performance Tools ) Ò»ÊéÍƼöµÄÆÀ¹À·½·¨¡£¡¾ÔÚÕâÀïÒªÍƼöÒ»ÏÂÕâ±¾Ê飬¾¡¹ÜÔÚ Load Õâ¸öµØ·½Ã»ÓдﵽÎÒÆÚÍûµÄÄÇôϸÖ¡£µ«È«Êé½ÒʾÁ˷dz£¶àµÄÐÔÄÜÐÅÏ¢¡£Ã¿¸ö DBA¡¢¼Ü¹¹Ê¦ µÄ±ØÐëÊé¡£¡¿
Õâô˵ʵ¼ÊÉÏ´øÀ´ÁíÍâÁ½¸ö


Ïà¹ØÎĵµ£º

LinuxÇý¶¯µÄ±àÒëÓë¼ÓÔØ

±àÒëºÍ¼ÓÔØ
±¾Õ¿ªÍ·µÄ "hello world" Àý×Ó°üº¬ÁËÒ»¸ö¼ò¶ÌµÄ½¨Á¢²¢¼ÓÔØÄ£¿éµ½ÏµÍ³ÖÐÈ¥µÄÑÝʾ. µ±È», Õû¸ö¹ý³Ì±ÈÎÒÃÇÄ¿Ç°¿´µ½µÄ¶à. ±¾½ÚÌṩÁ˸ü¶àϸ½Ú¹ØÓÚÒ»¸öÄ£¿é×÷ÕßÈçºÎ½«Ô´Âëת»»³ÉÄÚºËÖеÄÔËÐеÄ×Óϵͳ.
2.4.1. ±àÒëÄ£¿é
µÚÒ»²½, ÎÒÃÇÐèÒª¿´Ò»ÏÂÄ£¿éÈçºÎ±ØÐë±»½¨Á¢. Ä£¿éµÄ½¨Á¢¹ý³ÌÓëÓû§¿Õ¼äµÄÓ¦ÓóÌÐòµÄ½ ......

»ùÓÚLinuxµÄ±ãЯǶÈëʽÉ豸µçÔ´¹ÜÀí½â¾ö·½°¸

 Ç°¡¡ÑÔ
 
¡¡¡¡Ëæן÷ÖÖ±ãЯǶÈëʽÉ豸ÐÔÄܵÄÈÕÒæÌá¸ß£¬¹¦ÄÜÈÕÒæ·á¸»£¬ÆäµçÔ´½ôÕŵÄÎÊÌâÒ²ÈÕÒæÍ»³ö£¬¹úÄÚÐÂÍƳöµÄijЩ¾ßÓÐPDAµÈ¶àÖÖ¹¦ÄܵÄÖÇÄܵ绰ÔÚÃܼ¯Ê¹ÓÃÏÂÖ»ÄÜά³Ö°ëÌ죬¶àÊýÉãÏñ»ú
ºÍÊýÂëÏà»ú
ÔÚ
Ò»´Î³äµçºó¶¼Ö»ÓÐÒ»¸öСʱ×óÓÒµÄÀÛ»ý¹¤×÷ʱ¼ä¡£Linux×÷Ϊһ¸ö¿ª·ÅÔ´´úÂëµÄ²Ù×÷ϵͳ£¬ÓµÓзdz£·á¸»µÄÈí¼þ ......

¡¶LinuxÐÔÄܼ°µ÷ÓÅÖ¸ÄÏ¡·µÚÒ»Õ£ºÁ˽âLinux²Ù×÷ϵͳ


·­Ò룺·É¸ç (
http://hi.baidu.com/imlidapeng
)
°æȨËùÓУ¬×ðÖØËûÈËÀͶ¯³É¹û£¬×ªÔØʱÇë×¢Ã÷×÷ÕߺÍԭʼ³ö´¦¼°±¾ÉùÃ÷¡£
Ô­ÎÄÃû³Æ£º¡¶Linux Performance and Tuning Guidelines¡·
Ô­ÎĵØÖ·£ºhttp://www.redbooks.ibm.com/abstracts/redp4285.html
----------------------------------------------------------------- ......

Linux ÄÚºËÆô¶¯·ÖÎö£¨×ª£©

Linux ÄÚºËÆô¶¯·ÖÎö
1.       ÄÚºËÆô¶¯µØÖ·
1.1.   Ãû´Ê½âÊÍ
ZTEXTADDR
½âѹ´úÂëÔËÐеĿªÊ¼µØÖ·¡£Ã»ÓÐÎïÀíµØÖ·ºÍÐéÄâµØÖ·Ö®·Ö£¬ÒòΪ´ËʱMMU´¦ÓڹرÕ״̬¡£Õâ¸öµØÖ·²»Ò»¶¨Ê±RAMµÄµØÖ·£¬¿ÉÒÔÊÇÖ§³Ö¶ÁдѰַµÄflashµÈ´æ´¢Öн顣
Start address of decompressor. here's no point ......

linuxÉ豸ģÐÍÏê½â¡¾×ª¡¿


 
    
Linux 2.6Äں˵ÄÒ»¸öÖØÒªÌØÉ«ÊÇÌṩÁËͳһµÄÄÚºËÉ豸ģÐÍ¡£Ëæ׿¼ÊõµÄ²»¶Ï½ø²½£¬ÏµÍ³µÄÍØÆ˽ṹԽÀ´Ô½¸´ÔÓ£¬¶ÔÖÇÄܵçÔ´¹ÜÀí¡¢ÈȲå°ÎÒÔ¼°plug and playµÄÖ§³ÖÒªÇóÒ²Ô½À´Ô½¸ß£¬2.4ÄÚºËÒѾ­ÄÑÒÔÂú×ãÕâЩÐèÇó¡£ÎªÊÊÓ¦ÕâÖÖÐÎÊƵÄÐèÒª£¬2.6Äں˿ª·¢ÁËȫеÄÉ豸ģÐÍ¡£
2.6 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ