This file contains 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
select sql_exec_start,username,machine,module,program, | |
(select px.QCSID||','||px.QCSERIAL# ||',@'||px.QCINST_ID from gv$px_session px where px.sid=vs.sid and px.serial#=vs.serial#) as QC_info, | |
(select substr(sql_text,1,80) from gv$sql vsql where vsql.sql_id = vs.sql_id and rownum = 1) as SQLTEXT | |
from v$session vs | |
where | |
vs.sql_exec_start < SYSDATE - 1 / 48 | |
and | |
EXISTS ( | |
SELECT | |
1 |
This file contains 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/env perl | |
# pachi | |
# | |
# This script find out process currently swapped by /proc/$PID/status | |
use strict; | |
use warnings; | |
# When you want to debug, you should exec "export SCRIPT_DEBUG=1". | |
my $debug = $ENV{SCRIPT_DEBUG} ? 1 : 0; | |
This file contains 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
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget. | |
### You can download all the binaries one-shot by just giving the BASE_URL. | |
### Script might be useful if you need Oracle JDK on Amazon EC2 env. | |
### Script is updated for every JDK release. | |
## Features:- | |
# 1. Resumes a broken / interrupted [previous] download, if any. | |
# 2. Renames the file to a proper name with including platform info. | |
# 3. Downloads the following from Oracle Website with one shell invocation. | |
# a. Windows 64 and 32 bit; |
This file contains 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
-- Monitoring parallel execution | |
-- http://www.oracle.com/technetwork/jp/database/enterprise-edition/db11gr2-12-130999-ja.pdf | |
select status, queuing_time, sql_id, SQL_EXEC_START, SQL_EXEC_ID from gv$sql_monitor where sql_text is not null order by SQL_EXEC_START; | |
select * from gv$sql_monitor | |
where STATUS = 'EXECUTING' order by SQL_EXEC_START; |
This file contains 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
<Location /> | |
### COMPRESS EVERYTHING EXCEPT IMAGES >> ### | |
# Insert filter | |
SetOutputFilter DEFLATE | |
# Netscape 4.x has some problems... | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
# Netscape 4.06-4.08 have some more problems | |
BrowserMatch ^Mozilla/4\.0[678] no-gzip |
This file contains 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/sh -e | |
TODAY=`date +%Y%m%d` | |
if [ $# -eq 1 ] | |
then | |
TARGET_DATE=$1 | |
else | |
TARGET_DATE=`date -d "1 day ago" +%Y%m%d` |
This file contains 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/perl | |
### | |
### ApacheのCombined + %D 形式のアクセスログから1秒毎の同時接続数を集計するスクリプト。 | |
### タイムスタンプを接続が開始された時刻とみなして、%D の間は接続が維持されているものとする。 | |
### 結果はあくまで参考値。 | |
### スクリプトと同じディレクトリに access_log をおいてから実行する。 | |
### | |
use strict; |
This file contains 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
ExpiresActive On | |
ExpiresDefault A0 | |
Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform" | |
Header set Pragma "no-cache" | |
ErrorDocument 503 /maintenance/index.html | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !^/maintenance/.*$ | |
RewriteRule ^.*$ - [R=503,L] |
This file contains 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/sh | |
LANG=C | |
/bin/gawk -F"\t" '$0 !~ /^#/ { | |
## make epochtime from timestamp | |
split($1, d, "-"); | |
split($2, t, ":"); | |
timestamp=d[1]" "d[2]" "d[3]" "t[1]" "t[2]" "t[3]; | |
epochtime=mktime(timestamp); |
This file contains 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
## Rx | |
$ LANG=C sudo sar -n DEV | grep eth0 | grep -v Average | awk '{print $1, $5*8/1048576}' | |
## Tx | |
$ LANG=C sudo sar -n DEV | grep eth0 | grep -v Average | awk '{print $1, $6*8/1048576}' | |
# Ex. | |
$ LANG=C sudo sar -n DEV -f /var/log/sa/sa24 | grep eth0 | grep -v Average | awk '{print $1, $6*8/1048576}' | |
... | |
23:20:01 4.32473 |
NewerOlder