学习整理
2013-12-29 10:23
375 查看
一、GIT 学习与整理
1、 git log –stat 可以看到每次提交都修改了哪些文件
有时候查看的时候需要显示全路径 git log –stat-name-width=100
2、 git show 06b91520bc66715415315165b892d187c066659f filename 可以看到每次具体做了哪些修改
3、 merge操作一般从本地分枝merge到master分枝之后 再提交到远端master
如
git checkout master //先切回master分析
git merge 1.4.5 //再从1.4.5 merge到master分枝
4、在同一台机器可以直接pull对方的代码如 git pull /home/user/code master
二、关于 tcp_timestamps和tcp_tw_recycle 导致TCP连接有问题
RFC1323中有如下一段描述:
An additional mechanism could be added tothe TCP,aper-host cache of the last timestamp received from any connection.Thisvalue could thenbe used inthe PAWS mechanism toreject old duplicate segments from earlier incarnations of the connection,ifthe timestamp clock can be guaranteed tohave ticked at least once since the old connection was open.Thiswould require that the TIME-WAIT delay plus the RTT together must be at least one tick of the sender’stimestamp clock.Such an extension isnotpart of the proposal of thisRFC.大概意思是说TCP有一种行为,可以缓存每个连接最新的时间戳,后续请求中如果时间戳小于缓存的时间戳,即视为无效,相应的数据包会被丢弃。
Linux是否启用这种行为取决于tcp_timestamps和tcp_tw_recycle,因为tcp_timestamps缺省就是开启的,所以当tcp_tw_recycle被开启后,实际上这种行为就被激活了。
现在很多公司都用LVS做负载均衡,通常是前面一台LVS,后面多台后端服务器,以NAT方式构建,当请求到达LVS后,它修改地址数据后便转发给后端服务器,但不会修改时间戳数据,对于后端服务器来说,请求的源地址就是LVS的地址,加上端口会复用,所以从后端服务器的角度看,原本不同客户端的请求经过LVS的转发,就可能会被认为是同一个连接,加之不同客户端的时间可能不一致,所以就会出现时间戳错乱的现象,于是后面的数据包就被丢弃了,具体的表现通常是是客户端明明发送的SYN,但服务端就是不响应ACK,还可以通过下面命令来确认数据包不断被丢弃的现象:
shell> netstat -s | grep timestamp
... packets rejects in established connections because of timestamp
1、 git log –stat 可以看到每次提交都修改了哪些文件
有时候查看的时候需要显示全路径 git log –stat-name-width=100
2、 git show 06b91520bc66715415315165b892d187c066659f filename 可以看到每次具体做了哪些修改
3、 merge操作一般从本地分枝merge到master分枝之后 再提交到远端master
如
git checkout master //先切回master分析
git merge 1.4.5 //再从1.4.5 merge到master分枝
12 | git checkout master//先切回master分析git merge1.4.5//再从1.4.5 merge到master分枝 |
二、关于 tcp_timestamps和tcp_tw_recycle 导致TCP连接有问题
RFC1323中有如下一段描述:
An additional mechanism could be added tothe TCP,aper-host cache of the last timestamp received from any connection.Thisvalue could thenbe used inthe PAWS mechanism toreject old duplicate segments from earlier incarnations of the connection,ifthe timestamp clock can be guaranteed tohave ticked at least once since the old connection was open.Thiswould require that the TIME-WAIT delay plus the RTT together must be at least one tick of the sender’stimestamp clock.Such an extension isnotpart of the proposal of thisRFC.大概意思是说TCP有一种行为,可以缓存每个连接最新的时间戳,后续请求中如果时间戳小于缓存的时间戳,即视为无效,相应的数据包会被丢弃。
Linux是否启用这种行为取决于tcp_timestamps和tcp_tw_recycle,因为tcp_timestamps缺省就是开启的,所以当tcp_tw_recycle被开启后,实际上这种行为就被激活了。
现在很多公司都用LVS做负载均衡,通常是前面一台LVS,后面多台后端服务器,以NAT方式构建,当请求到达LVS后,它修改地址数据后便转发给后端服务器,但不会修改时间戳数据,对于后端服务器来说,请求的源地址就是LVS的地址,加上端口会复用,所以从后端服务器的角度看,原本不同客户端的请求经过LVS的转发,就可能会被认为是同一个连接,加之不同客户端的时间可能不一致,所以就会出现时间戳错乱的现象,于是后面的数据包就被丢弃了,具体的表现通常是是客户端明明发送的SYN,但服务端就是不响应ACK,还可以通过下面命令来确认数据包不断被丢弃的现象:
shell> netstat -s | grep timestamp
... packets rejects in established connections because of timestamp
12 | shell>netstat-s|grep timestamp...packets rejects inestablished connections because of timestamp |
相关文章推荐
- jquery学习整理2 管理jQuery包装集
- c语言学习零碎整理(7):数组名是指针吗?(补)
- DNN学习资源整理
- C#类型转换(转载&摘抄&整理:供自己查阅学习)
- iOS 学习资料整理
- Deep Learning(深度学习)学习笔记整理系列之(八)
- Windows Phone 7.5 (Mango) 开发学习资源整理
- HttpClient学习整理
- 整理OD学习之深入理解消息循环
- Java学习资源整理
- HttpClient学习整理
- JVM内存结构学习整理
- Shell Script 学习整理
- 学习案例(老师笔记整理)
- HttpClient 学习整理
- 学习网站整理
- 优雅编程之Trove集合工具类的7点整理学习分享(四十)
- 韩顺平_轻松搞定网页设计(html+css+javascript)_第27讲_js一维数组_一维数组细节_学习笔记_源代码图解_PPT文档整理
- MySQL语法大全_自己整理的学习笔记
- 整理了下电脑,发现好多以前学习的东东,现在要Delete掉。555555~~