Skip to content

Instantly share code, notes, and snippets.

View domgiles's full-sized avatar

Dominic Giles domgiles

View GitHub Profile
from matplotlib import style
import pandas as pd
from matplotlib import dates
import matplotlib.pyplot as plt
timings = pd.Series(['2016-12-25 08:10:00', '2016-12-25 08:30:00', '2016-12-25 08:50:00', '2016-12-25 08:58:00',
'2016-12-25 09:08:00', '2016-12-25 09:14:00', '2016-12-25 09:20:00', '2016-12-25 09:26:00',
'2016-12-25 09:35:00', '2016-12-25 09:46:00', '2016-12-25 09:55:00', '2016-12-25 10:05:00',
'2016-12-25 10:15:00', '2016-12-25 10:30:00', '2016-12-25 10:55:00', '2016-12-25 11:10:00',
'2016-12-25 11:30:00', '2016-12-25 11:54:00', '2016-12-25 12:15:00'])
@domgiles
domgiles / ChangeRedoSize.py
Last active August 26, 2018 07:28
Simple "Oracle Database" hack in python to change the size of the redo logs files. It assumes that Oracle Managed Files are being used.
import argparse
import time
import cx_Oracle
from prettytable import PrettyTable
class RedoLogManager():
def get_log_files_info(self, cursor):
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
sed -i -e 's/<LogonGroupCount>1<\/LogonGroupCount>/<LogonGroupCount>5<\/LogonGroupCount>/' \
-e 's/<LogonDelay>0<\/LogonDelay>/<LogonDelay>300<\/LogonDelay>/' \
-e 's/<WaitTillAllLogon>true<\/WaitTillAllLogon>/<WaitTillAllLogon>false<\/WaitTillAllLogon>/' \
../configs/SOE_Server_Side_V2.xml
./charbench -c ../configs/SOE_Server_Side_V2.xml \
-cf ~/wallet_SBATP.zip \
-cs sbatp_low \
-u soe \
-p <your soe password> \
-v users,tpm,tps,vresp \
-intermin 0 \
-intermax 0 \
-min 0 \
-max 0 \
./oewizard -cf ~/wallet_SBATP.zip \
-cs sbatp_medium \
-ts DATA \
-dbap <your admin password> \
-dba admin \
-u soe \
-p <your soe password> \
-async_off \
-scale 5 \
-hashpart \
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CPUMonitor Title="Compute Nodes" xmlns="http://www.dominicgiles.com/cpumonitor">
<MonitoredNode>
<HostName>129.146.65.101</HostName>
<Username>opc</Username>
<Password>Your ssh password</Password>
<Port>22</Port>
<PrivateKey>/Users/dgiles/.ssh/id_rsa</PrivateKey>
<Comment>OCI Server</Comment>
</MonitoredNode>
./tpcdswizard -cf ~/wallet_DOMADW.zip \
-cs domadw_high \
-ts DATA \
-its DATA \
-dbap <Your admin Password> \
-dba admin \
-u tpcds \
-p <Your user password> \
-async_off \
-scale 10 \
python ../utils/enable_tpcds_queries.py -c ../configs/tpcds_statements.xml -s query69 -d;
python ../utils/enable_tpcds_queries.py -c ../configs/tpcds_statements.xml -s query10 -d;
python ../utils/enable_tpcds_queries.py -c ../configs/tpcds_statements.xml -s query45 -d;
./charbench -cf ~/wallet_DOMADW.zip \
-cs domadw_high \
-u tpcds \
-p <your user password> \
-c ../configs/TPCDS_Like_Workload.xml \
-uc 4 \
-intermin 0 \
-intermax 0 \
-v trem,users,tpm,tps,tottx,resp \
-rt 0:10