linux tcʵÏÖipÁ÷Á¿ÏÞÖÆ
tcÊǸöÅäÖÃLinuxÄÚºËÁ÷Á¿¿ØÖƵŤ¾ß Ãû×Ö tc - ÏÔʾ£¯Î¬»¤Á÷Á¿¿ØÖÆÅäÖà ժҪ tc qdisc [ add | change | replace | link ] dev DEV [ parent qdisc-id | root ] [ handle qdisc-id ] qdisc [ qdisc specific parameters ] tc class [ add | change | replace ] dev DEV parent qdisc-id [ classid class-id ] qdisc [ qdisc specific parameters ] tc filter [ add | change | replace ] dev DEV [ parent qdisc-id | root ] protocol protocol prio priority filtertype [ filtertype specific parameters ] flowid flow-id tc [-s | -d ] qdisc show [ dev DEV ] tc [-s | -d ] class show dev DEV tc filter show dev DEV ¼ò½é TcÓÃÓÚLinuxÄں˵ÄÁ÷Á¿¿ØÖÆ¡£Á÷Á¿¿ØÖÆ°üÀ¨ÒÔϼ¸ÖÖ·½Ê½£º SHAPING(ÏÞÖÆ) µ±Á÷Á¿±»ÏÞÖÆ£¬ËûµÄ´«ÊäËÙÂʾͱ»¿ØÖÆÔÚij¸öÖµÒÔÏ¡£ÏÞÖÆÖµÄܹ»´ó´óСÓÚÓÐЧ´ø¿í£¬ÕâÑùÄܹ»Æ½»¬Í»·¢Êý¾ÝÁ÷Á¿£¬Ê¹ÍøÂç¸üΪÎȶ¨¡£shaping£¨ÏÞÖÆ£©Ö»ÊÊÓÃÓÚÏòÍâµÄÁ÷Á¿¡£ SCHEDULING(µ÷¶È) bitsCN.Com ͨ¹ýµ÷¶ÈÊý¾Ý°üµÄ´«Ê䣬Äܹ»ÔÚ´ø¿í·¶Î§ÄÚ£¬°´ÕÕÓÅÏȼ¶·ÖÅä´ø¿í¡£SCHEDULING(µ÷¶È)Ò²Ö»ÊÊÓÚÏòÍâµÄÁ÷Á¿¡£ POLICING(²ßÂÔ) SHAPINGÓÃÓÚ´¦ÀíÏòÍâµÄÁ÷Á¿£¬¶øPOLICIING(²ßÂÔ)ÓÃÓÚ´¦Àí½ÓÊÕµ½µÄÊý¾Ý¡£ DROPPING(¶ªÆú) ¼ÙÈçÁ÷Á¿³¬¹ýij¸öÉ趨µÄ´ø¿í£¬¾Í¶ªÆúÊý¾Ý°ü£¬²»¹ÜÊÇÏòÄÚ»¹ÊÇÏòÍâ¡£ Á÷Á¿µÄ´¦ÀíÓÉÈýÖÖ¶ÔÏó¿ØÖÆ£¬ËûÃÇÊÇ£ºqdisc(ÅŶӹæÔò)¡¢class(Àà±ð)ºÍfilter(¹ýÂËÆ÷)¡£ QDISC(ÅŶӹæÔò) QDisc(ÅŶӹæÔò)ÊÇqueueing disciplineµÄ¼òд£¬ËûÊÇÀí½âÁ÷Á¿¿ØÖÆ(traffic control)µÄ»ù´¡¡£ÎÞÂÛºÎʱ£¬Äں˼ÙÈçÐèҪͨ¹ýij¸öÍøÂç½Ó¿Ú·¢ËÍÊý¾Ý°ü£¬Ëû¶¼ÐèÒª°´ÕÕΪÕâ¸ö½Ó¿ÚÅäÖõÄqdisc(ÅŶӹæÔò)°ÑÊý¾Ý°ü¼ÓÈë¶ÓÁС£È»ºó£¬Äں˻ᾡ¿ÉÄܶàµØ´ÓqdiscÀïÃæÈ¡³öÊý¾Ý°ü£¬°ÑËûÃǽ»¸øÍøÂçÊÊÅäÆ÷Çý¶¯Ä£¿é¡£ ×î¼òµ¥µÄQDiscÊÇpfifoËû²»¶Ô½øÈëµÄÊý¾Ý°ü×öÈκεĴ¦Àí£¬Êý¾Ý°ü²ÉÓÃÏÈÈëÏȳöµÄ·½Ê½Í¨¹ý¶ÓÁС£µ«ÊÇ£¬Ëû»á±£´æÍøÂç½Ó¿ÚһʱÎÞ·¨´¦ÀíµÄÊý¾Ý°ü¡£ CLASS(Àà) ijЩQDisc(ÅŶӹæÔò)Äܹ»°üº¬Ò»Ð©Àà±ð£¬²»Í¬µÄÀà±ðÖÐÄܹ»°üº¬¸üÉîÈëµÄQDisc(ÅŶӹæÔò)£¬Í¨¹ýÕâЩϸ·ÖµÄQDisc»¹Äܹ»Îª½øÈëµÄ¶ÓÁеÄÊý¾Ý°üÅŶӡ£Í¨¹ýÅäÖø÷ÖÖÀà±ðÊý¾Ý°üµÄÀë¶Ó´ÎÐò£¬QDiscÄܹ»ÎªÅäÖÃÍøÂçÊý¾ÝÁ÷Á¿µÄÓÅÏȼ¶¡£ ÖйúÍø¹ÜÂÛ̳ FILTER(¹ýÂËÆ÷) filter(¹ýÂËÆ÷)ÓÃÓÚΪÊý¾Ý°ü·ÖÀ࣬¾ö¶¨ËûÃÇ°´ÕÕºÎÖÖQDisc½øÈë¶ÓÁС£ÎÞÂÛºÎʱÊý¾Ý°ü½øÈëÒ»¸ö»®·Ö×ÓÀàµÄÀà±ðÖУ¬¶¼ÐèÒª½ø
Ïà¹ØÎĵµ£º
°²×°£¬Éý¼¶ºÍжÔØÓ¦ÓÃÈí¼þÊÇÓ°ÏìÓû§¶Ô²Ù×÷ϵͳÆÀ¼ÛµÄ¾ö¶¨ÐÔÒòËØÖ®Ò»¡£¶ÔÓÚÈÕ½¥Á÷ÐÐµÄ GNU/Linux ²Ù×÷ϵͳ£¬ÓµÓмò½àÇ¿´óµÄÈí¼þ°ü¹ÜÀí»úÖƹ¦²»¿Éû¡£±¾ÎÄ´Ó»ù±¾µÄ rpm/dpkg ÃüÁîÐгö·¢£¬ÒÔ RHEL ºÍ UBUNTU ΪÀý£¬½éÉܵäÐÍ Linux ϵͳÖÐÓ¦ÓÃÈí¼þµÄ¹ÜÀíºÍʹÓá£
RPM/DPKG Á½´óÕóÓª¼ò½é
ÔÚ GNU/Linux( ÒÔϼò³Æ Linux) ²Ù×÷Ï ......
1. ѧ»áд¼òµ¥µÄmakefile
2. ±àÒ»Ó¦ÓóÌÐò£¬¿ÉÒÔÓÃmakefileÅÜÆðÀ´
3. ѧ»áдÇý¶¯µÄmakefile
4. дһ¼òµ¥charÇý¶¯£¬makefile±àÒëͨ¹ý£¬¿ÉÒÔinsmod£¬ lsmod£¬ rmmod. ÔÚÇý¶¯µÄinitº¯ÊýÀï´òÓ¡hello world£¬ insmodºóÓ¦¸ÃÄܹ»Í¨¹ýdmesg¿´µ½Êä³ö¡£
&n ......
˵ʵ»°£¬ÐźÅÊÇÎÒÌÖÑáµÄ¶«Î÷£¬ÔÚÎÒЩµÄ´úÂëÖУ¬ÎÒ¶¼ÏëÓÃ×î¼òµ¥µÄ°ì·¨À´´¦ÀíËü£¬ÏÖÔÚÓöµ½¶àÏß³ÌÖÐÐźŵĴ¦Àí£¬APUEÖеÄ˵·¨Ò²¿´µÃ²»ÊǺܶ®£¬CSDNÖÐһλÅóÓÑÓÐÈçϵÄ×ܽᣬÏȼÇÔÚÕâÀï¡£
1. ĬÈÏÇé¿öÏ£¬ÐźŽ«ÓÉÖ÷½ø³Ì½ÓÊÕ´¦Àí£¬¾ÍËãÐźŴ¦Àíº¯ÊýÊÇÓÉ×ÓÏß³Ì×¢²áµÄ
2. ÿ¸öÏ߳̾ùÓÐ×Ô¼ºµÄÐźÅÆÁ±Î×Ö£¬¿ÉÒÔʹÓÃsigprocmaskº¯ ......
ÔÚLinuxÏÂÃæȥѹËõÎļþ»òÕßĿ¼¡£ÎÒÃǽ«Ñ§Ï°zip, tar, tar.gzºÍtar.bz2µÈѹËõ¸ñʽµÄ»ù±¾Ó÷¨¡£
zip¸ñʽÒѳÉΪѹËõÎļþµÄ±ê׼ѡÔñ£¬¶øÇÒËüÔÚwindowsÉÏÒ²ÄÜʹÓá£
¾³£ÓÃzip¸ñʽѹËõÄÇЩÐèÒª¹²Ïí¸øwindowsÓû§µÄÎļþ¡£
Èç¹ûÖ»Êǹ²Ïí¸ølinuxÓû§»òÕßMacÓû§£¬Æ«ÏòÓÚÑ¡Ôñtar.gz¸ñʽ¡£
ZIP
zip¿ÉÄÜÊÇĿǰʹÓõÃ×î¶àµÄÎĵµ ......
linuxϼ¸ÖÖ·þÎñÆ÷µÄÅäÖÃʹÓÃÖ®Ò»£ºnfs tftp
°²×°nfsÐèÒªÔÚ·þÎñÆ÷¶Ë¹Ø±Õiptables·À»ðǽ£¬¹Ø±Õ·½·¨ÈçÏÂ
²é¿´·À»ðǽ״̬£º
/etc/init.d/iptables status
ÔÝʱ¹Ø±Õ·À»ðǽ£º
/etc/init.d/iptables stop
½ûÖ¹·À»ðǽÔÚϵͳÆô¶¯Ê±Æô¶¯
/sbin/chkconfig --level 2345 iptables off
ÖØÆôiptables:
/etc/init.d/iptabl ......