iostatÀ´¶ÔlinuxÓ²ÅÌIOÐÔÄܽøÐÐÁ˽â
ÒÔÇ°Ò»Ö±²»Ì«»áÓÃÕâ¸ö²ÎÊý¡£ÏÖÔÚÈÏÕæÑо¿ÁËÒ»ÏÂiostat£¬ÒòΪ¸ÕºÃÓÐ̨ÖØÒªµÄ·þÎñÆ÷ѹÁ¦¸ß,ËùÒÔ·ÅÉÏÀ´·ÖÎöÒ»ÏÂ.ÏÂÃæÕą̂¾ÍÊÇIOÓÐѹÁ¦¹ý´ó
µÄ·þÎñÆ÷
$iostat -x 1
Linux 2.6.33-fukai (fukai-laptop) _i686_ (2 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
5.47 0.50 8.96 48.26 0.00 36.82
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util
sda 6.00 273.00 99.00 7.00 2240.00 2240.00 42.26 1.12 10.57 7.96 84.40
sdb 0.00 4.00 0.00 350.00 0.00 2068.00 5.91 0.55 1.58 0.54 18.80
rrqm/s:
ÿÃë½øÐÐ merge µÄ¶Á²Ù×÷ÊýÄ¿¡£¼´ delta(rmerge)/s
wrqm/s:
ÿÃë½øÐÐ merge µÄд²Ù×÷ÊýÄ¿¡£¼´ delta(wmerge)/s
r/s:
ÿÃëÍê³ÉµÄ¶Á I/O É豸´ÎÊý¡£¼´ delta(rio)/s
w/s:
ÿÃëÍê³ÉµÄд I/O É豸´ÎÊý¡£¼´ delta(wio)/s
rsec/s:
ÿÃë¶ÁÉÈÇøÊý¡£¼´ delta(rsect)/s
wsec/s:
ÿÃëдÉÈÇøÊý¡£¼´ delta(wsect)/s
rkB/s:
ÿÃë¶ÁK×Ö½ÚÊý¡£ÊÇ rsect/s µÄÒ»°ë£¬ÒòΪÿÉÈÇø´óСΪ512×Ö½Ú¡£(ÐèÒª¼ÆËã)
wkB/s:
ÿÃëдK×Ö½ÚÊý¡£ÊÇ wsect/s µÄÒ»°ë¡£(ÐèÒª¼ÆËã)
avgrq-sz:
ƽ¾ùÿ´ÎÉ豸I/O²Ù×÷µÄÊý¾Ý´óС
(ÉÈÇø)¡£delta(rsect+wsect)/delta(rio+wio)
avgqu-sz:
ƽ¾ùI/O¶ÓÁг¤¶È¡£¼´ delta(aveq)/s/1000
(ÒòΪaveqµÄµ¥Î»ÎªºÁÃë)¡£
await:
ƽ¾ùÿ´ÎÉ豸I/O²Ù×÷µÄµÈ´ýʱ¼ä (ºÁÃë)¡£¼´
delta(ruse+wuse)/delta(rio+wio)
svctm:
ƽ¾ùÿ´ÎÉ豸I/O²Ù×÷µÄ·þÎñʱ¼ä (ºÁÃë)¡£¼´
delta(use)/delta(rio+wio)
%util:
Ò»ÃëÖÐÓаٷÖÖ®¶àÉÙµÄʱ¼äÓÃÓÚ I/O ²Ù×÷£¬»òÕß˵һÃëÖÐÓжàÉÙʱ¼ä I/O
¶ÓÁÐÊǷǿյġ£¼´ delta(use)/s/1000 (ÒòΪuseµÄµ¥Î»ÎªºÁÃë)
Èç¹û %util ½Ó½ü 100%£¬ËµÃ÷²úÉúµÄI/OÇëÇóÌ«¶à£¬I/OϵͳÒѾÂú¸ººÉ£¬¸Ã´ÅÅÌ
¿ÉÄÜ´æÔÚÆ¿¾±¡£
idleСÓÚ70% IOѹÁ¦¾Í½Ï´óÁË,Ò»°ã¶ÁÈ¡ËÙ¶ÈÓн϶àµÄwait.
ͬʱ¿ÉÒÔ½áºÏvmstat ²é¿´²é¿´b²ÎÊý(µÈ´ý×ÊÔ´
Ïà¹ØÎĵµ£º
general setup
---> enable deprecated sysfs features which may confuse old
userspace tools
insmod: error inserting '/lib/dm-region-hash.ko' : -1 File exists
½â¾ö
cp /boot/initrd-2.6.x.img /tmp
cd /tmp
mkdir newinitrd
cd newinitrd/
zcat ../initrd-2.6.x.img |cpio -i
ÏÂ ......
nohupÃüÁîÓ÷¨¼ò½é
nohup
Èç¹ûÄãÕýÔÚÔËÐÐÒ»¸ö½ø³Ì£¬¶øÇÒÄã¾õµÃÔÚÍ˳öÕÊ»§Ê±¸Ã½ø³Ì»¹²»»á½áÊø£¬ÄÇô¿ÉÒÔʹÓÃn o h u pÃüÁî¡£¸ÃÃüÁî¿ÉÒÔÔÚÄãÍ˳öÕÊ»§Ö®ºó¼ÌÐøÔËÐÐÏàÓ¦µÄ½ø³Ì¡£n o h u p¾ÍÊDz»¹ÒÆðµÄÒâ˼( no hang up)¡£
¸ÃÃüÁîµÄÒ»°ãÐÎʽΪ£º
´úÂë:
nohup command &
ʹÓÃnohupÃüÁîÌá½»×÷Òµ
Èç¹ûʹÓÃn o h u pà ......
ÔÚQTÖпÉÒÔÖ±½ÓʹÓÃQTextCodecÀ´×ª»»×Ö·û´®µÄ±àÂë¡£
ÀýÈ磬ÎÒÃÇÏëÔÚ³ÌÐòÖÐʹÓÃÖÐÎÄ£¬ÀàËÆtr£¨“飬ÄãºÃÂ𣿔£©¡£ÎÒÃÇÒªÔÚmainº¯ÊýÖÐÔö¼ÓÒÔϼ¸ÌõÓï¾ä£¬ÖØÐÂÉèÖÃÒ»ÏÂĬÈϵıàÂëÆ÷¡£
Ïȵ÷ÓÃÏÂÃæÁ½¸öº¯ÊýÖ®Ò»
QTextCodec *codec=QTextCodec::codecForName(”gbk”);
QTextCodec *codec=QTextCodec ......
linuxÓкܶàÖµµÃѧϰµÄµØ·½£¬ÕâÀïÎÒÃÇÖ÷Òª½éÉÜlinux¿âÎļþ£¬¾¹ýËѼ¯ºÍÕûÀílinux¿âÎļþ²ÄÁÏ£¬ÔÚÕâÀïÄóöÀ´ºÍ´ó¼Ò·ÖÏíһϣ¬Ï£Íû´ó¼Ò¿´ºó»áÓв»ÉÙÊÕ»ñ¡£
linux¿âÎļþÔÚÁ¬½Ó£¨¾²Ì¬¿âºÍ¹²Ïí¿â£©ºÍÔËÐУ¨½öÏÞÓÚʹÓù²Ïí¿âµÄ³ÌÐò£©Ê±±»Ê¹Óã¬ÆäËÑË÷·¾¶ÊÇÔÚϵͳÖнøÐÐÉèÖõġ£
Ò»°ã Linux ϵͳ°Ñ /lib ºÍ /usr/lib Á½¸öĿ¼×÷Î ......
ÏÂÔØÈñ½ÝÉÏÍø°ü,½âѹ,ÓÐĿ¼: libpcap.so.0.6.2, libstdc++.so.5,compat-libstdc%2B%2B-33_3.2.3-48_i386.deb,xrgsu
1½øÈëruijieĿ¼
sudo cd ./ruijie(½«¸ÃÎļþ¼Ð·ÅÔÚµ±Ç°Óû§Ä¿Â¼ÏÂ)
2¸´ÖÆÎļþ
sudo cp xrgsu /bin
sudo cp libpcap.so.0.6.2 /usr/lib
sudo cp libstdc++.so.5 /usr/lib
find /usr/lib -name " ......