手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表分类:Linux

更新:composer 源

之前有发过一篇博客:几个常见的 Composer 国内镜像 ,经过长期的测试,发现这些源不是少内容就是速度慢,这不再推荐一个新的,用了它之后,我就腰不酸腿不疼了:http://packagist.phpcomposer.com 【其实这个就是原来的:http://pkg.phpcomposer.com/repo/packagist/,只是换个名字,但这个好象确实快了一点】

具体的操作方法查看上文的博客内容。

 

备份:不使用ssh_config实现git指定私钥

这是一个备份,起因是由于我现在使用的gogs不能使用ssh的方式连接,主要是不方便,所以目前我是使用了HTTP的方式。

看了这篇文章后对我有启发,但是我没有使用,所以只是先做个备份。原文在:http://www.luxingmin.com/archives/278.html
XML/HTML代码
  1. 一直想实现指定git访问的私钥,网上资料给出来的都是通过ssh_config来实现,这种方法很繁琐,另外想实现git webhook部署时,使用这种方法也比较不灵活。  
  2.   
  3. 切入正题  
  4.   
  5. 建立git_ssh文件,内容如下  
  6.   
  7. #!/bin/bash  
  8. ssh -i $SSH_KEY_FILE $1 $2  
  9. 然后增加执行权限  
  10.   
  11. chmod 755 git_ssh  
  12. 然后就可以通过如下命令指定git访问时使用的ssh私钥  
  13.   
  14. SSH_KEY_FILE=/root/git/id_rsa GIT_SSH=/root/git/git_ssh git clone git@xxx  
---EOF---
 
 

Tags: ssh, git, gogs

转:Vagrant下共享目录静态文件(js/jpg/png等)“缓存”问题

转一篇Vargrant的相关文章【Vagrant下共享目录静态文件(js/jpg/png等)“缓存”问题】,原文来自:http://blog.smdcn.net/article/1325.html,主要是问题在于使用了sendfile可能会导致部会内容不会刷新。

原文如下:

XML/HTML代码
  1. 之前提到说通过Vagrant部署开发环境,使用目录共享模式,在本地磁盘进行开发,而通过虚拟机环境运行开发的页面。  
  2.   
  3. 是的,一切看起来都是那么的顺利,首先基于VirtualBox安装了Vagrant,接下来,按照以往部署环境的习惯,在VM中安装了nginx作为开发运行环境,并且将本地的共享目录作为nginx的web目录,然后打开页面,看上去似乎都很正常,但接下来,你发现了一个神奇的事情,你修改替换了一个css,一张图片,然后刷新浏览器,发现什么都没有变,然后你有非常猛烈、使劲的F5,依旧还是没有改变,是的,你看看编辑器,似乎替换是正常的,在看看VM上的文件,也都是对的,是的,尝试重启nginx,依旧没有任何变化,你开始怀疑php5-fpm甚至于毫不相干的memcached和mysql,但都无济于事。也不知道是什么让这些文件被“缓存”了呢。  
  4.   
  5. 当你尝试修改一个js,并且用同样的方法更新之后,会遇到类似的问题,是的,就算重启VM上任何服务,甚至重启VM,依旧没有用,当然,比起其他资源文件,浏览器的反应会强烈一些,因为浏览器会提示未知错误,而你通过浏览器查看你修改的JS文件,会看到文件尾巴有下面奇怪的随机字符:  
  6.   
  7. �����������������  
  8.   
  9. 这到底是什么东西呢?编码错误?缓存异常?又或是其他什么?  
  10.   
  11. 是的,你尝试花费很多时间,试验各种各样的方法去解决这个问题,其实对于nginx来说,你只需要修改配置文件(nginx.conf)中的一行重启就能简单的解决这个问题:  
  12.   
  13. sendfile off;  
  14. 找到 nginx.conf ,把里面的 “sendfile on” 修改为 “sendfile off”。  
  15.   
  16. 当然,如果你使用Apache也可能遇到类似的问题,那么同样也有类似的配置需要修改:  
  17.   
  18. EnableSendfile off  
  19. 关于这个问题的参照:  
  20. https://github.com/mitchellh/vagrant/issues/351#issuecomment-1339640  
  21.   
  22. http://stackoverflow.com/questions/9479117/vagrant-virtualbox-apache2-strange-cache-behaviour  

----转载完毕---

关于这个sendfile,还有人做了个测试:记vagrant nginx sendfile问题,然后居然没有人评论。。。

XML/HTML代码
  1. 从今年开始,一直在vagrant虚拟机上做开发  
  2.   
  3. 因前段时间一个项目需要调试静态文件,出现静态文件修改后,浏览器刷新不生效。  
  4.   
  5. 最后追踪到是nginx开启了sendfile这一项。。  
  6.   
  7. 具体sendfile原理可以查下,,网上写的都很详细,这里就不复述了。  
  8.   
  9. 一开始一直认为是nginx某个地方配置有问题。。但后来干脆自己写下,做下测试  
  10.   
  11. 具体代码如下(tcp那几步连接这里就不写了。网上很多):  
  12.   
  13.   
  14. /**  
  15.  * @connect tcp 连接句柄  
  16.  */  
  17. int sendClient(int connect)  
  18. {  
  19.     int fd;  
  20.     struct stat fileStat;  
  21.     off_t offset = 0;  
  22.     fd = open("/data/web/test.com/index.html", O_RDONLY|O_NONBLOCK);  
  23.     if (fd < 0) {  
  24.         perror("open file.");  
  25.         return 0;  
  26.     }  
  27.     //获取文件信息  
  28.     fstat(fd, &fileStat);  
  29.     char buffer[fileStat.st_size];  
  30.     // read(fd, buffer, fileStat.st_size);  
  31.     //write(connect, buffer, fileStat.st_size);  
  32.     sendfile(connect, fd, &offset, fileStat.st_size);  
  33.     close(fd);  
  34.     return 1;  
  35. }  
  36.   
  37. 至些我测了下,得到的还是不生效,由此可以断定,与nginx无关,与系统调度有关  
  38.   
  39. 至于问题,我现在的回答只能是vagrant的一个坑,具体是什么,我也无从得知,  
  40.   
  41. 当然, 这个我也是从表象猜测, 如果有人知道真正的原因, 还请不吝留言指教  

 

 

Tags: vagrant

Linux Network Statistics Tools / Commands

不想多说啥,直接上原文地址:http://www.cyberciti.biz/faq/network-statistics-tools-rhel-centos-debian-linux/

以下内容有部分经过我的重新排版,但由于fck编辑器中有些内容会自动被code处理,所以,如果太乱,我也不想改了
 
1.
nstat command : Network Statistics Tool
  1. Type the following command:  
  2. # nstat  
  3.   
  4. Sample outputs:  
  5.   
  6. #kernel  
  7. IpInReceives                    133243             0.0  
  8. IpInDelivers                    133243             0.0  
  9. IpOutRequests                   92904              0.0  
  10. IcmpOutErrors                   97                 0.0  
  11. IcmpOutTimeExcds                97                 0.0  
  12. IcmpMsgOutType3                 97                 0.0  
  13. TcpActiveOpens                  538                0.0  
  14. TcpEstabResets                  56                 0.0  
  15. TcpInSegs                       129837             0.0  
  16. TcpOutSegs                      89720              0.0  
  17. TcpRetransSegs                  42                 0.0  
  18. TcpOutRsts                      704                0.0  
  19. UdpInDatagrams                  3255               0.0  
  20. UdpNoPorts                      97                 0.0  
  21. UdpOutDatagrams                 3270               0.0  
  22. Ip6OutNoRoutes                  206                0.0  
  23. TcpExtTW                        141                0.0  
  24. TcpExtDelayedACKs               508                0.0  
  25. TcpExtDelayedACKLocked          1                  0.0  
  26. TcpExtDelayedACKLost            42                 0.0  
  27. TcpExtTCPHPHits                 117659             0.0  
  28. TcpExtTCPPureAcks               2158               0.0  
  29. TcpExtTCPHPAcks                 605                0.0  
  30. TcpExtTCPSackRecovery           1                  0.0  
  31. TcpExtTCPLossUndo               16                 0.0  
  32. TcpExtTCPSackFailures           4                  0.0  
  33. TcpExtTCPFastRetrans            1                  0.0  
  34. TcpExtTCPSlowStartRetrans       3                  0.0  
  35. TcpExtTCPTimeouts               33                 0.0  
  36. TcpExtTCPDSACKOldSent           40                 0.0  
  37. TcpExtTCPDSACKRecv              5                  0.0  
  38. TcpExtTCPAbortOnData            120                0.0  
  39. TcpExtTCPAbortOnClose           55                 0.0  
  40. TcpExtTCPSackShiftFallback      9                  0.0  
  41. IpExtInOctets                   180131682          0.0  
  42. IpExtOutOctets                  7289106            0.0  
2.
ss command : Utility To Investigate Sockets
  1. To see summary of stats, enter:  
  2. # ss -s  
  3.   
  4. Sample outputs:  
  5.   
  6. Total: 786 (kernel 804)  
  7. TCP:   65 (estab 40, closed 7, orphaned 0, synrecv 0, timewait 6/0), ports 56  
  8. Transport Total     IP        IPv6  
  9. *     804       -         -  
  10. RAW   1         1         0  
  11. UDP   12        9         3  
  12. TCP   58        52        6  
  13. INET      71        62        9  
  14. FRAG      0         0         0  
See ss command tutorial for more information.
3.
netstat command : The Old Good Utility To Show Sockets
  1. To see a table of all network interfaces and its summary, enter:  
  2. # netstat -i  
  3.   
  4. Sample outputs:  
  5.   
  6. Kernel Interface table  
  7. Iface   MTU Met   RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg  
  8. eth0       1500 0    941022      0      0 0        688165      0      0      0 BMRU  
  9. lo        16436 0      9304      0      0 0          9304      0      0      0 LRU  
  10. ppp0       1496 0      3784      0      0 0          4177      0      0      0 MOPRU  
more...
XML/HTML代码
  1. To see summary statistics for each protocol, enter:  
  2. # netstat -s  
  3.   
  4. Sample outputs:  
  5.   
  6. Ip:  
  7.     1092065 total packets received  
  8.     0 forwarded  
  9.     0 incoming packets discarded  
  10.     1091681 incoming packets delivered  
  11.     798913 requests sent out  
  12.     895 dropped because of missing route  
  13.     759 reassemblies required  
  14.     375 packets reassembled ok  
  15. Icmp:  
  16.     17 ICMP messages received  
  17.     0 input ICMP message failed.  
  18.     ICMP input histogram:  
  19.         timeout in transit: 8  
  20.         echo replies: 9  
  21.     1747 ICMP messages sent  
  22.     0 ICMP messages failed  
  23.     ICMP output histogram:  
  24.         destination unreachable: 1730  
  25.         echo request: 17  
  26. IcmpMsg:  
  27.         InType0: 9  
  28.         InType11: 8  
  29.         OutType3: 1730  
  30.         OutType8: 17  
  31. Tcp:  
  32.     4822 active connections openings  
  33.     1129 passive connection openings  
  34.     457 failed connection attempts  
  35.     165 connection resets received  
  36.     7 connections established  
  37.     1062519 segments received  
  38.     771394 segments send out  
  39.     7158 segments retransmited  
  40.     6 bad segments received.  
  41.     2578 resets sent  
  42. Udp:  
  43.     20846 packets received  
  44.     1730 packets to unknown port received.  
  45.     0 packet receive errors  
  46.     19242 packets sent  
  47. UdpLite:  
  48. TcpExt:  
  49.     71 invalid SYN cookies received  
  50.     8 resets received for embryonic SYN_RECV sockets  
  51.     142 packets pruned from receive queue because of socket buffer overrun  
  52.     2109 TCP sockets finished time wait in fast timer  
  53.     84 packets rejects in established connections because of timestamp  
  54.     19454 delayed acks sent  
  55.     6 delayed acks further delayed because of locked socket  
  56.     Quick ack mode was activated 7306 times  
  57.     1 packets directly queued to recvmsg prequeue.  
  58.     1 bytes directly received in process context from prequeue  
  59.     823921 packet headers predicted  
  60.     24412 acknowledgments not containing data payload received  
  61.     10150 predicted acknowledgments  
  62.     242 times recovered from packet loss by selective acknowledgements  
  63.     33 congestion windows recovered without slow start by DSACK  
  64.     335 congestion windows recovered without slow start after partial ack  
  65.     336 TCP data loss events  
  66.     TCPLostRetransmit: 35  
  67.     1 timeouts after reno fast retransmit  
  68.     156 timeouts after SACK recovery  
  69.     116 timeouts in loss state  
  70.     461 fast retransmits  
  71.     5 forward retransmits  
  72.     608 retransmits in slow start  
  73.     2073 other TCP timeouts  
  74.     62 SACK retransmits failed  
  75.     43074 packets collapsed in receive queue due to low socket buffer  
  76.     8499 DSACKs sent for old packets  
  77.     101 DSACKs sent for out of order packets  
  78.     308 DSACKs received  
  79.     9 DSACKs for out of order packets received  
  80.     427 connections reset due to unexpected data  
  81.     122 connections reset due to early user close  
  82.     28 connections aborted due to timeout  
  83.     TCPDSACKIgnoredOld: 3  
  84.     TCPDSACKIgnoredNoUndo: 60  
  85.     TCPSpuriousRTOs: 4  
  86.     TCPSackShifted: 282  
  87.     TCPSackMerged: 740  
  88.     TCPSackShiftFallback: 1017  
  89. IpExt:  
  90.     InMcastPkts: 47  
  91.     OutMcastPkts: 51  
  92.     InBcastPkts: 1  
  93.     InOctets: 1341508973  
  94.     OutOctets: 72525352  
  95.     InMcastOctets: 8649  
  96.     OutMcastOctets: 7519  
  97.     InBcastOctets: 328  
See netstat command tutorial for more information.
4.
ip / ifconfig command : Configure or Show a Network Interface Info
  1. Type the following command:  
  2. # ifconfig  
  3.   
  4. OR  
  5. # /sbin/ifconfig  
  6.   
  7. OR  
  8. # ifconfig eth0  
  9.   
  10. eth0      Link encap:Ethernet  HWaddr b8:ac:6f:65:31:e5  
  11.           inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0  
  12.           inet6 addr: fe80::baac:6fff:fe65:31e5/64 Scope:Link  
  13.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1  
  14.           RX packets:966334 errors:0 dropped:0 overruns:0 frame:0  
  15.           TX packets:703297 errors:0 dropped:0 overruns:0 carrier:0  
  16.           collisions:0 txqueuelen:1000  
  17.           RX bytes:1186255648 (1.1 GiB)  TX bytes:73968238 (70.5 MiB)  
  18.           Interrupt:17  
  19. lo        Link encap:Local Loopback  
  20.           inet addr:127.0.0.1  Mask:255.0.0.0  
  21.           inet6 addr: ::1/128 Scope:Host  
  22.           UP LOOPBACK RUNNING  MTU:16436  Metric:1  
  23.           RX packets:9666 errors:0 dropped:0 overruns:0 frame:0  
  24.           TX packets:9666 errors:0 dropped:0 overruns:0 carrier:0  
  25.           collisions:0 txqueuelen:0  
  26.           RX bytes:1399578 (1.3 MiB)  TX bytes:1399578 (1.3 MiB)  
  27. ppp0      Link encap:Point-to-Point Protocol  
  28.           inet addr:10.1.11.70  P-t-P:10.0.31.18  Mask:255.255.255.255  
  29.           UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1496  Metric:1  
  30.           RX packets:3784 errors:0 dropped:0 overruns:0 frame:0  
  31.           TX packets:4177 errors:0 dropped:0 overruns:0 carrier:0  
  32.           collisions:0 txqueuelen:3  
  33.           RX bytes:2400265 (2.2 MiB)  TX bytes:275983 (269.5 KiB)  
  34. To display network interface statistics, enter:  
  35. # ip -s link  
  36.   
  37. Sample outputs:  
  38.   
  39. 1: lo:  mtu 16436 qdisc noqueue state UNKNOWN  
  40.     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00  
  41.     RX: bytes  packets  errors  dropped overrun mcast  
  42.     1444187    9960     0       0       0       0  
  43.     TX: bytes  packets  errors  dropped carrier collsns  
  44.     1444187    9960     0       0       0       0  
  45. 2: eth0:  mtu 1500 qdisc mq state UP qlen 1000  
  46.     link/ether b8:ac:6f:65:31:e5 brd ff:ff:ff:ff:ff:ff  
  47.     RX: bytes  packets  errors  dropped overrun mcast  
  48.     1221956483 991501   0       0       0       24  
  49.     TX: bytes  packets  errors  dropped carrier collsns  
  50.     75623937   720272   0       0       0       0  
  51. 3: wlan0:  mtu 1500 qdisc noop state DOWN qlen 1000  
  52.     link/ether 00:21:6a:ca:9b:10 brd ff:ff:ff:ff:ff:ff  
  53.     RX: bytes  packets  errors  dropped overrun mcast  
  54.     0          0        0       0       0       0  
  55.     TX: bytes  packets  errors  dropped carrier collsns  
  56.     0          0        0       0       0       0  
  57. 4: pan0:  mtu 1500 qdisc noop state DOWN  
  58.     link/ether 4a:c7:5f:0e:8e:d8 brd ff:ff:ff:ff:ff:ff  
  59.     RX: bytes  packets  errors  dropped overrun mcast  
  60.     0          0        0       0       0       0  
  61.     TX: bytes  packets  errors  dropped carrier collsns  
  62.     0          0        0       0       0       0  
  63. 8: ppp0:  mtu 1496 qdisc pfifo_fast state UNKNOWN qlen 3  
  64.     link/ppp  
  65.     RX: bytes  packets  errors  dropped overrun mcast  
  66.     2419881    3848     0       0       0       0  
  67.     TX: bytes  packets  errors  dropped carrier collsns  
  68.     284151     4287     0       0       0       0  
5.
sar command: Display Network Stats
  1. Type the following command (you need to install and enable sar via sysstat package):  
  2. sar -n DEV  
  3.   
  4. Linux 2.6.32-220.2.1.el6.x86_64 (www.cyberciti.biz)    Tuesday 13 March 2012   _x86_64_        (2 CPU)  
  5. 12:00:01  CDT     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s  
  6. 12:10:01  CDT        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  7. 12:10:01  CDT      eth0    127.13    121.32     95.45     18.34      0.00      0.00      0.00  
  8. 12:10:01  CDT      eth1     98.48    110.62     16.72     96.33      0.00      0.00      0.00  
  9. 12:20:01  CDT        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  10. 12:20:01  CDT      eth0    139.95    133.41    106.30     19.95      0.00      0.00      0.00  
  11. 12:20:01  CDT      eth1    110.65    121.85     18.14    107.13      0.00      0.00      0.00  
  12. 12:30:01  CDT        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  13. 12:30:01  CDT      eth0    147.85    132.49    115.78     20.45      0.00      0.00      0.00  
  14. 12:30:01  CDT      eth1    111.88    127.39     18.61    117.65      0.00      0.00      0.00  
  15. 12:40:01  CDT        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  16. 12:40:01  CDT      eth0    136.75    124.64    105.24     19.48      0.00      0.00      0.00  
  17. 12:40:01  CDT      eth1    101.65    115.32     17.58    104.50      0.00      0.00      0.00  
  18. 12:50:01  CDT        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  19. 12:50:01  CDT      eth0    131.45    125.69     96.49     19.58      0.00      0.00      0.00  
  20. 12:50:01  CDT      eth1    101.41    111.31     17.54     96.78      0.00      0.00      0.00  
  21. 01:00:01  CDT        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  22. 01:00:01  CDT      eth0    140.30    133.27    102.17     20.75      0.00      0.00      0.00  
  23. 01:00:01  CDT      eth1    106.90    119.51     18.53    103.09      0.00      0.00      0.00  
  24. 01:10:01  CDT        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  25. 01:10:01  CDT      eth0    152.03    127.74    125.56     19.85      0.00      0.00      0.00  
  26. 01:10:01  CDT      eth1    115.60    134.57     18.73    126.96      0.00      0.00      0.00  
  27. 01:20:01  CDT        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  28. 01:20:01  CDT      eth0    138.55    130.55    103.03     20.20      0.00      0.00      0.00  
  29. ....  
  30. ..  
  31. ....  
  32. ..  
  33. .  
  34. 01:00:01  CDT      eth1    156.82    169.48     28.83    138.49      0.00      0.00      0.00  
  35. 01:10:01  CDT        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  36. 01:10:01  CDT      eth0    215.19    194.82    163.11     30.99      0.00      0.00      0.00  
  37. 01:10:01  CDT      eth1    162.49    183.79     28.36    163.70      0.00      0.00      0.00  
  38. 01:20:01  CDT        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  39. 01:20:01  CDT      eth0    200.20    192.23    140.64     30.93      0.00      0.00      0.00  
  40. 01:20:01  CDT      eth1    153.60    166.96     27.32    140.26      0.00      0.00      0.00  
  41. 01:30:01  CDT        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  42. 01:30:01  CDT      eth0    111.98    103.58     79.12     16.52      0.00      0.00      0.48  
  43. 01:30:01  CDT      eth1     87.50     95.58     14.74     79.35      0.00      0.00      0.00  
  44. Average:        IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s  
  45. Average:           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  46. Average:         eth0    211.21    196.20    156.18     31.20      0.00      0.00      0.01  
  47. Average:         eth1    159.10    174.52     28.00    149.95      0.00      0.00      0.00  
  48. Or type the following command:  
  49. # sar -n DEV 1 3  
  50.   
  51. Sample outputs:  
  52.   
  53. Linux 2.6.32-220.2.1.el6.x86_64 (www.cyberciti.biz)    Tuesday 13 March 2012   _x86_64_        (2 CPU)  
  54. 01:44:03  CDT     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s  
  55. 01:44:04  CDT        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  56. 01:44:04  CDT      eth0    161.70    154.26    105.20     26.63      0.00      0.00      0.00  
  57. 01:44:04  CDT      eth1    145.74    142.55     25.11    144.94      0.00      0.00      0.00  
  58. 01:44:04  CDT     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s  
  59. 01:44:05  CDT        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  60. 01:44:05  CDT      eth0    162.14    156.31    107.46     42.18      0.00      0.00      0.00  
  61. 01:44:05  CDT      eth1    135.92    138.83     39.38    104.92      0.00      0.00      0.00  
  62. 01:44:05  CDT     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s  
  63. 01:44:06  CDT        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  64. 01:44:06  CDT      eth0    303.92    293.14    272.91     37.40      0.00      0.00      0.00  
  65. 01:44:06  CDT      eth1    252.94    290.20     34.87    263.50      0.00      0.00      0.00  
  66. Average:        IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s  
  67. Average:           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00  
  68. Average:         eth0    210.37    202.34    163.19     35.66      0.00      0.00      0.00  
  69. Average:         eth1    178.93    191.64     33.36    171.60      0.00      0.00      0.00  
-----
最后再附送两个
1、netstat -s TCP连接失败 相关统计 解释 (http://blog.sina.com.cn/s/blog_781b0c850101pu2q.html
XML/HTML代码
  1. 针对问题:TCP连接失败  
  2. 分析:netstat -s输出中和连接失败相关的参数  
  3. 202270382 invalid SYN cookies received --- 三次握手ack包,syncookies校验没通过;  
  4. 13700572 resets received for embryonic SYN_RECV sockets  ---syn_recv状态下,收到非重传的syn包,则返回reset  
  5. 1123035 passive connections rejected because of time stamp ---开启sysctl_tw_recycle,syn包相应连接的时间戳 小于 路由中保存的时间戳;  
  6. 14886782 failed connection attempts --- syn_recv状态下,socket被关闭; 或者  收到syn包(非重传)  
  7. 438798 times the listen queue of a socket overflowed  ---收到三次握手ack包,accept队列满  
  8. 438798 SYNs to LISTEN sockets ignored ---收到三次握手ack包,因各种原因(包括accept队列满) 创建socket失败  
2、Linux 2.6 - man page for nstat (linux section 8) (http://www.unix.com/man-page/linux/8/nstat/)
3、老王的监控Netstat数据 (http://huoding.com/2015/04/09/427)
 
 
 
 

关于CodeAnyWhere

最近收到一封邮件,大意是,phpanywhere已经改名为codeanywhere了,我看了一下邮件中提及的博客日期,发现贴子地址是:http://www.neatstudio.com/show-1305-1.shtml ,已经是N年前的事情了。

邮件中提及:As you may have heard we have changed our name to Codeanywhere a couple of years back and now we have an issue. Namely we lost the domain phpanywhere.net and know all your link lead to nowhere.

为了以防万一,我查了一下百科:

 https://en.wikipedia.org/wiki/Codeanywhere
  1. History[edit]  
  2. In 2009 PHPanywhere (the predecessor of Codeanywhere) was launched, which was a web-based FTP client and text editor, designed for PHP.[4] That project stayed idle until May 22, 2013 when the founders launched Codeanywhere.  
  3.   
  4. Codeanywhere raised $600,000 from World Wide Web Hosting on July 15, 2013 when Ben Welch-Bolen became a board member.[5] In August of 2014 Codeanywhere was accepted in Techstars’s Fall Boston Class.[6] In 2014, as part of the TechCrunch Disrupt NY Conference, the audience voted Codeanywhere the best company in Startup Alley.[1]  

so,phpanywhere确实是codeanywhere的前身。。。于是顺手改掉了那篇博客,顺便说一下,codeanywhere很早就在ipad上面有APP了,而且我还用过,只是居然真的不知道它就是phpanywhere....