Search found 103 matches

by thockman
Tue Dec 22, 2015 11:53 am
Forum: Oracle Goodness
Topic: Flashback usage
Replies: 0
Views: 36741

Flashback usage

alter system set db_recovery_file_dest_size =50g scope=both sid='*'; alter system set db_recovery_file_dest = '+FLASH_DG' scope=both sid='*'; alter system set db_flashback_retention_target = 1440 scope=both sid='*'; alter database flashback on; create restore point guar_restore guarantee flashback d...
by thockman
Thu Jan 22, 2015 6:06 pm
Forum: Oracle Goodness
Topic: rman duplicate standby using active clone
Replies: 0
Views: 21619

rman duplicate standby using active clone

#!/usr/bin/ksh #nohup /home/oracle/active_clone.ksh 1>>/home/oracle/active_clone.log 2>&1 & export ORACLE_HOME=/u01/oracle/product/11.2.0.4/db export ORACLE_SID=stndby1 unset TNS_ADMIN /u01/oracle/product/11.2.0.4/db/bin/rman target sys/sourcesyspass@source1 auxiliary sys/sourcesyspass@standby1 <<E...
by thockman
Mon Dec 29, 2014 10:53 am
Forum: Oracle Goodness
Topic: rman backup archive to disk and purge
Replies: 0
Views: 20034

rman backup archive to disk and purge

Was running low on archive log asm space and didn't have any information on netbackup so I did this for a quick way to free up space. run { allocate channel ch001 device type disk; allocate channel ch002 device type disk; allocate channel ch003 device type disk; allocate channel ch004 device type di...
by thockman
Mon Dec 15, 2014 11:52 am
Forum: Oracle Goodness
Topic: Database Space
Replies: 0
Views: 19621

Database Space

select a.data_size+b.temp_size+c.redo_size+d.controlfile_size "total_size in MB" from ( select sum(bytes)/1024/1024 data_size from dba_data_files ) a, ( select nvl(sum(bytes),0)/1024/1024 temp_size from dba_temp_files ) b, ( select sum(bytes)/1024/1024 redo_size from sys.v_$log ) c, ( select sum(BLO...
by thockman
Thu Sep 04, 2014 1:07 pm
Forum: Linux
Topic: Is it it's own file system?
Replies: 0
Views: 35223

Is it it's own file system?

Find out if a dir is a dir or a file system

Code: Select all

alias isdir=$'for i in $(find . -maxdepth 1 -type d | awk -F "/" \'{print $2}\' | grep -v "\."); do ism=$(df | grep $i); if [ ! "$ism" ]; then echo "Is dir=$i"; else echo "Is mount=$i"; fi; done' 2>/dev/null
by thockman
Thu Sep 04, 2014 9:56 am
Forum: Oracle Goodness
Topic: Oracle DBFS Setup
Replies: 0
Views: 20627

Oracle DBFS Setup

So we decided to use dbfs for a simple share between db nodes. Here is what I ended up doing. First setup the DB side. is a script to install and config Fuse. Use at own risk. #!/bin/bash up2date fuse fuse-libs export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 ln -s $ORACLE_HOME/lib/libclntsh.s...
by thockman
Tue Jul 29, 2014 3:03 pm
Forum: AIX
Topic: Find process to disk usage
Replies: 0
Views: 29806

Find process to disk usage

Found this at
http://www.linuxquestions.org/questions ... sk-743076/

Code: Select all

filemon -O all -o fmon.out; sleep 10; trcstop

Code: Select all

ps -ef | grep PID_GOES_HERE
For filename

Code: Select all

ncheck -i 42174 /dev/hd2
by thockman
Fri Jul 25, 2014 3:10 pm
Forum: AIX
Topic: Find deleted file that is still growing.
Replies: 0
Views: 13549

Find deleted file that is still growing.

fuser -dV /tmp

Look for negative size value in the size= column. The last column is the process id.

inode=3215 size=0 fd=6 13631712
inode=2757 size=0 fd=4 14811174
by thockman
Thu Jun 05, 2014 3:57 pm
Forum: Linux
Topic: A lot of file systems...
Replies: 0
Views: 15345

A lot of file systems...

So you have a linux box that has a ton of nested file systems and you need to know what sub directories are mounted or just a dir. I created a quick alias that will display which is which. Not sure if there is a command that will do this but I couldn't find one. alias ismnt=$'for i in $(find . -maxd...
by thockman
Thu Jan 23, 2014 12:10 pm
Forum: Linux
Topic: Swap Usage Script
Replies: 0
Views: 15602

Swap Usage Script

You can use top Press O then p for sort by page. The below script I found on web will display results from /proc and are more accurate. #!/bin/bash # find-out-what-is-using-your-swap.sh # -- Get current swap usage for all running processes # -- # -- rev.0.3, 2012-09-03, Jan Smid - alignment and inte...
by thockman
Mon Jan 20, 2014 4:47 pm
Forum: Linux
Topic: Combine pdf files
Replies: 0
Views: 15215

Combine pdf files

Here is a few ideas for combining pdf files via linux. The below code will use ghostscript to create a pdf named indexp.pdf from all pdf files in the current directory. They will be ordered by file name. gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=indexp.pdf *.pdf You can also use pdfjoin...
by thockman
Sat Dec 21, 2013 12:21 pm
Forum: ProxMox
Topic: Convert ova to use with KVM
Replies: 0
Views: 30512

Convert ova to use with KVM

I am putting this here since I use mostly KVM in proxmox. You can tar -tvf the ova to view contents and tar -xvf to extract. Then choose which format to convert to. I always use raw because I use ceph for storage. So here is what I would do to convert after extracting. qemu-img convert -O raw filena...
by thockman
Sat Dec 14, 2013 1:44 pm
Forum: Linux
Topic: Color changes for echo output
Replies: 0
Views: 15046

Color changes for echo output

Here is a list of color codes: Black 0;30 Dark Gray 1;30 Blue 0;34 Light Blue 1;34 Green 0;32 Light Green 1;32 Cyan 0;36 Light Cyan 1;36 Red 0;31 Light Red 1;31 Purple 0;35 Light Purple 1;35 Brown 0;33 Yellow 1;33 Light Gray 0;37 White 1;37 Here is a sample to use one: #!/bin/bash clear rc='\e[0;31m...
by thockman
Tue Sep 24, 2013 10:11 am
Forum: Cisco
Topic: VPN fix for windows 8.
Replies: 0
Views: 39079

VPN fix for windows 8.

Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\CVirtA] "Type"=dword:00000001 "Start"=dword:00000003 "ErrorControl"=dword:00000001 "Tag"=dword:00000019 "ImagePath"=hex(2):73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,44,00,\ 52,00,49,00,56,00,45,00...
by thockman
Mon Aug 26, 2013 2:05 pm
Forum: Linux
Topic: Nagios Install
Replies: 0
Views: 15368

Nagios Install

This is a quick nagios install script for the core and plugins on CentOS 6. You will need to put in two passwords and say yes to packages for now. #!/bin/bash # Script to install Nagios downdir=~/nagdownloads nag_usr=nagios nag_grp=nagcmd email=admin@test.com if [ ! -d $downdir ]; then mkdir -p $dow...