Sunday, January 29, 2012

11gR2 install fails with “Hard Limit: maximum user processes” error


Just finished dealing with “Hard Limit: maximum user processes” error on Open Solaris 10 while installing 11gR2:
11gR2 install fails with
Oracle Metalink was useless — total waste of time — I hate that site now, it’s gone completely into the crapper.
SOLUTION 
1) edit /etc/system as follows:
set shmsys:shminfo_shmmax=12025908428
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=1024
set shmsys:shminfo_shmmin=1
set max_nprocs=30000
set maxuprc=16384
2) setup project for oracle user (if it’s already setup then just ignore the duplicate error while running projadd command):
projadd -U oracle user.oracle
projmod -s -K "project.max-sem-ids=(priv,100,deny)" user.oracle
projmod -s -K "process.max-sem-nsems=(priv,256,deny)" user.oracle
projmod -s -K "project.max-shm-memory=(priv,12025908428,deny)" user.oracle
projmod -s -K "project.max-shm-ids=(priv,100,deny)" user.oracle
projmod -s -K "process.max-file-descriptor=(priv,65536,deny)" user.oracle
3) bounce the box:
init 6
Here’s how to check for the setting:
## before above changes were applied
##
$ kstat|grep v_proc
v_proc 16362
$
 
$ kstat |grep v_maxup
v_maxup 16357
v_maxupttl 16357
$
 
## after changes/reboot
##
 
$ kstat|grep v_proc
v_proc 30000
$
 
$ kstat |grep v_maxup
v_maxup 16384
v_maxupttl 29995
$

How to Identify OS or Oracle 64 bit or 32 bit


How to Identify OS or Oracle 64 bit or 32 bit on Unix
---------------------------------------------------------------
It is very common question which version of oracle I need to install. 32 bit or 64 bit? As a 64-bit operating system can support either a 32-bit database or a 64-bit database. A 32-bit operating system cannot support a 64-bit database. So, version identification of the OS is necessary prior to install oracle. The following procedure will hopefully help you.
Check whether OS is 64 bit or 32 bit.
-----------------------------------------
On Solaris,
SQL> !/usr/bin/isainfo -kv
64-bit amd64 kernel modules
SQL> !/usr/bin/isainfo -v
64-bit amd64 applications
cx16 mon sse3 pause sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu
32-bit i386 applications
cx16 mon sse3 pause sse2 sse fxsr mmx cmov sep cx8 tsc fpu
This output tells us that solaris operating systems allow co-existence of 32-bit and 64-bit files.
On AIX,
$ getconf -a | grep KERN
$ file /usr/lib/boot/unix*
On Linux,
On HP-UX,
/usr/bin/ getconf KERNEL_BITS
/usr/bin/file /stand/vmunix
On linux,
$uname -a
Linux debian 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC 2007 i686 GNU/Linux
If the output is x86_64 then 64-bit and i686 or similar for 32-bit.
On windows,
Start>All Programs>accessories> System Tools>System Information>look for under System summary.
Or start>run>dixdiag>Then check for WHQL digital signature.
Determine of whether Oracle Software is 32 bit or 64 bit.
--------------------------------------------------------------------------------
Method 1:
--------------
Go to $ORACLE_HOME/bin and see.
# cd $ORACLE_HOME/bin
# file oracle
oracle: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped
Here it comes 64 bit and hence oracle software is 64 bit. If the output of the "file oracle" command does not say 64-bit explicitly then you are running 32-bit Oracle.
If you had 32 bit oracle software installed then output will be like,
oracle@sol:/db/oracle/bin$ file oracle
oracle: setuid setgid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
Method 2:
----------------------
Log on to SQL*plus and see the banner.
-bash-3.00$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.2.0 - Production on Thu May 15 02:50:37 2008
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Method 3:Query from v$version.
-------------------------------------
sys@THERAP> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
PL/SQL Release 10.2.0.2.0 - Production
CORE 10.2.0.2.0 Production
TNS for Solaris: Version 10.2.0.2.0 - Production
NLSRTL Version 10.2.0.2.0 - Production
Method 4: Check for lib, lib32
--------------------------------------
1) $ORACLE_HOME/lib32
2) $ORACLE_HOME/lib
If the two directories $ORACLE_HOME/lib32 and $ORACLE_HOME/lib are existing then it is 64 bit.
If there is only an ORACLE_HOME/lib directory then it is 32 bit client.

Sunday, January 22, 2012

Common NFS errors on Linux server

Common NFS errors & solutions:

1."Server Not Responding" Message
2.  "Access Denied" Message
3."Permission Denied" Message
4.  "Device Busy" Message

Error 1: If You Receive an NFS "Server Not Responding" Message

ping the nfs server from client

1.ping "nfs serer name or ip"

2./usr/bin/rpcinfo -p servername

The rpcinfo command should display the following processes:

    * portmap
    * nfs
    * mountd
    * status
    * nlockmgr
    * llockmgr

If any of these processes is not running, follow the below steps:


a.Make sure the /etc/rc.config.d/nfsconf file on the NFS server contains the following lines:

NFS_SERVER=1
START_MOUNTD=1

b.Make sure that the /etc/inetd.conf file on the NFS server does not contain a line to start rpc.mountd. 
If it does, make sure the START_MOUNTD variable in /etc/rc.config.d/nfsconf is set to 0.

c.Issue the following command on the NFS server to start all the necessary NFS processes:

#/sbin/init.d/nfs.server start

Error 2: If You Receive an "Access Denied" Message

a.check the FS is exported or not

#/usr/sbin/showmount -e server_name

(If it is not exported means u have to edit /etc/exports file in NFS server and put the necessary entry and 
then run the command
/usr/sbin/exportfs -a)

Error 3 :If You Receive a "Permission Denied" Message

a.Check the mount options in the /etc/fstab file on the NFS client. A directory you are attempting to write to may have 
been mounted read-only.

b.Issue the ls -l command to check the HP-UX permissions on the server directory and on the client directory 
that is the mount point. You may not be allowed access to the directory.

c.Issue the following command on the NFS server:

/usr/sbin/exportfs

Or, issue the following command on the NFS client:

/usr/sbin/showmount -e server_name

d. Check the export permissions on the exported directory. The directory may have been exported read-only to your client.
The system administrator of the NFS server can use the remount mount 
option to mount the directory read/write without unmounting it

Error 4 : If You Receive a "Device Busy" Message

a.If you received the "device busy" message while attempting to mount a directory, try to access the mounted directory. 
  If you can access it, then it is already mounted.
  
b.If you received the "device busy" message while attempting to unmount a directory, a user or process is currently using the directory. Wait until the process completes, or follow these steps:
 
 1.Issue the following command to determine who is using the mounted directory:

       /usr/sbin/fuser -cu local_mount_point

   The fuser(1M) command will return a list of process IDs and user names that are currently using the directory 
   mounted under local_mount_point. This will help you decide whether to kill the processes or wait for them to complete.

 2. To kill all processes using the mounted directory, issue the following command:

            /usr/sbin/fuser -ck local_mount_point

 3. Try again to unmount the directory

Saturday, January 21, 2012

vncserver: couldn’t find “xauth” on your PATH


Well, Solaris complains this when I am creating VNC server, all right, it missed some directory in $PATH, fix them by following steps:
PATH=$PATH:/usr/X/bin:/usr/X11/bin
export PATH

SSH known_hosts issues


Introducton

When a domain has been moved from one server to another an issue with SSH logins may occur. The warning dialog that most SSH programs give looks something like this:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
06:ea:f1:f8:db:75:5c:0c:af:15:d7:99:2d:ef:08:2a.
Please contact your system administrator.
Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
Offending key in /home/user/.ssh/known_hosts:4
RSA host key for domain.com has changed and you have requested strict checking.
Host key verification failed.

The SSH program will print this message and often exit, prohibiting the user from connecting to the suspicious site. This problem arises when a site has changed servers, and the new server RSA key which is transmitted when authenticating is different from the old server.

Solution

In the case of a migration, you can be reasonably sure that the RSA key change is not an accident, but to connect to the new server you must remove the line in .ssh/known_hosts that corresponds to your domain name. This can be done by editing 'known_hosts' by hand or if your machine has Perl installed you can use this one liner:
perl -p -i -e 's/^example.com.*n//;' ~/.ssh/known_hosts
Substitute your actual domain for example.com making sure to include a backslash before the dot. If you have several domains that have moved you must repeat this step for each one.

Wednesday, January 11, 2012

NFS Performance tune on Linux server

The mount command (mount.nfs4 and mount.nfs) allows you to fine tune NFS mounting to improve NFS server and client performance. However, there is no one-size-fits-all approach to NFS performance tuning. Servers can be configured for handling different workloads and may need to be tuned as per your setup. Please test and monitor both your server and client systems as you test different tuning options.

Recommended NFS Tuning Options For the Mount Command

noacl: Disables Access Control List (ACL) processing.
nocto: Suppress the retrieval of new attributes when creating a file.
rsize: The number of bytes NFS uses when reading files from an NFS server. The rsize is negotiated between the server and client to determine the largest block size that both can support. The value specified by this option is the maximum size that could be used; however, the actual size used may be smaller. Note: Setting this size to a value less than the largest supported block size will adversely affect performance.
wsize: The number of bytes NFS uses when writing files to an NFS server. The wsize is negotiated between the server and client to determine the largest block size that both can support. The value specified by this option is the maximum size that could be used; however, the actual size used may be smaller. Note: Setting this size to a value less than the largest supported block size will adversely affect performance.
noatime: Setting this value disables the NFS server from updating the inodes access time. As most applications do not necessarily need this value, you can safely disable this updating.
nodiratime: Setting this value disables the NFS server from updating the directory access time. This is the directory equivalent setting of noatime.
noac: Disable all forms of attribute caching entirely. This extracts a significant performance penalty but it allows two different NFS clients to get reasonable results when both clients are actively writing to a common export on the server.
Here is sample mount command with the above options:

# mount.nfs -o noacl,nocto, rsize=32768,wsize=32768 nfsserver:/test  /< mount point >

For more information read your local nfs and mount command man pages. Please note that most of the above options are also supported by other UNIX like operating systems such as OpenBSD, FreeBSD, AIX and so on.

See NFS Statistics by using nfsstat

To displays statistics kept about NFS client and server activity, enter:


nfsstat

[root@ctsrc01 ~]# nfsstat
Server rpc stats:
calls      badcalls   badauth    badclnt    xdrcall
172247607   0          0          0          0
Server nfs v3:
null         getattr      setattr      lookup       access       readlink
16        0% 707805    0% 159       0% 37657     0% 409188    0% 2         0%
read         write        create       mkdir        symlink      mknod
171013567 99% 42756     0% 1876      0% 2         0% 0         0% 0         0%
remove       rmdir        rename       link         readdir      readdirplus
54        0% 0         0% 18        0% 0         0% 0         0% 32        0%
fsstat       fsinfo       pathconf     commit
34207     0% 21        0% 0         0% 1         0%

I have an HP Proliant 140DL G2 server with what appears to be an IDE drive in non-DMA mode. Performance on the server is extremely bad when large amounts of disk activity is taking place.

please check this error

Dmesg

Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP ver 2.8
Bluetooth: L2CAP socket layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM ver 1.8
EXT3-fs: Unrecognized mount option "hard" or missing value
EXT3-fs: Unrecognized mount option "hard" or missing value
EXT3-fs: Unrecognized mount option "hard" or missing value
Bluetooth: HIDP (Human Interface Emulation) ver 1.1
mtrr: type mismatch for de000000,400000 old: uncachable new: write-combining
mtrr: type mismatch for de1a0000,8000 old: uncachable new: write-combining
mtrr: type mismatch for de180000,20000 old: uncachable new: write-combining
mtrr: type mismatch for de100000,80000 old: uncachable new: write-combining
mtrr: type mismatch for de000000,100000 old: uncachable new: write-combining
mtrr: type mismatch for de000000,800000 old: uncachable new: write-combining
usb 3-1: USB disconnect, address 2
usb 3-2: USB disconnect, address 3
hda: Speed warnings UDMA 3/4/5 is not functional.
hdc: Speed warnings UDMA 3/4/5 is not functional.

 [root@ctdst07 ~]# hdparm -Tt /dev/hdc

/dev/hdc:
 Timing cached reads:   13840 MB in  2.00 seconds = 6928.46 MB/sec
 Timing buffered disk reads:   22 MB in  3.21 seconds =   6.85 MB/sec
[root@ctdst07 ~]# hdparm -Tt /dev/hda

/dev/hda:
 Timing cached reads:   13408 MB in  2.00 seconds = 6712.95 MB/sec
 Timing buffered disk reads:   22 MB in  3.26 seconds =   6.74 MB/sec
[root@ctdst07 ~]#
[root@ctdst07 ~]# hdparm  /dev/hda

/dev/hda:
 multcount    = 16 (on)
 IO_support   =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 64 (on)
 geometry     = 65535/255/63, sectors = 1953525168, start = 0
[root@ctdst07 ~]# hdparm  /dev/hdc

/dev/hdc:
 multcount    = 16 (on)
 IO_support   =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 64 (on)
 geometry     = 36481/255/63, sectors = 586072368, start = 0
[root@ctdst07 ~]# hdparm -X66 -d1 -u1 -m16 -c3 /dev/hda

/dev/hda:
 setting 32-bit IO_support flag to 3
 setting multcount to 16
 setting unmaskirq to 1 (on)
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 setting xfermode to 66 (UltraDMA mode2)
 multcount    = 16 (on)
 IO_support   =  3 (32-bit w/sync)
 unmaskirq    =  1 (on)
 using_dma    =  0 (off)
[root@ctdst07 ~]# hdparm -X66 -d1 -u1 -m16 -c3 /dev/hdc

/dev/hdc:
 setting 32-bit IO_support flag to 3
 setting multcount to 16
 setting unmaskirq to 1 (on)
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 setting xfermode to 66 (UltraDMA mode2)
 multcount    = 16 (on)
 IO_support   =  3 (32-bit w/sync)
 unmaskirq    =  1 (on)
 using_dma    =  0 (off)
[root@ctdst07 ~]# hdparm  -d1  /dev/hdc

/dev/hdc:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
[root@ctdst07 ~]# hdparm  -d1  /dev/hda

/dev/hda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)
[root@ctdst07 ~]#
System Information
        Manufacturer: HP
        Product Name: ProLiant DL140 G3
        Version: 436602-001
        Serial Number: USE736N6A3
        UUID: 9BDF7713-9B7F-B72B-9B7F-B72BA0E71714
        Wake-up Type: Power Switch


Solution:
boot with hda=noprobe hda=none on the /boot/grub/menu.lst  file and also add . The drive will be handled by ata_piix and will show up as /dev/sda.

and also in this file /etc/modprobe.conf add this options "options ide hda=noprobe"

and reboot server