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

linuxѧϰ±Ê¼Ç06

(AIXÃüÁî)iostatÃüÁîÖ÷Ҫͨ¹ý¹Û²ìÎïÀí´ÅÅ̵ĻîԾʱ¼äÒÔ¼°ËûÃǵÄƽ¾ù´«ÊäËٶȣ¬¼à¿ØϵͳÊäÈë/Êä³öÉ豸¸ºÔØ.
iostat [¼ä¸ôʱ¼ä] [´òÓ¡´ÎÊý]
exp: iostat 5 2
psÃüÁîÊÇUNIXϵͳÖÐ×î³£¼ûµÄÃüÁËüÖ÷ÒªÏÔʾϵͳÖйØÓÚ½ø³ÌµÄͳ¼ÆºÍ״̬ÐÅÏ¢£¬Èç½ø³ÌID£¬I/OÐÐΪÒÔ¼°CPUÀûÓÃÂʵÈ.
ÏÔʾ10¸öÏûºÄCPU×î¶àµÄ½ø³Ì£º
ps aux |sort -rn -k 3|head –10 (AIX: ps aux |sort -rn +2 |head –10 )
ÏÔʾ10¸öÏûºÄ´æ´¢¿Õ¼ä×î¶àµÄ½ø³Ì£º
ps aux |sort -rn -k 4|head -10 (AIX: ps aux |sort -rn +3 |head -10 )
°´Ë³ÐòÏÔʾϵͳÖÐÊÜ·£µÄ½ø³Ì£º
(AIX: ps -eakl |sort -rn +5 )
°´ÓÅÏȼ¶Ë³ÐòÏÔʾϵͳÖеĽø³Ì£º
(AIX: ps -eakl |sort -n +6 |head )
°´´¦Àíʱ¼äΪ˳ÐòÏÔʾϵͳÖеÄÇ°Ê®¸ö½ø³Ì£º
(AIX: ps vx |grep -v PID |sort -rn +3 |head –10 )
°´Êµ¼ÊÄÚ´æʹÓõĶàÉÙ˳ÐòÏÔʾϵͳÖеÄÇ°Ê®¸ö½ø³Ì£º
(AIX: ps vx |grep -v PID |sort -rn +6 |head –10 )
(AIX&LinuxÃüÁî)vmstatÃüÁ¸æ¹ØÓÚºËÐÄỊ̈߳¬ÐéÄâÄڴ棬×ÔÏÝ£¨trap£©£¬´ÅÅÌÒÔ¼°CPUÐÐΪµÄͳ¼Æ¡£
¶øÇÒÿÖÖÐÐΪ±¨¸æ¶¼±»¸üϸÖµØÓðٷֱȷֱð±íʾÓû§Ì¬¡¢ºË̬¡¢¿ÕÏÐÒÔ¼°µÈ´ý´ÅÅÌI/OµÈÇé¿ö¡£
vmstat [¼ä¸ôʱ¼ä] [´òÓ¡´ÎÊý]
vmstat 5 2


Ïà¹ØÎĵµ£º

linux mysql ¿ª·¢»·¾³

°²×°mysql
sudo apt-get install mysql-servel-5.0 mysql-client-5.0
ÏÂÔØ°²×°¹ý³ÌÖУ¬»áÌáʾÊäÈërootÃÜÂë
°²×°CÓïÑÔ±à³Ì½Ó¿Ú£º
 sudo apt-get install libmysqlclient15-dev
¸ü¶àapi ²é¿´£ºhttp://dev.mysql.com/doc/refman/5.0/en/c.html
Ïà¹ØmysqlÍ·ÎļþºÍ¿âÎļþ°²×°ÔÚ/usr/include/mysql/ºÍ/usr/lib/mysqlÄ¿ ......

linuxÏÂmysqlµÄʹÓÃ


Æô¶¯mysql:  /etc/rc.d/init.d/mysql start
ÐÞ¸ÄÃÜÂë: ¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
ʹÓÃÃÜÂëµÇ¼:  mysql -u root -p
ÏÔʾÊý¾Ý¿â:  show databases;
Ñ¡ÔñÊý¾Ý¿â:  use Êý¾Ý¿âÃû;
ÏÔʾ±í:  show tables;
ÏÔʾ±í½á¹¹:  descibe ±íÃû;
Ô¶³ÌµÇ¼mysqlÐèÒª¿ªÆôÈ ......

Linuxϵͳ¹ÜÀíʵ¼ù(3)£ºGRUBϵͳÒýµ¼ÅäÖÃ

    °²×°ubuntuʱ£¬grubĬÈÏ°²×°ÔÚµÚÒ»¸öÓ²ÅÌ(hd0)µÄmbrÖУ¬Æäʵ¾ÍÊÇ°ÑÒýµ¼Îļþboot.imgдÈëÓ²Å̵Ämbr,µ±È»,Óû§Ò²¿ÉÒÔÑ¡Ôñ²»Ð´ÈëÓ²ÅÌmbr ¶øÊÇдÈëlinux·ÖÇøµÄÒýµ¼ÉÈÇø¡£grubÒÔfd±íʾÈíÅÌ£¬hd±íʾӲÅÌ(°üº¬IDEºÍSCSIÓ²ÅÌ)¡£ÒÔÇ°°æ±¾µÄgrubÆäÉ豸ÊÇ´Ó0¿ªÊ¼±àºÅ,·ÖÇøÒ²ÊÇ´Ó0¿ªÊ¼,Ö÷·ÖÇø´Ó0-3,Âß¼­·ÖÇø´Ó4¿ªÊ¼, ......

LinuxÏ·ÀÖ¹ÎļþÎóɾ³ýµÄÌØÊâ·½·¨

ͨ³£ÒªÓÃһЩÌØÊâµÄ·½·¨£¬·ÀÖ¹Îóɾ³ý£¬ÆäʵÎóɾ³ýÊÇ¿ÉÒÔ·ÀÖ¹µÄ£¬ÌØÒâɾ³ýÊÇÎÞ·¨·ÀÖ¹µÄ¡£
Îóɾ³ý£¬Í¨³£ÊÇchattr +i filename
[root@imdba imdba_t2]# ls -ltr
total 116
-rw-rw—- 1 mysql mysql    61 Oct 17 16:08 db.opt
-rw-rw—- 1 mysql mysql  8556 Oct 17 16:09 imdba_t2_t.frm ......

linuxÐÞ¸ÄÖ÷»úÃûµÄ·½·¨

linuxÐÞ¸ÄÖ÷»úÃûµÄ·½·¨
ÓÃhostnameÃüÁî¿ÉÒÔÁÙʱÐ޸ĻúÆ÷Ãû£¬µ«»úÆ÷ÖØÐÂÆô¶¯Ö®ºó¾Í»á»Ö¸´Ô­À´µÄÖµ¡£
#hostname   //²é¿´»úÆ÷Ãû
#hostname -i  //²é¿´±¾»úÆ÷Ãû¶ÔÓ¦µÄipµØÖ·
ÁíÍâÒ»ÖÖ·½·¨¾ÍÊÇÖ®¾ÃÐÞ¸ÄÅäÖÃÎļþ
ÐÞ¸Ä/etc/sysconfig/network   ÐÞ¸ÄÕâ¸öÎļþ£¬ÏµÍ³²ÅÓÐЧ
    /etc ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ