Skip to content

Instantly share code, notes, and snippets.

View kotreshhr's full-sized avatar

Kotresh HR kotreshhr

View GitHub Profile
@kotreshhr
kotreshhr / gluster_server_graph.txt
Created June 14, 2018 10:33
Sample gluster server side graph
+------------------------------------------------------------------------------+
1: volume master-posix
2: type storage/posix
3: option glusterd-uuid 12b70e5d-bd9b-482b-9395-2f8b81a74d51
4: option directory /bricks/brick0/b0
5: option volume-id 03124352-0ab7-4fe1-befc-5a744dcf5a72
6: end-volume
7:
8: volume master-trash
9: type features/trash
@kotreshhr
kotreshhr / client-graph-gfid-access.txt
Created June 14, 2018 10:08
Sample client graph with gfid-access xlator loaded
+------------------------------------------------------------------------------+
1: volume master-client-0
2: type protocol/client
3: option ping-timeout 42
4: option remote-host fedora3
5: option remote-subvolume /bricks/brick0/b0
6: option transport-type socket
7: option transport.address-family inet
8: option username 9316feac-531b-4c0e-a0f8-8a001b3f1efb
9: option password 30e8d57b-4bf5-4837-abfd-eb0e31486659
@kotreshhr
kotreshhr / watch_xtime.py
Created June 14, 2018 09:57
Print the xtime in human readable time
import xattr
import struct
import sys
from datetime import datetime
DEFAULT_STATUS = "-"
def human_time(ts):
try:
import sys
import os
import xattr
def find_file():
try:
o = open(sys.argv[2], 'w')
except:
print "Open failed"
sys.exit(1)
#!/bin/bash
SSH_PORT=52022;
key_val_pair1=`echo $2 | cut -d ',' -f 1`
key_val_pair2=`echo $2 | cut -d ',' -f 2`
key_val_pair3=`echo $2 | cut -d ',' -f 3`
key_val_pair4=`echo $2 | cut -d ',' -f 4`
key_val_pair5=`echo $2 | cut -d ',' -f 5`
mastervol=`echo $1 | cut -d '=' -f 2`