Read a good paper on statistics today, by Karen Morton:
Click here to read this paper
18 February 2010
17 February 2010
format columns in awk with printf
I was struggling with awk to display the diskspace on my Linux host in the most convenient way. One problem was that a df command splits the output on two lines, but this is fixed by df -P.
Formatting the output with awk required using printf instead of print. With printf you can give formatting to the columns. I came on the following which is seems very usefull in my case.
oracle@myserver:~> df -Ph | awk '{ printf "%-12s%8s\n", $6 , $5 }'
Mounted Use%
/ 9%
/dev 1%
/boot 10%
/home 4%
/opt 31%
/tmp 20%
/usr 52%
/var 11%
/data 15%
/backup 83%
02 December 2009
Tablespace point in time recovery
I'm glad it was just a test for this TSPITR....
Ooops.... running SE.
RMAN> run
2> { recover tablespace USERS
3> until logseq 23 thread 1
4> auxiliary destination '/u04/oradata/';
5> }
Starting recover at 02-DEC-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=146 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 12/02/2009 11:41:25
RMAN-06455: point-in-time tablespace recovery requires Enterprise Edition
Ooops.... running SE.
24 November 2009
Kill all processes - the rough way
On certain occasions, it might be needed to kill several hunderds of processes on a linux machine. Of course you should NOT do this on a production site, but the use of xargs might be handy:
ps -ef | grep oracle | grep -v bash | awk '{ print $2}' | xargs kill -9
With the grep -v you exclude your own putty session.
ps -ef | grep oracle | grep -v bash | awk '{ print $2}' | xargs kill -9
With the grep -v you exclude your own putty session.
Subscribe to:
Posts (Atom)