免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1186 | 回复: 0
打印 上一主题 下一主题

Mysqlreport 提示参数获取错误的探讨 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-21 08:42 |只看该作者 |倒序浏览
在用Mysqlreport进行服务器性能分析的时候,提示如下信息
  1. Use of uninitialized value in multiplication (*) at ./mysqlreport line 829, <STDIN> line 1.
  2. Use of uninitialized value in formline at ./mysqlreport line 1227, <STDIN> line 1.
  3. Use of uninitialized value in formline at ./mysqlreport line 1233, <STDIN> line 1.
  4. Use of uninitialized value in formline at ./mysqlreport line 1235, <STDIN> line 1.
  5. MySQL 5.1.56-community- uptime 19 15:5:26 Tue Jun 14 20:28:45 2011
打开Mysqlreport源码,找到第829行
  1. 826 sub perc # Percentage
  2. 827 {
  3. 828 my($is, $of) = @_;
  4. 829 return sprintf "%.2f", ($is * 100) / ($of ||= 1);
  5. 830 }
可能$is没有赋值,是null。猜测,没有证实。再看1227行:
  1. 1227$stats{'Innodb_buffer_pool_pages_latched'},perc($stats{'Innodb_buffer_pool_pages_latched'},$stats{'Innodb_buffer_pool_pages_total'})
参考手册里是这么说的:
  1. Innodb_buffer_pool_pages_latched

  2. The number of latched pages in InnoDB buffer pool. These are pages currently being read or written or that cannot be flushed or removed for some other reason. Calculation of this variable is expensive, so as of MySQL 5.1.28, it is available only when the UNIV_DEBUG system is defined at server build time.
5.1.28后不默认提供这个参数了。除非编译的时候强制指定。我安装的是5.1.56 rpm 包,plugin innodb,所以没有这个参数。

再看1233,1235行
  1. 1233$stats{'Innodb_buffer_pool_read_ahead_rnd'},t($stats{'Innodb_buffer_pool_read_ahead_rnd'})
  2. 1234 Ahead Sql @>>>>>>>> @>>>>>/s
  3. 1235$stats{'Innodb_buffer_pool_read_ahead_seq'},t($stats{'Innodb_buffer_pool_read_ahead_seq'})
手册里是这么说的:
  1. Innodb_buffer_pool_read_ahead_rnd

  2. The number of “random” read-aheads initiated by InnoDB. This happens when a query scans a large portion of a table but in random order.

  3. For InnoDB Plugin, this variable was removed in MySQL 5.1.41.
5.1.41后,Innodb Plugin下,removed了。所以提示找不到这个参数。

上面的提示信息都是正常的,某些参数MYSQL里没有提供了,但是Mysqlreport进行了检测。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP