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

DBAÒªÕÆÎÕµÄLinux ÃüÁָͨÄÏ

¸ß¼¶ Linux ÃüÁָͨÄÏ£¬µÚ 3 ²¿·Ö£º×ÊÔ´¹ÜÀí
×÷ÕߣºArup Nanda
2009 Äê 1 Ô·¢±í
Ôڴ˲¿·ÖÖУ¬Á˽âÓÃÓÚ¼àÊÓÎïÀí×é¼þµÄ¸ß¼¶ Linux ÃüÁî
Linux ϵͳÓÉÈô¸ÉÖ÷ÒªÎïÀí×é¼þ×é³É£¬Èç CPU¡¢ÄÚ´æ¡¢Íø¿¨ºÍ´æ´¢É豸¡£ÒªÓÐЧµØ¹ÜÀí Linux »·¾³£¬ÄúÓ¦¸ÃÄܹ»ÒÔºÏÀíµÄ¾«¶È²âÁ¿ÕâЩ×ÊÔ´µÄ¸÷ÖÖÖ¸±ê — ÿ¸ö×é¼þ´¦Àí¶àÉÙ×ÊÔ´¡¢ÊÇ·ñ´æÔÚÆ¿¾±µÈ¡£
ÔÚ±¾ÏµÁеÄÆäËû²¿·ÖÖУ¬ÄúÒѾ­Ñ§Ï°ÁË´¦Óں꼶±ðµÄÓÃÓÚ²âÁ¿Ö¸±êµÄһЩÃüÁî¡£µ«Ôڴ˲¿·ÖÖУ¬Äú½«Á˽âרÃÅÓÃÓÚ¼àÊÓÎïÀí×é¼þµÄ¸ß¼¶ Linux ÃüÁî¡£¾ßÌå¶øÑÔ£¬Äú½«Á˽âÒÔÏÂÀà±ðµÄÃüÁ
×é¼þ
ÃüÁî
ÄÚ´æ
free¡¢vmstat¡¢mpstat¡¢iostat¡¢sar
CPU
vmstat¡¢mpstat¡¢iostat¡¢sar
I/O
vmstat¡¢mpstat¡¢iostat¡¢sar
½ø³Ì
ipcs¡¢ipcrm
ÕýÈçÄúËù¼û£¬Ä³Ð©ÃüÁî³öÏÖÔÚ¶à¸öÀà±ðÖС£ÕâÊÇÓÉÓÚÕâЩÃüÁî¿ÉÒÔÖ´ÐкܶàÈÎÎñ¡£Ä³Ð©ÃüÁî±È½ÏÊʺÏÓÚijЩ×é¼þ£¬ÀýÈç iostat ÊÊºÏ I/O£¬µ«ÊÇÄúÓ¦¸ÃÁ˽âËüÃǹ¤×÷µÄ²î±ð²¢Ê¹ÓÃÄú¸üÊìϤµÄÃüÁî¡£
ÔÚ¶àÊýÇé¿öÏ£¬µ¥¸öÃüÁî¿ÉÄܶÔÓÚÁ˽âʵ¼Ê·¢ÉúµÄÇé¿öûʲôÓá£Òª»ñÈ¡ËùÐèµÄÐÅÏ¢£¬ÄúÓ¦¸ÃÁ˽â¶à¸öÃüÁî¡£
free
Ò»¸ö³£¼ûµÄÎÊÌâÊÇ“ÎÒµÄÓ¦ÓóÌÐòºÍ¸÷ÖÖ·þÎñÆ÷¡¢Óû§ºÍϵͳ½ø³ÌÕýÔÚʹÓöàÉÙÄڴ棿”»òÕß“ÏÖÔÚÓжàÉÙÄÚ´æ¿ÉÓã¿”Èç¹ûÕýÔÚÔËÐеĽø³ÌʹÓõÄÄÚ´æ´óÓÚ¿ÉÓà RAM£¬ÔòÐèÒª½«ÕâЩ½ø³ÌÒƵ½½»»»Çø¡£Òò´Ë£¬Ò»¸ö²¹³äÎÊÌâÊÇ“ÕýÔÚʹÓöàÉÙ½»»»Çø¿Õ¼ä£¿”
free ÃüÁ»Ø´ðËùÓÐÕâЩÎÊÌâ¡£¶øÇÒ£¬Ò»¸ö·Ç³£ÓÐÓõÄÑ¡Ïî –m ¿ÉÒÔÏÔʾ¿ÉÓÃÄڴ棨ÒÔ MB Ϊµ¥Î»£©£º
# free -m
total used free shared buffers cached
Mem: 1772 1654 117 0 18 618
-/+ buffers/cache: 1017 754
Swap: 1983 1065 918
ÒÔÉÏÊä³öÏÔʾϵͳ¾ßÓÐ 1,772 MB µÄ RAM£¬ÒÑʹÓà 1,654 MB£¬»¹ÓÐ 117 MB ÄÚ´æ¿ÉÓᣵڶþÐÐÏÔʾÔÚÎïÀíÄÚ´æÖлº³åÇøºÍ»º´æ´óСµÄ¸ü¸Ä¡£µÚÈýÐÐÏÔʾ½»»»ÇøÀûÓÃÇé¿ö¡£
ÒªÒÔ KB »ò GB Ϊµ¥Î»ÏÔʾÒÔÉÏÄÚÈÝ£¬Ç뽫 -m Ñ¡Ïî·Ö±ðÌ滻Ϊ -k »ò -g¡£Ê¹Óà –b Ñ¡ÏÒÔ×Ö½ÚΪµ¥Î»¡£
# free -b
total used free shared buffers cached
Mem: 1858129920 1724039168 134090752 0 18640896 643194880
-/+ buffers/cache: 1062203392 795926528
Swap: 2080366592 1116721152 9636454


Ïà¹ØÎĵµ£º

linux ÃüÁî

¡¾Ä¿Â¼¡¿
Ò»¡¢shellÃüÁî
1¡¢ÄÚ½¨ÃüÁî
2¡¢ÍⲿÃüÁî
3¡¢ÊµÓóÌÐò
4¡¢Óû§³ÌÐò
5¡¢shell½Å±¾
¶þ¡¢ÃüÁî°ïÖúÎĵµ
1¡¢ÃüÁî×ÔÉíµÄ°ïÖú¹¦ÄÜ
2¡¢manÊÖ²á
3¡¢ÔÚÏß°ïÖúÎĵµ
Èý¡¢·ÖÀà½éÉÜ
£¨Ò»£©Îļþ¡¢Ä¿Â¼²Ù×÷ÃüÁî
£¨¶þ£©²é¿´ÎļþÄÚÈÝÃüÁî
£¨Èý£©»ù±¾ÏµÍ³ÃüÁî
£¨ËÄ£©¼àÊÓϵͳ״̬ÃüÁî
£¨Î壩´ÅÅ̲Ù×÷ÃüÁî
£¨Áù£©Óû§ ......

LinuxÏÂÓÃCÓïÑÔAPIÁ¬½ÓMySQLÊý¾Ý¿â

 ÏñPHPºÍperlÒ»Ñù£¬MySQLÒ²ÌṩµÄCÓïÑÔʹÓõÄAPI. C´úÂëµÄAPIÊÇËæMySQLÒ»Æð·¢²¼µÄ¡£ Ëü°üº¬ÔÚmysqlclient¿âÖУ¬ ¿ÉÒÔʹC³ÌÐòÀ´·ÃÎÊÊý¾Ý¿â¡£
    MySQLÔ´Âë°üÖеÄÐí¶à¿Í»§¶Ë¶¼ÊÇÓÃCдµÄ¡£ Èç¹ûÄãÕýÔÚÕÒʹÓÃÕâЩC APIµÄÀý×Ó£¬ ¿ÉÒÔ¿´¿´¿Í»§¶ËµÄд·¨¡£Äã¿ÉÒÔÔÚMySQLÔ´Âë°üµÄclientsĿ¼ÕÒµ½ÕâЩÀý×Ó¡£
& ......

ÊÖ¶¯ÅäÖÃUbuntu LinuxÖ¸¶¨DNS·þÎñÆ÷µØÖ·

       ½éÉÜһϠUbuntu LinuxÖÐÈçºÎÖ¸¶¨DNS·þÎñÆ÷
µÄµØÖ·¡£
¡¡¡¡Ubuntu LinuxʹÓÃÎļþ"/etc/resolv.conf" ÎļþÅäÖÃDNS·þÎñÆ÷µÄµØÖ·£¬¿Éͨ¹ýnameserver ÅäÖÃÏîÉèÖÃDNS·þÎñÆ÷µÄIPµØÖ·£¬×î¶à¿ÉÒÔʹÓÃ3¸öDNS·þÎñÆ÷¡£
¡¡¡¡$ sudo vi /etc/resolv.conf
¡¡¡¡search localdomain
¡¡¡ ......

linux»·¾³Ï¶àÏ̱߳à³Ì

1 ÒýÑÔ
¡¡¡¡
Ị̈߳¨thread£©¼¼ÊõÔçÔÚ60Äê´ú¾Í±»Ìá³ö£¬µ«ÕæÕýÓ¦ÓöàÏ̵߳½²Ù×÷ϵͳÖÐÈ¥£¬ÊÇÔÚ80Äê´úÖÐ
ÆÚ£¬solarisÊÇÕâ·½ÃæµÄٮٮÕß¡£´«Í³µÄUnixÒ²Ö§³ÖÏ̵߳ĸÅÄµ«ÊÇÔÚÒ»¸ö½ø³Ì£¨process£©ÖÐÖ»ÔÊÐíÓÐÒ»¸öỊ̈߳¬ÕâÑù¶àÏ߳̾ÍÒâζ×Ŷà½ø
³Ì¡£ÏÖÔÚ£¬¶àÏ̼߳¼ÊõÒѾ­±»Ðí¶à²Ù×÷ϵͳËùÖ§³Ö£¬°üÀ¨Windows/NT£¬µ±È»£¬Ò²°üÀ¨Li ......

DBAÒªÕÆÎÕµÄLinux ÃüÁָͨÄÏ

¸ß¼¶ Linux ÃüÁָͨÄÏ
×÷ÕߣºArup Nanda
2006 Äê 8 Ô·¢²¼
ÔÚ Sheryl Calish ׫дµÄ“Linux ÎļþÃüÁָͨÄÏ”Õâƪ³öÉ«µÄÎÄÕÂÖУ¬Äúѧϰµ½ÁËһЩ¶ÔÓÚ Linux ÐÂÊÖÓÈΪÖØÒªµÄ³£Óà Linux ÃüÁî¡£¼ÈÈ»ÄúÏÖÔÚÒѾ­ÕÆÎÕÁË»ù´¡ÖªÊ¶£¬ÏÂÃæÎÒÃǽ«½éÉÜһЩ¸üΪ¸´ÔÓµ«È´·Ç³£ÓÐÓõÄÃüÁî¡£
ÔÚÕâ¸ö¹²·Ö 4 ¸ö²¿·ÖµÄÎÄÕ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ