µ±Ç°Î»ÖãºLinux½Ì³Ì - Linux×ÊѶ - ¾«È·¼à¿ØÍøÂçÁ÷Á¿µÄÐÂÉúÁ¦Á¿---NTOP

¾«È·¼à¿ØÍøÂçÁ÷Á¿µÄÐÂÉúÁ¦Á¿---NTOP

¡¡¡¡¼à¿ØÍøÂçÁ÷Á¿³£ÓÃMRTGÕâ¸ö¹¤¾ß£¬ÕâÀï½éÉÜÁíÒ»¸ö¹¤¾ß¡ªNTOP¡£ÓÃNTOPÏÔʾÍøÂçµÄʹÓÃÇé¿ö±ÈMRTG¸ü¼ÓÖ±¹Û¡¢Ïêϸ¡£NTOPÉõÖÁ¿ÉÒÔÁгöÿ¸ö½Úµã¼ÆËã»úµÄÍøÂç´ø¿íÀûÓÃÂÊ¡£¡¡¡¡¡¡¡¡NTOPµÄ¹¦ÄÜ¡¡¡¡¡¡¡¡NTOPÖ÷ÒªÌṩÒÔÏÂһЩ¹¦ÄÜ£º¡¡¡¡¡¡¡¡¡ô ×Ô¶¯´ÓÍøÂçÖÐʶ±ðÓÐÓõÄÐÅÏ¢£»¡¡¡¡¡¡¡¡¡ô ½«½Ø»ñµÄÊý¾Ý°üת»»³ÉÒ×ÓÚʶ±ðµÄ¸ñʽ£»¡¡¡¡¡¡¡¡¡ô ¶ÔÍøÂç»·¾³ÖÐͨÐÅʧ°ÜµÄÇé¿ö½øÐзÖÎö£»¡¡¡¡¡¡¡¡¡ô ̽²âÍøÂç»·¾³ÖеÄͨÐÅÆ¿¾±£»¡¡¡¡¡¡¡¡¡ô ¼Ç¼ÍøÂçͨÐŵÄʱ¼äºÍ¹ý³Ì¡£¡¡¡¡¡¡¡¡Ëü¿ÉÒÔͨ¹ý·ÖÎöÍøÂçÁ÷Á¿À´È·¶¨ÍøÂçÉÏ´æÔڵĸ÷ÖÖÎÊÌ⣻Ҳ¿ÉÒÔÓÃÀ´ÅжÏÊÇ·ñÓкڿÍÕýÔÚ¹¥»÷ÍøÂçϵͳ£»»¹¿ÉÒԺܷ½±ãµØÏÔʾ³öÌض¨µÄÍøÂçЭÒé¡¢Õ¼ÓôóÁ¿´ø¿íµÄÖ÷»ú¡¢¸÷´ÎͨÐŵÄÄ¿±êÖ÷»ú¡¢Êý¾Ý°üµÄ·¢ËÍʱ¼ä¡¢´«µÝÊý¾Ý°üµÄÑÓʱµÈÏêϸÐÅÏ¢¡£Í¨¹ýÁ˽âÕâЩÐÅÏ¢£¬Íø¹ÜÔ±¿ÉÒÔ¶Ô¹ÊÕÏ×ö³ö¼°Ê±µÄÏìÓ¦£¬¶ÔÍøÂç½øÐÐÏàÓ¦µÄÓÅ»¯µ÷Õû£¬ÒÔ±£Ö¤ÍøÂçÔËÐеÄЧÂʺͰ²È«¡£¡¡¡¡¡¡¡¡°²×°NTOP¡¡¡¡¡¡¡¡ºÍMRTGÏà±È£¬NTOPµÄ°²×°ÅäÖøü¼òµ¥£¬¿ÉÒÔ²»Ê¹ÓÃApache·þÎñÆ÷¡£½«NTOP°²×°ÔÚÍø¹Ü¹¤×÷Õ¾ÉÏ£¬¼à²âÖС¢Ð¡LinuxÒì¹¹ÍøÂçµÄÍøÂçÐÔÄܷdz£·½±ã¡£¡¡¡¡¡¡¡¡Ê×Ïȵ½http://optusnet.dl.sourceforge.net/...top/ntop-2.2.gz ÏÂÔØNTOP×îеÄÔ´´úÂ룬ÔÙµ½FTP://ftp.rediris.es/sites/ftp.redh...6.2-12.i386.rpmÏÂÔØÏà¹Ø¿âº¯ÊýÄ£¿élibpcap¡£¡¡¡¡¡¡¡¡ÏÈ°²×°libpcapÈí¼þ°üÔÙ°²×°NTOP£º¡¡¡¡#rpm -ivh libpcap-0.6.2-12.i386.rpm¡¡¡¡#tar zxvf ntop-2.2.tgz¡¡¡¡#cd ntop/gdchart0.94c¡¡¡¡#./configure¡¡¡¡......¡¡¡¡¡¡¡¡ÅäÖÃNTOPʱ£¬ÏµÍ³»áÌáʾÏȱàÒëgdºÍzlibÄ£¿é¡£¡¡¡¡do not forget to build:¡¡¡¡1.gd-1.8.3/libpng-1.2.1¡¡¡¡2.zlib-1.1.4/¡¡¡¡¡¡¡¡±àÒëÍêgdºÍzlib£¬Ôٻص½NTOPĿ¼ÏÂÖØбàÒë¡¢°²×°£º¡¡¡¡¡¡¡¡#cd gd-1.8.3/libpng-1.2.1/¡¡¡¡#cp scripts/makefile.linux Makefile¡¡¡¡#make¡¡¡¡#cd ../../zlib-1.1.4¡¡¡¡#./configure¡¡¡¡#make¡¡¡¡#cd ..¡¡¡¡#make¡¡¡¡#cd ../ntop/¡¡¡¡# ./configure¡¡¡¡#make;make install¡¡¡¡¡¡¡¡Ëæºó½¨Á¢logĿ¼£º¡¡¡¡¡¡¡¡#mkdir /var/log/ntop/¡¡¡¡¡¡¡¡ÒÔÉ϶¼Íê³Éºó£¬¾Í¿ÉÒÔÆô¶¯NTOPÁË£º¡¡¡¡¡¡¡¡#ntop -P /var/log/ntop/ -u nobody &¡¡¡¡¾«È·¼à¿Ø¡¡¡¡¡¡¡¡NTOPÖ§³Ö¼òµ¥ÍøÂç¹ÜÀíЭÒ飨Simple Network Management Protocol£¬SNMP£©£¬²¢°ÑPNG¸ñʽµÄͼÐÎÒÔHtmlµÄ·½Ê½ÏÔʾ³öÀ´£¬±ãÓÚÍø¹ÜÔ±¶ÔËù¼à¿ØµÄÍøÂçÉ豸£¨½»»»»ú¡¢Â·ÓÉÆ÷µÈ£©½øÐйÜÀí¡£¡¡¡¡¡¡¡¡´ò¿ªä¯ÀÀÆ÷£¬ÔÚµØÖ·À¸ÊäÈëhttp://IP:3000£¨¡°IP¡±¾ÍÊÇ°²×°NTOPµÄÄÇ̨Íø¹Ü¹¤×÷Õ¾µÄIPµØÖ·£©£¬¼´¿É´ò¿ªNTOP¹ÜÀí½çÃæ¡£µÚÒ»´ÎÔËÐÐʱ»áÒªÇóÊäÈë¹ÜÀíÔ±µÄÃÜÂ룬ԤÉèÃÜÂëÊÇ¡°admin¡±£¬µÚ¶þ´ÎÆô¶¯¾Í²»ÓÃÔÙÊäÈëÁË.¡¡¡¡¡¡¡¡1. ²é¿´ÍøÂçÕûÌåÁ÷Á¿¡¡¡¡¡¡¡¡²é¿´ÍøÂçÕûÌåÁ÷Á¿ÓÃÊó±êµã»÷¡°Stats¡±Ñ¡Ï£¬È»ºóµ¥»÷¡°Traffic¡±Ñ¡Ïî¡£ÍøÂçÁ÷Á¿»áÒÔÖùÃæͼºÍÃ÷ϸ±í¸ñµÄÐÎʽÏÔʾ³öÀ´.¡¡¡¡¡¡¡¡2. ²é¿´Ö÷»úÁ÷Á¿¡¡¡¡¡¡¡¡Èç¹ûÏë²é¿´¾ßÌå½Úµã¼ÆËã»úµÄÍøÂçÁ÷Á¿£¬ÓÃÊó±êµ¥»÷¡°IP Traffic¡±Ñ¡Ï£¬È»ºóµ¥»÷¡°Host¡±Ñ¡Ïî¼´¿É.¡¡¡¡¡¡¡¡3. ¼à²âÖ÷»úʹÓõÄÍøÂçЭÒé¡¡¡¡¡¡¡¡ÔÚͼ3Àï¿ÉÒÔ¿´µ½Ò»¸öÖ÷»úÃû³Æ¡°CAO¡±µÄ¼ÆËã»ú·¢ËÍÁË´óÁ¿Êý¾Ý£¬ÆäIPµØÖ·ÊÇ¡°192.168.0.5¡±£¬MACµØÖ·ÊÇ¡°52:54:AB:34:5B:09¡±¡£Èç¹ûÏëÁ˽â¸Ã¼ÆËã»ú´«ÊäÁËÄÇЩÊý¾Ý£¬Ë«»÷¸ÃÖ÷»úÃû¼´¿É·ÖÎö³öÓû§Ê¹Óõĸ÷ÖÖÍøÂç´«ÊäЭÒéµÄÀàÐͺͷֱðÕ¼Óдø¿íµÄ±ÈÀý.¡¡¡¡¡¡¡¡4.²é¿´¶Ë¿ÚʹÓÃÇé¿ö¡¡¡¡¡¡¡¡NTOP¿ÉÒ԰Ѷ˿ÚʹÓÃÇé¿öÓëÓ¦ÓóÌÐò¹ØÁªÆðÀ´£¬ÕâºÍʹÓá°netstat -an¡±ÃüÁîµÄЧ¹ûÀàËÆ£¬²¢ÇÒ¿ÉÒÔÏÔʾ¶Ë¿Ú´ò¿ªÊ±¼ä¡¢¶Ë¿ÚÁ÷Á¿µÈÏêϸÐÅÏ¢¡£±ÈÈ磬¿ÉÒ԰ѱ¾»ú¿ª·ÅµÄTCP/UDP¶Ë¿ÚͬӦÓóÌÐò¹ØÁªÆðÀ´£¬µ¥»÷¡°IP Traffic¡±¡ú¡°L¡ªL¡±¡ú¡°TCP/UDP Servers/Ports Usage¡±¡¡¡¡¡¡¡¡Ð¡½á¡¡¡¡¡¡¡¡Í¸¹ýNTOP£¬ËùÓнø³öÍøÂçµÄÊý¾Ý»ù±¾É϶¼ÎÞËù¶ÝÐΡ£²»¹ÜÊÇÓÃÀ´¼à²âÍøÂ磬»¹ÊÇÓÃÀ´ÖÆ×÷ÍøÂçÇé¿ö±¨¸æ£¬NTOP¶¼ÊǷdz£ÓÅÐãµÄ¹¤¾ß¡£²»¹ý£¬ÓÉÓÚNTOPÍøÂç¡°Ðá̽Æ÷¡±µÄ±¾ÖÊ£¬¾ö¶¨ÁËËüÊÇÒ»°Ñ¡°Ë«Èн£¡±£¬ÈçºÎ±£»¤ÕâЩÐÅÏ¢Ö»Ìṩ¸øÊÚȨÈËÊ¿£¬ÊǸöÖµµÃ×¢ÒâµÄÎÊÌâ¡£
[1] [2] ÏÂÒ»Ò³ 

£¨³ö´¦£ºhttp://www.sheup.com£©


ÉÏÒ»Ò³ [1] [2]