Welcome 微信登录

首页 / 操作系统 / Linux / Linux 判断Cacti模板的版本

经常有人在 import从网上download的cacti template时发生”Error: XML: Hashversion does not exist” 错误。 这是因为 export template的cacti和import template的cacti的版本不同引起的。为了保证兼容性,cacti有一个机制会阻止从新版本cacti导出的模板被导回到旧版本的cacti 中。那么如何判断一个模板所使用的cacti版本呢?方法是查看template中的hash后边的字符串的值。举例如下:这 是一个template中的一段 <hash_040018258d1c9487a6c58dd804f4a012007664>
头 两位蓝色的数字是template的类型.
接下来的4位红色数字Cactiversion ,这就是我们要找的东西!!!
接下来的32位数字是系统随机生成.每个cacti版本对应的数 字记录在/var/www/html/cactig/include/global_arrays.php文件中,具体参考下边我摘录的部分:$hash_version_codes = array(
"0.8.4"  => "0000",
"0.8.5"  => "0001",
"0.8.5a" => "0002",
"0.8.6"  => "0003",
"0.8.6a" => "0004",
"0.8.6b" => "0005",
"0.8.6c" => "0006",
"0.8.6d" => "0007",
"0.8.6e" => "0008",
"0.8.6f" => "0009",
"0.8.6g" => "0010",
"0.8.6h" => "0011",
"0.8.6i" => "0012",
"0.8.6j" => "0013",
"0.8.7"  => "0014",
"0.8.7a" => "0015",
"0.8.7b" => "0016",
"0.8.7c" => "0017",
"0.8.7d" => "0018"
); 使用Bootmgr 引导Ubuntu (非wubi安装)Linux LDAP 认证配置相关资讯      Linux教程 
  • Linux教程:如何在命令行中查看目  (07/28/2014 12:22:23)
  • Linux 修改root密码  (11/03/2012 07:53:38)
  • su - root 与su root的区别  (06/06/2012 00:39:40)
  • Linux进程间通信:消息队列  (01/28/2013 09:43:00)
  • U盘安装Linux开机无法启动解决方法  (10/07/2012 08:55:52)
  • Windows 7/Linux 同步时间  (05/15/2012 06:17:55)
本文评论 查看全部评论 (0)
表情: 姓名: 字数