Archive

Archive for the ‘Uncategorized’ Category

RHEL 6 IGMPv3 setting

August 11, 2017 Leave a comment

Set following parameter in /etc/sysctl.conf file for the interface that is desired (e.g. bond0, eth0, etc.).

net.ipv4.conf.eth0.force_igmp_version=3
  • Reboot system
Categories: Linux, Redhat, Uncategorized

Vagrantfile

Working vagrantfile I want to keep as a sample template:

 

# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = “2”
Vagrant.require_version “>= 1.7.2”

# All Vagrant configuration is done below. The “2” in Vagrant.configure
# configures the configuration version. Please don’t change it unless you know what
# you’re doing.
Vagrant.configure(2) do |config|

config.vm.box = “<user>/openshift-origin”
#uncomment this line if you downloaded the box and want to use it instead
#config.vm.box = “openshift3”
config.vm.box_check_update = false
config.vm.network “private_network”, ip: “10.2.2.2”
config.vm.synced_folder “.”, “/vagrant”, disabled: true
config.vm.hostname = “origin”
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing “localhost:8080” will access port 80 on the guest machine.
# config.vm.network “forwarded_port”, guest: 80, host: 8080
#config.vm.network “forwarded_port”, guest: 80, host: 1080
#config.vm.network “forwarded_port”, guest: 443, host: 1443
#config.vm.network “forwarded_port”, guest: 5000, host: 5000
#config.vm.network “forwarded_port”, guest: 8080, host: 8080
#config.vm.network “forwarded_port”, guest: 8443, host: 8443

config.vm.provider “virtualbox” do |vb|
# vb.gui = true
vb.memory = “8192”
vb.cpus = 2
vb.name = “origin-1.1.2”
end

end

Categories: Uncategorized

Finding exact SCNs for Oracle Incomplete Restore

Using reference from goldparrot below really helped:
https://goldparrot.wordpress.com/2011/05/16/how-to-find-exact-scn-number-for-oracle-restore/

2) Get the greatest of either absolute_fuzzy_change# or checkpoint_change# for your datafile backups.

The quickest way to roll forward just beyond the backup to open resetlogs is
to query v$backup_datafile.
You then just need to choose the greatest of either the absolute_fuzzy_change# or checkpoint_change#
for your backupset.

You can modify the query to your liking, and even add in many details from stamp and recid, but below
gets the job done quickly. Just choose the day in which your level0 or level1 completed and modify appropriately.

=============================================
` col fuzz# format 99999999999999999999999999
` col chkpnt# format 99999999999999999999999999

select max(absolute_fuzzy_change#) fuzz#, max(checkpoint_change#) chkpnt# from
(select file#, completion_time, checkpoint_change#, absolute_fuzzy_change# from v$backup_datafile
where incremental_level = 0
and trunc(completion_time) = to_date(‘JUN-20-2010′,’MON-DD-YYYY’)
and file# <> 0
order by completion_time desc
);
===============================================

This will return 2 SCN numbers. Pick the greatest of the 2.

FUZZ# CHKPNT#
——————– ——————–
23138984359 23138974759

Categories: Oracle, Uncategorized

Linux: place line numbering on output of file (nl)

February 21, 2017 Leave a comment

Simple command (nl)to add line numbers to a file on the output:

$ nl /etc/passwd
1 root:x:0:0:root:/root:/bin/bash
2 daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
3 bin:x:2:2:bin:/bin:/usr/sbin/nologin
4 sys:x:3:3:sys:/dev:/usr/sbin/nologin
5 sync:x:4:65534:sync:/bin:/bin/sync
6 games:x:5:60:games:/usr/games:/usr/sbin/nologin
7 man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
8 lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
9 mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
10 news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
11 uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
12 proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
13 www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
14 backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
15 list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
16 irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
17 gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
18 nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
19 libuuid:x:100:101::/var/lib/libuuid:
20 syslog:x:101:104::/home/syslog:/bin/false
21 messagebus:x:102:106::/var/run/dbus:/bin/false
22 landscape:x:103:109::/var/lib/landscape:/bin/false
23 sshd:x:104:65534::/var/run/sshd:/usr/sbin/nologin
24 pollinate:x:105:1::/var/cache/pollinate:/bin/false
25 vagrant:x:1000:1000::/home/vagrant:/bin/bash
26 colord:x:106:112:colord colour management daemon,,,:/var/lib/colord:/bin/false
27 statd:x:107:65534::/var/lib/nfs:/bin/false
28 puppet:x:108:114:Puppet configuration management daemon,,,:/var/lib/puppet:/bin/false
29 ubuntu:x:1001:1001:Ubuntu:/home/ubuntu:/bin/bash

Categories: Linux, Redhat, Uncategorized

Vagrant example file

February 17, 2017 Leave a comment

# To connect to vagrant guest:
vagrant status
vagrant resume acs
vagrant ssh acs

## Begin Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The “2” in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don’t change it unless you know what
# you’re doing.
Vagrant.configure(“2”) do |config|

config.vm.define “acs” do |acs|
acs.vm.box = “ubuntu/trusty64”
acs.vm.hostname = “acs”
acs.vm.network “private_network”, ip: “192.168.33.10”
end

config.vm.define “web” do |web|
web.vm.box = “nrel/CentOS-6.5-x86_64”
web.vm.hostname = “web”
web.vm.network “private_network”, ip: “192.168.33.20”
web.vm.network “forwarded_port”, guest: 80, host: 8080
end

config.vm.define “db” do |db|
db.vm.box = “nrel/CentOS-6.5-x86_64”
db.vm.hostname = “db”
db.vm.network “private_network”, ip: “192.168.33.30”
end

end

Categories: Uncategorized

NFS mount options for CRS Voting Disk and OCR

December 1, 2016 Leave a comment

Operating
System

Mount options for Binaries

Mount options for
Oracle Datafiles

Mount options for CRS Voting Disk and OCR

Sun Solaris *

rw,bg,hard,nointr,rsize=32768,
wsize=32768,tcp,noac,vers=3,suid

rw,bg,hard,nointr,rsize=32768,
wsize=32768,tcp,noac,
forcedirectio, vers=3,suid

rw,bg,hard,nointr,rsize=32768,
wsize=32768,tcp,vers=3,noac,
forcedirectio

AIX (5L) **

rw,bg,hard,nointr,rsize=32768,
wsize=32768,tcp,
vers=3,timeo=600

cio,rw,bg,hard,nointr,
rsize=32768,
wsize=32768,tcp,noac,
vers=3,timeo=600

cio,rw,bg,hard,intr,rsize=32768,
wsize=32768,tcp,noac,
vers=3,timeo=600

HPUX 11.23 ****

rw,bg,vers=3,proto=tcp,noac,hard,
nointr,
timeo=600,rsize=32768,
wsize=32768,suid

rw,bg,vers=3,proto=tcp,noac,
forcedirectio,hard,nointr,
timeo=600,
rsize=32768,wsize=32768,suid

rw,bg,vers=3,proto=tcp,noac,
forcedirectio,hard,nointr,
timeo=600
,rsize=32768,wsize=32768,suid

Windows

Not Supported

Not Supported

Not Supported

Linux x86

rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,vers=3,
timeo=600, actime=0

rw,bg,hard,nointr,rsize=32768,
wsize=32768,tcp,actimeo=0,
vers=3,timeo=600

rw,bg,hard,nointr,rsize=32768,
wsize=32768,tcp,noac,vers=3,
timeo=600

Linux x86-64

rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,vers=3,
timeo=600, actime=0

rw,bg,hard,nointr,rsize=32768,
wsize=32768,tcp,actimeo=0,
vers=3,timeo=600

rw,bg,hard,nointr,rsize=32768,
wsize=32768,tcp,vers=3,
timeo=600,
noac

Linux – Itanium

rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,vers=3,
timeo=600, actime=0

rw,bg,hard,nointr,rsize=32768,
wsize=32768,tcp,actimeo=0,
vers=3,timeo=600

rw,bg,hard,nointr,rsize=32768,
wsize=32768,tcp,noac,vers=3,
timeo=600

* The NFS mount option “forcedirectio” is required on Solaris platforms when mounting the OCR/CRS files when using Oracle 10.1.0.4 or 10.2.0.2 or later (Oracle bug 4466428)
** AIX is only supported with NAS on AIX 5.3 TL04 and higher with Oracle 10.2.0.1 and later (NetApp)
*** NAS devices are only supported with HPUX 11.23 ONLY

Categories: Oracle, Uncategorized

How to background a process and have it run after you logout

December 1, 2016 Leave a comment

Assuming that you have a program running in the foreground, press ctrl-Z, then:

[1]+  Stopped                 myprogram
$ disown -h %1
$ bg 1
[1]+ myprogram &
$ logout
Categories: Linux, Redhat, Uncategorized