如下图来看, 虽然172.16.22.29存在一条更精确的路由,但是该精确路由的metric比默认路由的metric更大一些,最终还是选择了默认路由,看来metric的影响力还是很大的
添加路由是指定metric参数吧,如下:
明明指定的metric为9,结果却是19(默认网关的metric+9)
可以通过网络设置来修改接口的跃点数(metric),最小值为10(设置为更小的值也没有用)
DevOps
如下图来看, 虽然172.16.22.29存在一条更精确的路由,但是该精确路由的metric比默认路由的metric更大一些,最终还是选择了默认路由,看来metric的影响力还是很大的
添加路由是指定metric参数吧,如下:
明明指定的metric为9,结果却是19(默认网关的metric+9)
可以通过网络设置来修改接口的跃点数(metric),最小值为10(设置为更小的值也没有用)
4294967295 is just (unsigned long) -1. -1 means that loginuid was not set. This is normal behavior for processes that were not spawned by any login process (e.g. for daemons). loginuid is -1 by default; pam_loginuid module changes it to your user id whenever you login (in a tty/in DM/via ssh), and this value is preserved by child processes.
可惜的是proc.txt并未对此文件有过说明
用途:
http://docs.spring.io/spring-session/docs/current/reference/html5/
http://docs.spring.io/spring/docs/4.2.9.RELEASE/spring-framework-reference/htmlsingle/
https://spring.io/docs/reference
http://www.jianshu.com/p/3942cce05f71
http://www.mkyong.com/tutorials/spring-boot-tutorials/
遇到过的问题:
1 2 3 4 5 |
CONFIG SET appendonly no config set dir /tmp CONFIG SET appendonly yes |
缘起:
借助nc也能搞定
缘起:
dubbo-monitor容器swap使用率超过 20% ,而且在不断上升,为什么呢?
下面是容器dubbo-monitor在drop-caches前后的对比:
1 2 3 4 5 6 7 8 |
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS dubbo_monitor 6.25% 1.4 GiB / 2 GiB 69.99% 0 B / 0 B 6.306 GB / 54.5 GB 0 [root@CX-DOCKER-BASE-1-10.139.105.202 ~]# echo 3 > /proc/sys/vm/drop_caches [root@CX-DOCKER-BASE-1-10.139.105.202 ~]# docker stats dubbo_monitor CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS dubbo_monitor 3.87% 595.7 MiB / 2 GiB 29.09% 0 B / 0 B 6.373 GB / 54.5 GB 0 |
drop-cache后,容器的swap使用率没有变化
结论:
测试数据:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# cat appendonly.6387.aof|head -n 20 *2 $6 SELECT $1 1 *3 $3 SET $47 mission_58c7be1b47ddd5.20005951_start_wait_time $10 1489485343 *3 $3 SET $47 mission_577239de3d58a2.51913045_start_wait_time $10 1467105181 |
测试目标: 把 db 1 中的数据 导入到 db 10 里面去
awk脚本:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
BEGIN{ll="";l="";} { if($0=="SELECT\r"){ ll="SELECT\r"; }else if(ll=="SELECT\r"){ if (l=="") { l=$0; }else { if($0 == "1\r"){ l="$2\r";$0="10\r"; } print ll; print l; print $0; ll="";l=""; } }else { print $0; } } |
测试:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# cat a.aof | awk -f /tmp/a.awk *2 $6 SELECT $2 10 *3 $3 SET $47 mission_58c7be1b47ddd5.20005951_start_wait_time $10 1489485343 *3 $3 SET $47 mission_577239de3d58a2.51913045_start_wait_time $10 1467105181 |
一般情况下,这样做事没问题的,特殊情况下会不好使(加入数据中包含极似协议的内容)
当一个类添加了如下注解的话,装配类的时候,其setter方法(注意,确切说不是属性)就会参考application.properties 文件总对应的配置的,而且,在IDE中添加这种配置时,IDE也会给出提示
syntax: headers = ngx.resp.get_headers(max_headers?, raw?)
context: set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*, body_filter_by_lua*, log_by_lua*, balancer_by_lua*
Returns a Lua table holding all the current response headers for the current request.
1 2 3 4 |
<span class="pl-k">local</span> h <span class="pl-k">=</span> ngx.<span class="pl-smi">resp</span>.<span class="pl-c1">get_headers</span>() <span class="pl-k">for</span> k, v <span class="pl-k">in</span> <span class="pl-c1">pairs</span>(h) <span class="pl-k">do</span> <span class="pl-c1">...</span> <span class="pl-k">end</span> |
This function has the same signature as ngx.req.get_headers except getting response headers instead of request headers.
参考: https://github.com/openresty/lua-nginx-module#ngxrespget_headers
注意: 字段名都会转换成小写
1 2 3 4 5 6 |
expires:Thu, 19 Nov 1981 08:52:00 GMT content-type:text/html; charset=utf-8 connection:keep-alive cache-control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0 pragma:no-cache content-encoding:gzip |