LinuxÏ·ÖÎöMysqlÈÕÖ¾µÄºÃ¹¤¾ß–mysqlsla
´Óhttp://hackmysql.com/mysqlslaÏÂÔØmysqlsla£¬µ±Ç°×îаæΪ£º2.03
tar zxvf mysqlsla-2.03.tar.gz
cp mysqlsla-2.03/bin/mysqlsla /usr/local/bin
Èç¹ûÌáʾ“Can’t locate DBI.pm”£¬Ö´ÐÐÒÔÏÂÃüÁî
yum install perl-DBI perl-DBD-MySQL -y
Õâʱ¾Í¿ÉÒÔʹÓÃmysqlslaÁË£¬Ó÷¨ÈçÏÂ
mysqlsla -lt slow slow.log
mysqlsla
ÕûÌåÀ´Ëµ, ¹¦Äܷdz£Ç¿´ó. Êý¾Ý±¨±í,·Ç³£ÓÐÀûÓÚ·ÖÎöÂý²éѯµÄÔÒò, °üÀ¨Ö´ÐÐƵÂÊ, Êý¾ÝÁ¿, ²éѯÏûºÄµÈ.
¸ñʽ˵Ã÷ÈçÏÂ:
×ܲéѯ´ÎÊý (queries total), È¥ÖغóµÄsqlÊýÁ¿ (unique)
Êä³ö±¨±íµÄÄÚÈÝÅÅÐò(sorted by)
×îÖØ´óµÄÂýsqlͳ¼ÆÐÅÏ¢, °üÀ¨ ƽ¾ùÖ´ÐÐʱ¼ä, µÈ´ýËøʱ¼ä, ½á¹ûÐеÄ×ÜÊý, ɨÃèµÄÐÐ×ÜÊý.
Count, sqlµÄÖ´ÐдÎÊý¼°Õ¼×ܵÄslow logÊýÁ¿µÄ°Ù·Ö±È.
Time, Ö´ÐÐʱ¼ä, °üÀ¨×Üʱ¼ä, ƽ¾ùʱ¼ä, ×îС, ×î´óʱ¼ä, ʱ¼äÕ¼µ½×ÜÂýsqlʱ¼äµÄ°Ù·Ö±È.
95% of Time, È¥³ý×î¿ìºÍ×îÂýµÄsql, ¸²¸ÇÂÊÕ¼95%µÄsqlµÄÖ´ÐÐʱ¼ä.
Lock Time, µÈ´ýËøµÄʱ¼ä.
95% of Lock , 95%µÄÂýsqlµÈ´ýËøʱ¼ä.
Rows sent, ½á¹ûÐÐͳ¼ÆÊýÁ¿, °üÀ¨Æ½¾ù, ×îС, ×î´óÊýÁ¿.
Rows examined, ɨÃèµÄÐÐÊýÁ¿.
Database, ÊôÓÚÄĸöÊý¾Ý¿â
Users, ÄĸöÓû§,IP, Õ¼µ½ËùÓÐÓû§Ö´ÐеÄsql°Ù·Ö±È
Query abstract, ³éÏóºóµÄsqlÓï¾ä
Query sample, sqlÓï¾ä
³ýÁËÒÔÉϵÄÊä³ö, ¹Ù·½»¹ÌṩÁ˺ܶඨÖÆ»¯²ÎÊý,¾ßÌå¿ÉÒÔµ½Õâ²é¿´£ºhttp://hackmysql.com/mysqlsla_documentation
Ïà¹ØÎĵµ£º
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
1. ·þÎñÆ÷nfsµÄÅäÖÃ
2. ¿Í»§¶ËnfsµÄÅäÖÃ
3. ʹÓÃnfs
3.1 ×÷Ϊ¹²ÏíÎļþϵͳmount
3.2 ×÷Ϊ¸ùÎļþϵͳmount
4.±¸ ×¢
nfsÊÇNetwork File System£¬»ùÓÚRPC(Remote Procedure Call ProtocolÔ¶³Ì¹ý³Ìµ ......
1.ÔÚLinuxÆô¶¯½Å±¾ÖÐÖÆ×÷jffs2
2.ÔÚLinuxÖÕ¶ËÏÂÖÆ×÷jffs2
3.±¸×¢
1.ÔÚLinuxÆô¶¯½Å±¾ÖÐÖÆ×÷jffs2
¾ßÌå²Ù×÷²½Ö裺
sysinitÖÐ:
echo “Make jffs2 filesystem:”
erase /dev/mtd5
cd /tmp
echo “test” > test.txt
mkfs.jffs2 –d /tmp > /dev/mtdblock5
&nbs ......
MySQL 5.1.40ÒѾ·¢²¼£¬ÔÚÕâÀïÓÐһЩеÄÌØÐÔ³öÏÖ£¬°üÀ¨MySQL»ùȺ»ùÓÚ´ÅÅ̵ÄÊý¾ÝÖ§³ÖµÈµÈ¡£¡¡¡¡MySQL 5.1.40ÒѾ·¢²¼£¬ÕâÒ»°æ±¾µÄMySQLÓкܶàÐµĹ¦ÄÜÌØÐÔ£¬Ï£ÍûÕâЩÐÂÌØÐÔÄÜÈôó¼Ò½ñºóµÄ¹¤×÷¸üÓÐЧÂÊ¡£MySQLÊÇÏÖÔÚ×îÁ÷ÐÐÒ»¸ö¶àÏ̵߳Ä,½á¹¹»¯²éѯÓïÑÔ(SQL)Êý¾Ý¿â·þÎñÆ÷.¾ø´ó¶àÊýPHPÍøÕ¾µÄÊý¾Ý¿âºǫ́¶¼ÊDzÉÓÃÕâÒ»Êý¾Ý¿â.
¡¡ ......
Ò»°ãÔÚµ÷ÊÔ´òÓ¡DebugÐÅÏ¢µÄʱºò, ÐèÒª¿É±ä²ÎÊýµÄºê. ´ÓC99¿ªÊ¼¿ÉÒÔʹ±àÒëÆ÷±ê×¼Ö§³Ö¿É±ä²ÎÊýºê(variadic macros), ÁíÍâGCCÒ²Ö§³Ö¿É±ä²ÎÊýºê, µ«ÊÇÁ½ÖÖÔÚϸ½ÚÉÏ¿ÉÄÜ´æÔÚÇø±ð.
1. __VA_ARGS__
__VA_ARGS__ ½« "..." ´«µÝ¸øºê . Èç
......