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 | |
curlxidheaders() { | |
echo "number,timestamp,status_code,message,size,speed_bytes_per_sec,time_total,time_namelookup,time_connect,time_appconnect,time_pretransfer,time_redirect,time_starttransfer" | |
} | |
curlxid() { | |
curl -w 'code: %{http_code} %{http_connect}|size: %{size_download}|speed: %{speed_download}|total: %{time_total}, %{time_namelookup}, %{time_connect}, %{time_appconnect}, %{time_pretransfer}, %{time_redirect},%{time_starttransfer}' \ | |
-s -o /dev/null -v "$@" 2>&1 | \ | |
grep -E 'X-Trans-Id|total|Date:' | \ |
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 | |
from collections import defaultdict | |
import sys | |
import time | |
import socket | |
from argparse import ArgumentParser | |
from swift.common.internal_client import InternalClient | |
from swift.common.utils import Timestamp | |
from swift.common.wsgi import ConfigString |
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
import hashlib | |
import sys | |
def etag_checksum_s3(filename, chunk_size=6 * 1024 * 1024): | |
md5s = [] | |
with open(filename, 'rb') as f: | |
for data in iter(lambda: f.read(chunk_size), b''): | |
md5s.append(hashlib.md5(data).digest()) | |
print("s3api segment(hex): %s"% hashlib.md5(data).hexdigest()) |
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 | |
import logging | |
import sys | |
import thread | |
import threading | |
from Queue import Queue | |
from datetime import datetime, timedelta |
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
[root@fuel ~]# fuel2 env redeploy --noop 22 | |
Deployment task with id 570 for the environment 22 has been started. | |
[root@fuel ~]# fuel2 task show 570 | |
+------------+--------------------------------------+ | |
| Field | Value | | |
+------------+--------------------------------------+ | |
| id | 570 | | |
| uuid | 9da95690-6a0c-4061-8d72-2eebcf46f965 | | |
| status | running | |
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
[root@fuel ~]# update-prepare prepare env 22 | |
Warning: Permanently added '10.20.0.7' (ECDSA) to the list of known hosts. | |
W: Failed to fetch http://10.20.0.2:8080/mirrors/mos-repos/ubuntu/8.0/dists/mos8.0/main/binary-amd64/Packages 404 Not Found | |
W: Failed to fetch http://10.20.0.2:8080/mirrors/mos-repos/ubuntu/8.0/dists/mos8.0/restricted/binary-amd64/Packages 404 Not Found | |
W: Failed to fetch http://10.20.0.2:8080/mirrors/mos-repos/ubuntu/8.0/dists/mos8.0-security/main/binary-amd64/Packages 404 Not Found | |
W: Failed to fetch http://10.20.0.2:8080/mirrors/mos-repos/ubuntu/8.0/dists/mos8.0-security/restricted/binary-amd64/Packages 404 Not Found |
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
if [ -f ~/.alias ]; then | |
. ~/.alias | |
fi | |
if [ -f ~/.prompt ]; then | |
. ~/.prompt | |
fi | |
if [ -f ~/.ss_profile ]; 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
#!/bin/bash | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 file partSizeInMb"; | |
exit 0; | |
fi | |
file=$1 | |
if [ ! -f "$file" ]; 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
$ dpkg -l |grep iotop | |
ii iotop 0.4.4-4 simple top-like I/O monitor | |
(test-iotop)$ python | |
Python 2.7.3 (default, Dec 18 2014, 19:10:20) | |
[GCC 4.6.3] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import iotop | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> |
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 | |
TOKEN=AUTH_tk025422bc77c24bd0b123661e610f6c0c | |
ACCOUNT=$1 | |
CONTANER=$2 | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} stat | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} stat "${CONTAINER}1" a1 | |
echo | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} stat "${CONTAINER}2" a2 |
NewerOlder