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 | |
# parameter 1 is the name of the test | |
prstat -m -s cpu -u oracle | nawk '$1=="PID" { "date" | getline d ; close("date") } { print d,$0 }' | tee $1 |
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 | |
# pass in the name of the test as parameter 1 | |
SLEEP_TIME=1800 | |
THREADS=97-111 | |
ALL_THREADS=96-111 | |
#THREADS=96-111 | |
psradm -f $THREADS | |
psrinfo $ALL_THREADS |
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
# This script will retrieve the latest version of splunk enterprise. | |
# Edit the filterString to include only the platform you need. | |
#filterString = ['windows', 'x86_64'] # Windows x64 RPM | |
filterString = ['linux', 'x86_64'] # Linux x64 | |
#filterString = ['x86_64'] # all x64 platforms | |
#filterString = ['linux', 'x86_64', '.rpm'] # Linux x64 RPM | |
#filterString = ['linux', 'x86_64', '.deb'] # Linux x64 deb | |
import requests |
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
create or replace procedure log_splunk_plugin( | |
p_rec in logger.rec_logger_log) | |
as | |
l_text logger_logs.text%type; | |
l_module varchar2(50); | |
v_body CLOB; | |
v_result CLOB; | |
l_splunk_hec_token varchar2(64) := 'F3C63E53-1EDA-4DF4-80F8-6BD5B047069A'; | |
begin | |
dbms_output.put_line('In Plugin'); |
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
declare | |
l_stat_rows number := 1; | |
l_last_analyzed_days number:= 0; | |
l_last_analyzed_threshold constant number:= 60; | |
l_actual_rows number; | |
l_pct_change number := 0; | |
begin | |
select nvl(NUM_ROWS,1) nrows,round(sysdate - S.LAST_ANALYZED) last_analyzed_days | |
into l_stat_rows,l_last_analyzed_days from sys.DBA_TAB_STATISTICS s where owner = 'SYS' and table_name = 'WRM$_SNAPSHOT'; | |
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
# http://cran.r-project.org/web/packages/ROracle/index.html | |
# http://www.inside-r.org/node/48947 | |
library(ROracle) | |
library(data.table) | |
library(stringr) | |
library(dplyr) | |
library(ggplot2) | |
library(scales) | |
library(reshape2) | |
library(ggthemes) |
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
set define "&" concat "." | |
set serveroutput on verify off echo off; | |
column PX_DEGREE_IN noprint new_value PX_DEGREE_NUM | |
column PX_LOCAL_IN noprint new_value PX_LOCAL | |
accept PX_DEGREE prompt 'Parallel Degree for Query, DML and DDL. Append an L to set parallel_force_local=true: ' | |
select | |
regexp_replace('&PX_DEGREE','([[:digit:]]+).*','\1') PX_DEGREE_IN, |
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
-- row by row | |
for c1 in (select rowid rid, YEAR1, | |
QUARTER, | |
... | |
from flights_400k | |
) | |
loop | |
-- moderately complex PL/SQL logic | |
update flights_400k | |
set DEPARTUREDELAYGROUPS = l_group, |
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
DF_SQL_BY_SNAPID.top_sql.sd.elap <- DF_SQL_BY_SNAPID %>% | |
group_by(PARSING_SCHEMA_NAME,SQL_ID,COMMAND_NAME) %>% | |
summarise( | |
elapsed.avg=mean(ELAP_S), | |
elapsed.stddev=sd(ELAP_S) | |
) %>% | |
ungroup() %>% | |
arrange(desc(elapsed.stddev)) %>% | |
head(30) |
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
<macrodef name="pandoc-convert"> | |
<attribute name="input" /> | |
<attribute name="output" /> | |
<sequential> | |
<exec executable="pandoc" dir="."> | |
<arg line="--from=markdown_github " /> | |
<arg line="--standalone" /> | |
<arg line="-o @{output}" /> | |
<arg line="@{input}" /> | |
</exec> |