This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import argparse,json,math,re,signal,sys | |
| from subprocess import Popen, PIPE | |
| from StringIO import StringIO | |
| from pprint import pprint | |
| parser = argparse.ArgumentParser(description='Custom script inconsistent PG cleanup') | |
| parser.add_argument("--id",dest="pgid",required=True,help="Provide the PG id for this list-inconstent-obj output.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys | |
| import json | |
| obj=json.load(sys.stdin) | |
| if ( len(sys.argv) > 0 ): | |
| for i in range(1,len(sys.argv)): | |
| levels=sys.argv[i].split('.') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| totalosds=$(ceph osd tree | grep -c osd\\.[0-9][0-9]*.*up) | |
| osdcounter=1 | |
| for i in $(ceph osd tree | awk '/up/ {split($3,a,".");print a[2]}');do | |
| echo -n "Currently at: $osdcounter / $totalosds == " | |
| echo "scale=2; $osdcounter/$totalosds*100" | bc | |
| isup=$(ceph osd dump | grep -c osd\\.$i\ up) | |
| if [ $isup -eq 1 ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys | |
| import math | |
| import json as json | |
| debug=False | |
| obj=json.load(sys.stdin) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys, json, operator | |
| from datetime import datetime | |
| obj=json.load(sys.stdin) | |
| globaltimespent={} | |
| opcount=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/bash | |
| # | |
| # Usage: | |
| # ./list_omap_sizes.sh {poolname} | |
| # | |
| # | |
| if [ -z "$1" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if(isset($_GET['api_key'])) { | |
| $APIKEY=$_GET['api_key']; | |
| } else { | |
| die("No api key"); | |
| } | |
| if(isset($_GET['myhost'])) { | |
| $MYHOST=$_GET['myhost']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ -z "$1" ]; then | |
| echo Please provide OSD path | |
| echo | |
| echo Usage Example: | |
| echo ./$0 /var/lib/ceph/osd/ceph-123 | |
| echo | |
| exit 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ -z "$2" ]; then | |
| echo Please provide OSD data partition and Journal partitions | |
| echo | |
| echo Usage: | |
| echo ./$0 /dev/sde1 /dev/sdb1 | |
| echo | |
| exit 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys,os,datetime | |
| import simplejson as json | |
| from subprocess import Popen, PIPE | |
| from StringIO import StringIO | |
| """NOTE: Please ensure the 'CEPH_ARGS' environment variable is set for any cluster specific options required on radosgw-admin commands""" | |
| cephargs="" |