Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to get the number of Placement Groups under each OSD

Shulou Source: shulou.com Published: 2022-05-31 12:22:25 10月04日 Update

How to get the number of Placement Groups under each OSD, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can get something.

Ceph pg dump | awk'/ ^ pg_stat/ {col=1; while ($coloring = "up") {col++}; col++} / ^ [0-9a-f] +\. [0-9a-f] + / {match ($0RSTART,RLENGTH / ^ [0-9a-f] + /); pool=substr ($0, RSTART,RLENGTH); poollist [pool] = 0; up=$col; iTun0; RSTART=0; RLENGTH=0; delete osds; while (match (up,/ [0-9] + /) > 0) {ODS [+ + I] = substr (up,RSTART,RLENGTH) Up = substr (up, RSTART+RLENGTH)} for (i in osds) {array [ODS [I], pool] +; END [ODS [I]];}} END {ODS ("\ 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 [iMagazine j]); sum+=array [iForce j]; poollist [j] + = array [iMagazine j]}; printf ("|% I\ n", sum)} for (i in poollist) printf ("-"); printf ("-\ n") Printf ("SUM:\ t"); for (i in poollist) printf ("% s\ t", poollist [I]); printf ("|\ n");}'

Results:

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Tags: Help quantity clarity content for this articles beginners more knowledge results industry information information channels problems needs channels access to one learning support Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Xiaomi Linux Redmi Huawei