得到每个osd的放置组个数
来源:互联网 发布:淘宝店描述 编辑:程序博客网 时间:2024/05/29 15:16
得到每个osd的放置组个数
Get the Number of Placement Groups Per Osd
ceph pg dump | awk ' /^pg_stat/ { col=1; while($col!="up") {col++}; col++ } /^[0-9a-f]+\.[0-9a-f]+/ { match($0,/^[0-9a-f]+/); pool=substr($0, RSTART, RLENGTH); poollist[pool]=0; up=$col; i=0; RSTART=0; RLENGTH=0; delete osds; while(match(up,/[0-9]+/)>0) { osds[++i]=substr(up,RSTART,RLENGTH); up = substr(up, RSTART+RLENGTH) } for(i in osds) {array[osds[i],pool]++; osdlist[osds[i]];}}END { printf("\n"); printf("pool :\t"); for (i in poollist) printf("%s\t",i); printf("| SUM \n"); for (i in poollist) printf("--------"); printf("----------------\n"); for (i in osdlist) { printf("osd.%i\t", i); sum=0; for (j in poollist) { printf("%i\t", array[i,j]); sum+=array[i,j]; sumpool[j]+=array[i,j] }; printf("| %i\n",sum) } for (i in poollist) printf("--------"); printf("----------------\n"); printf("SUM :\t"); for (i in poollist) printf("%s\t",sumpool[i]); printf("|\n");}'
结果
Copy-paste should work directly. The sum at bottom of the table must match to (pg_num x size).
You can find pg_num recommandations here : http://ceph.com/docs/master/rados/operations/placement-groups/
Also, a pg_num Calculator is avaible here : http://ceph.com/pgcalc
To view the number of pg per osd : http://cephnotes.ksperis.com/blog/2015/02/23/get-the-number-of-placement-groups-per-osd/
参考:
http://cephnotes.ksperis.com/blog/2015/02/23/get-the-number-of-placement-groups-per-osd
0 0
- 得到每个osd的放置组个数
- 用ADO怎样得到表的个数和每个表的名字?
- ceph 获取每个osd上pg的数量
- 每个字符出现的个数
- 得到enum类型的个数
- 得到每个月的最大天数
- 统计字符串中每个英文字母的个数
- 165 查找出每个字符的个数
- 统计字符串中每个字符的个数
- 统计字符串中每个字母的个数
- 统计字符串中每个字母的个数
- 算List 每个元素的个数
- 统计文本中每个单词的个数
- 统计文件中每个字母的个数
- 如何得到工具栏上button的个数
- 得到动态数组中元素的个数
- 得到小于某一个数的所有素数
- 如何得到二进制中1的个数
- ViewDragHelper笔记
- 学习持久层框架中的小记录
- iOS之UIScrollView实现无限滚动,思路与代码
- D3D中SetTransform(D3DTS_VIEW)出现 0xC0000005: 读取位置 0x00000000 时发生访问冲突
- 有关宽字符wchar_t编码方式的问题
- 得到每个osd的放置组个数
- javaScript (一)数据类型
- 再谈二叉树:重建二叉树
- Http Method
- Android LayoutInflater原理分析,带你一步步深入了解View(一)
- 3105: [cqoi2013]新Nim游戏
- C语言中 malloc,calloc 和 realloc 函数之间的区别
- aop.php
- android开发步步为营之103:android分享音频视频图片和文字功能的实现