LinuxÏ»ñÈ¡»úÆ÷ÐÔÄÜ
×¢Òâ¸Ã·½·¨ÊǼÆËãµÄ×Ô¿ª»úÒÔÀ´µÄʹÓÃÂÊ£¬ÊÇÒ»¸öÈ«¾ÖµÄ£¬Ã»¶à´óÒâÒ壬ÿһ´Î¼ÆËãCPUÀûÓÃÂÊ = 100 *£¨user + nice + system£©/£¨user + nice + system + idle£© ÕâÀïÒª¼õÈ¥Ò»¶¨Ê±¼äÒÔÇ°·½¿É¼ÆËã³öÕâÒ»¶Îʱ¼äÄÚµÄcpuʹÓÃÂÊ¡£ "procÎļþϵͳÊÇÒ»¸öαÎļþϵͳ£¬ËüÖ»´æÔÚÄÚ´æµ±ÖУ¬¶ø²»Õ¼ÓÃÍâ´æ¿Õ¼ä¡£ËüÒÔÎļþϵͳµÄ·½Ê½Îª·ÃÎÊϵͳÄÚºËÊý¾ÝµÄ²Ù×÷Ìṩ½Ó¿Ú¡£Óû§ºÍÓ¦ÓóÌÐò¿ÉÒÔͨ ¹ýprocµÃµ½ÏµÍ³µÄÐÅÏ¢£¬²¢¿ÉÒԸıäÄں˵ÄijЩ²ÎÊý¡£" ÕâÀォ½éÉÜÈçºÎ´Ó/procÎļþϵͳÖлñÈ¡Óë·À»ðǽÏà¹ØµÄһЩÐÔÄܲÎÊý£¬ÒÔ¼°ÈçºÎͨ¹ý/procÎļþϵͳÐÞ¸ÄÄں˵ÄÏà¹ØÅäÖᣠ1¡¢´Ó/procÎļþϵͳ»ñÈ¡Ïà¹ØµÄÐÔÄܲÎÊý cpuʹÓÃÂÊ£º /proc/stat ÄÚ´æʹÓÃÇé¿ö£º /proc/meminfo ÍøÂ縺ÔØÐÅÏ¢£º /proc/net/dev ÏàÓ¦µÄ¼ÆËã·½·¨£º(Õª×Ô£ºÊ²Ã´ÊÇ procÎļþϵͳ£¬¼û²Î¿¼×ÊÁÏ) £¨1£© ´¦ÀíÆ÷ʹÓÃÂÊ £¨2£© ÄÚ´æʹÓÃÂÊ £¨3£© Á÷ÈëÁ÷³öÊý¾Ý°ü £¨4£© ÕûÌåÍøÂ縺ÔØ ÕâЩÊý¾Ý·Ö±ðÒª´Ó/proc/stat¡¢/proc/net/dev¡¢/proc/meminfoÈý¸öÎļþÖÐÌáÈ¡¡£ÈçÀïÓÐÎÊÌâ»ò¶ÔÒªÌáÈ¡µÄÊý¾Ý²»Ì«Çå³þ£¬ ¿ÉÒÔʹÓÃman procÀ´²é¿´procÎļþϵͳµÄÁª»úÊֲᡣ £¨1£© ´¦ÀíÆ÷ʹÓÃÂÊ ÕâÀïÒª´Ó/proc/statÖÐÌáÈ¡ËĸöÊý¾Ý£ºÓû§Ä£Ê½£¨user£©¡¢µÍÓÅÏȼ¶µÄÓû§Ä£Ê½£¨nice£©¡¢ÄÚºËģʽ£¨system£©ÒÔ¼°¿ÕÏеĴ¦ÀíÆ÷ʱ¼ä £¨idle£©¡£ËüÃǾùλÓÚ/proc/statÎļþµÄµÚÒ»ÐС£CPUµÄÀûÓÃÂÊʹÓÃÈçϹ«Ê½À´¼ÆËã¡£ CPUÀûÓÃÂÊ = 100 *£¨user + nice + system£©/£¨user + nice + system + idle£© £¨2£© ÄÚ´æʹÓÃÂÊ ÕâÀïÐèÒª´Ó/proc/meminfoÎļþÖÐÌáÈ¡Á½¸öÊý¾Ý£¬µ±Ç°ÄÚ´æµÄʹÓÃÁ¿(cmem)ÒÔ¼°ÄÚ´æ×ÜÁ¿(amem)¡£ ÄÚ´æʹÓÃ°Ù·Ö±È = 100 * (cmem / umem) £¨3£©ÍøÂçÀûÓÃÂÊ ÎªÁ˵õ½ÍøÂçÀûÓÃÂʵÄÏà¹ØÊý¾Ý£¬ÐèÒª´Ó/proc/net/devÎļþÖлñµÃÁ½¸öÊý¾Ý£º´Ó±¾»úÊä³öµÄÊý¾Ý°üÊý£¬Á÷Èë±¾»úµÄÊý¾Ý°üÊý¡£ËüÃǶ¼Î»ÓÚÕâ¸öÎļþµÄ µÚËÄÐС£ ÐÔÄÜÊÕ¼¯³ÌÐò¿ªÊ¼¼Ç¼ÏÂÕâÁ½¸öÊý¾ÝµÄ³õʼֵ£¬ÒÔºóÿ´Î»ñµÃÕâ¸öÖµºó¾ù¼õÈ¥Õâ¸ö³õʼֵ¼´Îª´Ó¼¯ÈºÆô¶¯¿ªÊ¼´Ó±¾½Úµãͨ¹ýµÄÊý¾Ý°ü¡£ ÀûÓÃÉÏÊöÊý¾Ý¼ÆËã³öÍøÂçµÄƽ¾ù¸ºÔØ£¬·½·¨ÈçÏ£º ƽ¾ùÍøÂ縺ÔØ = (Êä³öµÄÊý¾Ý°ü+Á÷ÈëµÄÊý¾Ý°ü) / 2 2. ͨ¹ý/procÎļþϵͳµ÷ÕûÏà¹ØµÄÄÚºËÅäÖÃÔÊÐíipת·¢ /proc/sys/net/ipv4/ip_forward ½ûÖ¹ping /proc/sys/net/ipv4/icmp_echo_ignore_all ¿ÉÒÔÔÚÃüÁîÐÐÏÂÖ±½ÓÍùÉÏÊöÁ½¸ö“Îļþ”ÀïͷдÈë"1"À´ÊµÏÖÏà¹ØÅäÖã¬Èç¹ûдÈë"0"½«È¡ÏûÏà¹ØÅäÖᣲ»¹ýÔÚϵͳÖØÆôÒÔºó£¬ÕâЩÅäÖý«»Ö¸´Ä¬ÈÏÉèÖã¬Ëù ÒÔ£¬Èç¹ûÏëÈÃÕâЩÐÞ
Ïà¹ØÎĵµ£º
linuxϵÄÖ÷ÒªÎļþ
/boot/grub/grub.conf GRUB configuration file
/boot/module-info-* Module information for the Linux kernel
/boot/System.map-* Map of the Linux kernel
/boot/vmlinuz-* Linux kernel
/etc/aliases Mail aliases
/etc/a ......
1.Äں˱àÒë±ØÐëÔÚroot»·¾³Ï£¬¶øUbuntu×°ºóûÓÐrootÓû§£¬ËùÒÔÉèÖÃrootÃÜÂë
sudo passwd root
2.su»Ø³µ£¬ÊäÈëÃÜÂë¾ÍÊÇÒÔrootÉí·ÝÁË£¬
3.ÏÂÔØlinuxÄں˲¢½«ÆäתÒƵ½/usr/srcÎļþ¼Ð
cp Îļþ /usr/src
4.tar -jxvf linux-2.6.29.4.tar.bz2
......
CassandraÊÇÒ»¸ö¿ªÔ´µÄ·Ö²¼Ê½Key-Value´æ´¢ÏµÍ³£¬Ö÷ÒªÓÃÓÚFacebook¡¢Digg¡¢TwitterµÈ´óÐÍ´óÊý¾ÝÁ¿µÄÍøÕ¾£¬ÏÖÔÚÒѾ³ÉΪApacheµÄ¶¥¼¶ÏîÄ¿¡£
ÐèÒªÏÈ°²×°Java 1.6ÒÔÉÏ°æ±¾ºÍThrift¡£
ÏÂÔØCassandra£º
1.wget http://www.apache.org/dyn/closer.cgi?path=/cassandra/0.6.0/apache-cassandra-0.6.0-bin.tar.gz
½âѹËõ£º
2.t ......
LinuxÖжÔÓÚһЩ´óÈÎÎñÐèÒªÔÚºǫ́ÔËÐУ¬·ñÔò»áÒ»Ö±Õ¼ÓÃÆÁÄ»£¬·À°Ê¹ÓÃÕßʹÓÃÖÕ¶ËÈ¥Íê³ÉÆäËüµÄÈÎÎñ¡£ÆäÖлáÌṩÈçϼ¸¸öÃüÁîÀ´½øÐкǫִ́ÐУº
1¡¢ ÉèÖÃcrontabÎļþ£¬²¢ÓÃËüÀ´Ìá½»×÷Òµ£»ÆäÖÐcron ϵͳµ÷¶È½ø³Ì£¬¿ÉÒÔʹÓÃËüÔÚÿÌìµÄ·Ç¸ß·å¸ººÉʱ¼ä¶ÎÔËÐÐ×÷Òµ£¬»òÔÚÒ»ÖÜ»òÒ»ÔÂÖеIJ»Í¬Ê±¶ÎÔËÐС£
2¡¢ ʹÓÃatÃüÁîÀ ......
linuxÏÂapache+php°²×°³£¼ûÎÊÌâ
configure: error: Unable to find libgd.(a|so)
Èç¹ûʹÓõÄÊÇubuntu»òdebian¾ÍºÜ¼òµ¥ÁË£¬Ö±½Ósudo apt-get install apache2 libapache2-mod-php5 php5 php5-gd ¾Í»ù±¾Éϸ㶨£¬µ«ÊÇÓÃÔ´´úÂë°²×°»¹ÊǺÜÂé·³¡«
wget http://www.boutell.com/gd/http/gd-2.0.11.tar.gz
tar zxvf gd-2.0.11 ......