Archive

Archive for April, 2012

Oracle – generate sql and email as HTML

April 28, 2012 Leave a comment

report=”report.htm”
email=”email@email.com”

sqlplus -s <<EOD
/ as sysdba
set markup html on
set feed off head off pages 0 lines 200
spool "$report"

EOD

[ -f “$report” ] && uuencode “$report” “$report” | mailx -s “Your report” “$email”

Categories: Linux, Oracle

How to calculate IOPs for your storage

April 3, 2012 2 comments

Use the following for per drive calculations:
7200 RPM drive = 75 IOPS
10k RPM drive = 125 IOPS
15k RPM drive = 175 IOPS

Use this as an example:
This is based on my calculations for 16 disks, RAID5:
What is required for large scale:
15k FC drives = ~ 200 IOPs each
READ/WRITE profile % = 30% Read / 70% Write
n = (%R + f (%W))(tps)/200 (n = min. # of disks needed, f=1 for RAID0, f=2 for RAID1 or RAID10, f=4 for RAID5, f=6 for RAID6)

In this case, if we require 5000 IOPS, it would take 78 RAID5 disks to fulfill.
(0.3+4(0.7))(1500 + 3500)/200 = 78 disks

Categories: EMC, Linux

How to stop auto indenting on VIM

April 3, 2012 Leave a comment

While in vim, hit Esc, then:
:setl noai nocin nosi inde=

For .vimrc, enter:
filetype indent off

Categories: Linux