数组states[$NF],格式输出printf,注意循环结构范围{}nginx日志格式分状态码查看流量awk‘{StatesCode[$9]+=$10}END{printf("StateCode------SIZE(bytes)\n");for(iinStatesCode)printf("%8s%18s\n",i,StatesCode[i])}‘access.log
分类:
其他好文 时间:
2014-09-26 20:37:59
阅读次数:
127
saltstack和PuppetChef一样可以让你同时在多台服务器上执行命令也包括安装和配置软件。Salt有两个主要的功能:配置管理和远程执行。Salt是:一个配置管理系统,能够维护预定义状态的远程节点(比如,确保指定的报被安装,指定的服务在运行)一个分布式远程执行系统,用来在远程节..
分类:
其他好文 时间:
2014-09-26 19:31:09
阅读次数:
219
1297. PalindromeTime Limit: 1.0 secondMemory Limit: 16 MBThe “U.S. Robots” HQ has just received a rather alarming anonymous letter. It states that the...
分类:
其他好文 时间:
2014-09-25 21:19:47
阅读次数:
157
决定看salt的源码了.干脆就从最基本的看起来,先看它的启动过程开始第一步用/etc/init.d/salt-master start 启动找到那个文件,发现有3种启动方式,suse,debian,centos的启动方式各不一样,我测试机和线上环境都是centos的,所以直接就看Centos的......
分类:
其他好文 时间:
2014-09-24 03:13:05
阅读次数:
256
我用的是salt版本2014.1.4,系统版本是Centos 6.2 X64 最小化安装的各自安装salt,开始学习Centos 6.x:rpm -ivh http://mirrors.ustc.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpmCent...
分类:
其他好文 时间:
2014-09-24 03:12:25
阅读次数:
364
#目标文件位置/usr/lib/python2.6/site-packages/salt/config.py#这个文件加载配置文件的模块.master和minion的配置文件加载都是在这个模块里面完成的#master的启动在这模块里面只涉及到方法和属性只有几个master和minion的默认配置属性...
分类:
其他好文 时间:
2014-09-24 02:40:45
阅读次数:
304
https://github.com/saltstack/salt/blob/develop/salt/returners/mysql.pyhttp://docs.saltstack.com/en/latest/ref/returners/all/salt.returners.mysql.html#module-salt.returners.mysqlhttp://lixcto.blog.51cto.com/4834175/1430638http://lihuipeng.blog.51cto.com/3064..
分类:
数据库 时间:
2014-09-23 20:52:26
阅读次数:
529
1.下载MySQL-python-1.2.3.tar.gztarzxvfMySQL-python-1.2.3.tar.gzcdMySQL-python-1.2.3python26setup.pyinstall提示错误:Traceback(mostrecentcalllast):File"setup.py",line5,in<module>fromsetuptoolsimportsetup,ExtensionImportError:Nomodulenamedsetuptools解决..
分类:
数据库 时间:
2014-09-23 17:40:05
阅读次数:
249
Saltstack是一个新的基础设施管理工具。目前处于快速发展阶段,可以看做是pssh+弱化的Puppet的组合。间接的反映出了saltstack的两大功能:远程执行和配置管理。Saltstack使用Python开发,是一个非常简单易用和轻量级的管理工具。由Master和Minion构成,通过ZeroMQ进行通信。Sal..
分类:
其他好文 时间:
2014-09-21 20:53:02
阅读次数:
380
A. Practical Byzantine Fault Tolerance
1.What’s its checkpoint?
We will refer to the states produced by the execution of these requests as checkpoints and we will say that a checkpoint with...
分类:
其他好文 时间:
2014-09-21 10:34:30
阅读次数:
283