利用cacti提供的api接口可以进行添加查询监控这些api脚本放在cacti的cli目录下面:/web/cacti02/cli编写脚本循环调用下面这些api脚本,就可以达到批量添加的效果,省去大量的人力和时间add_data_query.phpadd_device.phpadd_graphs.php
add_graph_template.phpadd_perms.phpadd..
分类:
其他好文 时间:
2014-05-27 03:52:37
阅读次数:
286
出题:数值的整数次方(不考虑溢出),实现函数double Power(double base,
int
exponent);分析:解法1:最简单的方法是使用直接的乘法运算,但是注意处理几种特殊情况:exponent为负数,base为0;解法2:将exponent分解成2的不同次方相加的表达式,通过重...
分类:
其他好文 时间:
2014-05-27 00:36:27
阅读次数:
291
在把一个大表从 MySQL 迁移到 Redis
时,你可能会发现,每次提取、转换、导入一条数据是让人难以忍受的慢!这里有一个技巧,你可以通过使用管道把 MySQL 的输出直接输入到
redis-cli输入端,这可以使两个数据库都能以他们的最顶级速度来运行。使用了这个技术,我把 800 万条 MySQ...
分类:
数据库 时间:
2014-05-26 22:16:44
阅读次数:
496
Problem Description
Teacher HU and his 40 students were trapped by the brigands. To show their power, the head of the brigands want to select one people to kill.
Teacher HU and his 40 students wil...
分类:
其他好文 时间:
2014-05-25 10:02:35
阅读次数:
309
1 Command类中的rebalnace方法
在上篇文章中讲解了,创建Ring已经为Ring添加设备,在添加设备后需要对Ring进行平衡,平衡
swift-ring-builder object.builder rebalance
首先会调用swift/cli/ringbuilder.py中方法,在main方法中首先会判读/etc/swift文件夹下是否有object.builder文...
分类:
其他好文 时间:
2014-05-25 00:41:43
阅读次数:
359
linux centos 下代理http、https、ftp全局使用代理:export
http_proxy=http://host:port/export https_proxy=http://host:port/export
ftp_proxy=http://host:port/使用wget按需...
分类:
系统相关 时间:
2014-05-24 07:53:34
阅读次数:
420
神水。求n=log(k p)->
k=pow(p,1/n)。G++和C++输出不同,编译器原因。代码: 1 #include 2 #include 3 #include 4 #include 5
#include 6 7 using namespace std; 8 9 int main()10.....
分类:
其他好文 时间:
2014-05-23 23:31:42
阅读次数:
237
1.安装npm2.安装CLI ( npm install -g grunt-cli)3.安装grunt
(npm install grunt --save-dev)4.添加gruntfile.jsmodule.exports = function (grunt)
{ grunt.initConfi....
分类:
其他好文 时间:
2014-05-23 11:22:46
阅读次数:
281
1 创建Ring 代码详细分析
在OpenStack_Swift——Ring组织架构中我们详细分析了Ring的具体工作过程,下面就Ring中增加设备,删除设备,已经重新平衡的实现过程作详细的介绍。
首先看RingBuilder类 def __init__(self, part_power, replicas, min_part_hours):
#why 最大 2**32
...
分类:
其他好文 时间:
2014-05-23 01:50:35
阅读次数:
406
目的
使用 CLI MiniCluster, 用户可以简单地只用一个命令就启动或关闭一个单一节点的Hadoop集群,不需要设置任何环境变量或管理配置文件。 CLI MiniCluster 同时启动一个 YARN/MapReduce 和 HDFS 集群。
这对那些想要快速体验一个真实的Hadoop集群或是测试依赖明显的Hadoop函数的非Java程序 的用户很有用。
Hadoop Ta...
分类:
其他好文 时间:
2014-05-18 18:41:39
阅读次数:
319