Translate

Search This Blog

Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Configure Huge Page in Linux for efficient memory utilization for performance tuning Oracle Database

Traditional Virtual Memory Page Size is only 4K and as as Linux does not have intimate shared memory model unlike Solaris the size of Page Table in Linux can grow significantly too large to become major slow down factor as number of dedicated connections(or shared servers - which is rare case)  grows and SGA has large size - slowing down system by consuming system in system CPU usage to scan large Page Table. Also as we know processor has very small portion set for TLB(a portion of page memory resides in processor - rest linked) it is very important to tune Page Memory size by reducing its size if it is slowing down system-Another good reason to tune Page table is incurs heavy overhead in context switching when portion of page table in CPU is flushed. System CPU usage on Linux box can be tracked by checking sys% vmstat and grep -i pagesize /proc/meminfo. If sys% is significantly high then check the size of Page Table during your typical or peak workload hours on Linux DB server.

Linux has option of configuring Large Page size 2MB so say if Page Table size for 8GB SGA with 100 connections is 1GB  then it reduces to less than 100MB with Huge pages. RHEL 6 Linux configures transparent huge pages also but Oracle does not go well with feature and recommends you to disable transparent Huge pages. Oracle's own flavour OEL has it disabled for UEK kernel.

Do you need Huge Pages:

Check system CPU usage by vmstat or sar .It should not be high. Check Page Table size by command:

 grep -i Page /proc/meminfo It should not be high.

If system CPU usage and Page Table both are re significantly high or Page Table size is too high then go for Huge pages. You can better check the pattern of system usage of CPU by history of sar and compare it with number of concurrent sessions in that window with AWR report. 

Advantages :
  • Configuring Huge pages reduces the page table scan time and saves CPU resources
  • By configuring Huge Pages the memory freed by small page table can be assigned to Oracle SGA and PGA so more better memory utilization. 
  •  Another advantage is SGA is allocated from Huge Pages pool so it is locked in memory and is not swapped(you do not need to set LOCK_SGA=TRUE init parameter] [ make sure whole SGA fits in Huge Page poo, if some of SGA is allocated from Huge pages pool and some from normal memory then this will slow down system and it may restart the system(I obsever same in one my machine  RHEL 4.4 with less Huge pages and DB was Oracle 10.2.0.5 ) or DB won't be able to start Oracle instance ] 
  • If your SGA is small and you do not have large number of dedicated connections your benefit from configure Huge pages may be insignificant. 
NOTE OF CAUTION : 

1) From Oracle 11g onward DB alert log begins with information with memory aread from SGA is allocated where Huge page on Linux system has been configure or not. How much of the Huge Menory pool is used by Oracle SGA and how much of the SGA memory from non Huge pool is allocated to SGA ].  Oracle 11g also comes with parameter use_large_pages and you can set it to 'ONLY' so that Oracle instance does not start if system lacks in required number of Huge pages so that Oracle instance memory area is not split in two - one portion in Huge pool and another in non Huge pool which slows down oracle database. Do not tempt to use parameter PRE_PGA_SGA=true, this parameter is not good for OLTP database, as it can slow down connection setup time. I've tested it with large number of concurrent connects and found it was 25% slower. It can be more with fewer connection due large cache effect of my heavily concurrent connection setup.

2) Huge Pages pool can not be used with AMM(automatic memory management introduced from 11g) but can be used with ASMM(automatic shared memory management 10g feature). I personally do not like either of these two and I like to configure SGA and PGA depending on typical need to avoid bugs(10gr2 has plenty of Shared Pool memory leakage bugs)  and overhead of shrink and expansion of SGA components at run time.

Configuring Huge Pages: It is simple. Changes needs in OS  setting only, so transparent to Database. You just optionally want to configure parameter use_large_page in 11g

  1. To configure huge pages check output of SGA shared memory segment size shown in ipcs -m and divide it by the Huge Page size which is 2MB by default  and add 4 to this number and set this obtained number as parameter  vm.nr_Huge_Pages=X in /etc/systctl.conf.  Say your SGA is of size 8GB and ipcs is showing it 8194MB then divide it by 2 which gives 4097 now add 5 in this number(to be safe) and this 4102 will the Huge Pages required for you - this is X for you to set in mentioned parameter. This parameter can be enable dynamically by sysctl -p but it is good to restart system. Another way to set Huge pages temporarily is run echo 4012 > /proc/sys/vm/nr_hugepages but it may not free up space as Huge Pages needs contiguous free space and your system may not have this much contiguous free space so recommended is to set from sysctl.conf file followed by reboot as sysctl -p also may have issue.
  2. Now parameter oracle soft memlock Y and oracle hard memlock Y needs to be set in /etc/security/limits.conf .Here Y is size of Huge pages memory pool in KB.  So for SGA of 8192 MB for whose number of Huge Pages came to be 4102 in above calculation in 1. it would  be 2*1024*4102 = 8400896. So add parameters as below and check its effectivness by ulimit -l after log off/ login
#### snippet of file /etc/security/limits.conf #######

oracle soft memlock  8400896
oracle hard memlock  8400896

 Check Huge Pages are being used by Oracle :
Check number of Huge Pages which should not be 0 now and check for free number of Huge pages by command: grep -i Page /proc/meminfo It should not be high.

--------------You are done ------------

You will also notice the reduced Page Table Size from output of above command. If your system allows you can benchmark before and after configuring Huge pages.


Another note of caution:
If you are system is very low on memory by configuring hugepages you are always grabbing memoy's defined portion and so free space may be low if you are short of free memory. So your PGA or any other processes may system may go for swapping. Anyway SGA will never be swapped. So make sure there are enough free memory in system after Hugepages have been allocated.


I first used huge pages in 2009 on 10.2.0.4 database It was Dataware house with 30GB SGA but there were approx only 25 concurrent sessions but memory foot print of page table was much less than other DB servers with similar configuration and I was happy though I did not have any bench mark as this Prod system 24*7 was build from scratch and there was no outage.

If you are using virtualized environment and you want more free memory you can set it for small SGA and fewer connections as well. I tested it with 1.4GB SGA and 32 connection in each 3 RAC instances and it saved me memory approx 70MB in each node.

You are wondering Whether Oracle EXADATA is equiped with pre configured Huge Pages. No it does not want because different clients may have different SGA sizing need depending on DB nature OLTP/Dataware house so it does not.

When you not want Huge Pages: If SGA is small or very few dedicated connections or many instances on same host

Best Linux I/O Scheduler(elevator) for Oracle database

There is no single answer for this question but it is easy to answer it depends on your workload.  Beginning from RHEL 4 (Completely Fair Queuing) scheduler is default for all RHEL flavors replacing default anticipatory scheduler and it is good change indeed as anticipatory scheduler was good only for slower disks and it did not go very well with swapping. 

  • But Oracle Enterprise Linux has chosen deadline scheduler as default scheduler for its kernel. Deadline scheduler tends to favor read more than than write unlike CFQ scheduler which treats both read/write as equal priority. And It is considered good for heavy read intensive operations like Data ware house databases but it can go good with OLTP databases also. I would recommend to tweak its disk write timeout attribute and read/write priority to be set equal. 

  • If you are using virtual machine then NOOP(no operation) scheduler is best for you as reordering and merging of disk I/O according to disk sectors etc all is taken care by your Virtual host in most of cases. Similarly NOOP is best for SAN storage for same reasons. Another advantages is NOOP scheduler works on basic elevator algorithm FIFO and consumes least CPU.

  • If you are using Solid sate disks also then NOOP is the only option to you if you are are on versions prior to RHEL 6.[ did not get opportunity to test it ]

I tested my 3 node RAC database test workload on virtual machines with three VDI disks on three different physical disks (equal read and write and I found CFQ and NOOP schedulers) doing better than Deadline and NOOP better than CFQ. But performance of CFQ was consistent more than NOOP. { ofcourse all three RAC nodes had same schedulers ]

It is very easy to change scheduler just place elevator=cfq, or elevator= deadline or elevator=noop  or elevator=ancp in /etc/grub.conf file in kernel you want to boot with and reboot system.

#### snippet of grub.conf to  add elevator=deadline to use deadline I/O scheduler for all disks ###

title Red Hat Enterprise Linux Server (2.6.18-8.el5)
        root (hd0,0) 
        kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/sda2 elevator=deadline
        initrd /initrd-2.6.18-8.el5.img
   Another option from RHEL 5 is you can change it on fly and for specific disks. COOL. so depending on different needs or disk types you can choose different scheduler for different disks. For e.g. if your Linux sever is running Apache server and databases both and both placed on different disks then you may use cfq for apache while deadline for Oracle database and noop for SSD disks.

e.g. If you want noop to be used for disk sdc then you can do this on fly as below:

 echo noop > /sys/block/sdc/queue/scheduler 

Similarly you check  value of above parameter to see what elevator is being used for specific disk device.

In nutshell you need to test system beginning with with theoretically good scheduler setting for each disks for your workload and decide which scheduler gives you best performance.

Add processor/core in physical/ virtual Linux machine

This look very trivial though it is simple but sure not trivial for non Linux expert so here I'm with my experience. If your Linux machine had only single CPU(or CPU with single Core) or you assigned it only 1 CPU and 1 core if it is virtual machine while installing Linux then installer installs NON SMP kernel so if you want too add new processor or add core in virtual machine then you must install SMP KERNEL and configure grub boot loader to use SMP.

1) add processor
2) install kernel-smp rpm
3) It will make grub appear as below you need to change highlighted as "replace 'nosmp' by 'smp' and 'noapic' by 'apic'  for line .ELsmp in below /etc/grub.conf "
4) optionally you can change default 1 to default 0 so that Linux boots with kernel-smp by default

[root@node2 ~]# uname -a
Linux node2.localdomain 2.6.9-55.0.0.0.2.ELsmp #1 SMP Wed May 2 14:59:56 PDT 2007 i686 i686 i386 GNU/Linux
[root@node2 ~]# cat /proc/cpuinfo
processor       : 0


[root@node2 ~]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda5
#          initrd /initrd-version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Enterprise Linux Enterprise Linux AS (2.6.9-55.0.0.0.2.ELsmp)
        root (hd0,0)
        kernel /vmlinuz-2.6.9-55.0.0.0.2.ELsmp ro root=LABEL=/ rhgb quiet divider=10 clock=pit nosmp noapic nolapic
        initrd /initrd-2.6.9-55.0.0.0.2.ELsmp.img
title Enterprise (2.6.9-55.0.0.0.2.EL)
        root (hd0,0)
        kernel /vmlinuz-2.6.9-55.0.0.0.2.EL ro root=LABEL=/ rhgb quiet divider=10 clock=pit nosmp noapic nolapic
        initrd /initrd-2.6.9-55.0.0.0.2.EL.img
[root@node2 ~]# vi /etc/grub.conf
[root@node2 ~]# init 6

[root@node2 ~]#
login as: root
root@192.168.174.103's password:
Last login: Wed Jun  4 10:48:07 2014 from 192.168.174.1
[root@node2 ~]#  cat /proc/cpuinfo
processor       : 0
..

processor       : 1
..
processor       : 2
..
processor       : 3
..

[root@node2 ~]# uname -a
Linux node2.localdomain 2.6.9-55.0.0.0.2.ELsmp #1 SMP Wed May 2 14:59:56 PDT 2007 i686 i686 i386 GNU/Linux

Performance Tuning Linux Virtual machine on VMWARE, Oracle Virtual box and Oracle VM for performance testing

Performance testing is generally not suggested on Virtualized machine. But if we  allocate resources properly, create test cases properly and evaluate performance accordingly then it is fairly good to go for virtualized machines. Since virtualization is slow and we may not always have best HW(cost matters) we may need to  tune the virtual machines and their operating systems very much.

If you want to build up virtual performance testing setup here are the check lists and steps for Oracle Virtual box, VMware and Oracle VM tuning so that you get maximum of available Hardware and software. Most of the suggestions I've tested practically.

Check List : 

1. If using Hardware virtualized machine HWM or HWM with paravirtualized drivers then

A) Does your processor supports HW virtualization of (VT-X feature, most do) and your CPU has physical virtualization enabled.

B) Does your processor supports HW virtualizated I/O  (VT-D feature),quite new HW feature(improves I/O tremendously) and your CPU has enabled it.

C) Does your processor supports nested paged table(most do) and your Hyper-visor is using it.

D) Have you installed the necessary add on services like VBOX add on or VMWARE tools.

E) Are you using paravirtualized Ethernet cards like VMXNET on vmware or Paravirtualized network- vitrio-net instead of Intel Pro in case of Oracle virtual box.

F) Have you checked which I/O scheduler is best for you. Most of the hyper-visors like VMWARE ESX-i takes care of disk I/O submission so NOOP gives best performance with less CPU overhead.

G) Make sure you are not over committing memory or processors than available, which is allowed by some virtualization like VMWARE.

2) A) If using pure paravirtualized machine then is your kernel uptodate.

B) If required have you disabled the HW virtualization supported by processor in BIOS.

C) Are you monitoring virtual machine from metal-ware i.e. Dom0 using specialized commands xentop etc in Oracle VM server.

3) If using Inetl i7 then disable hyper threading as hyper threads are actual not core physical Arithmetic and Logical units and virtual box performance slows down due it. Intel i5 may give performance as good as i7


Tune GUEST :

- In order to save resources are you running your Linux in run-level 3 or without x-window.

- remove unnecessary packages

- use virtual disks with fixed storage unless space is issue.

- Have you disabled the services not required.

- Instead of creating many disks under many controllers create few virual disks under few controllers ,preferably on separate physical hard disks. If using Virtual Box you can change mother board type to ACHI

- Have you tuned your file system( like ext4 or removing atime attribute ) and using the one offering best performance and less overheads[ Be aware of its crash and recovery as well ]

- when not required please put Virtual machines GUI in background[ not possible in Oracle Virtual box]

- If using Virtual Box then make sure you are using appropriate disk controller. SATA disk controller has advantage of less overhead while IDEL controller can leverage the DISK caching. Use SCSI only when you are in need to match it to your prod system you need to simulate.

- If you have enabled the disk caching then in abrupt termination of machine there is high chance of DB corruption so be ready with recovery solutions.

- Make sure there be fewer paging and no swapping at all in Guest. Anticipatory I/O scheduler does not go well with swapping. Make sure you are not using this one though this is the case only with older kernel say 2.4.1  Swapping at host level may be better than swapping at GUEST so may be over-committing memory better in few cases.

- If Oracle SGA is large say 4GB and many concurrent sessions say 100 then seriously consider using huge pages but do not pre-page SGA. Make sure whole SGA fits into Huge pages pool else it will rather slow down. Please monitor system for a good duration after setting up. Disable transparent Huge pages RHEL 6.
 It is not helpful. Please see post : Configure Huge Pages on Linux

- if using Oracle VM then increase VM metal-ware memory from default 512MB to 1024MB.

- If using Paravirtualized machine and RHEL then change I/O scheduler from CFQ to DEADLINE. You can changed write time-out of deadline scheduler attribute.

- If you installed Linux originally with 1 CPU and adding CPUs later it after then you need to install kernel-smp package also and use apic and smp switch in /etc/grub.conf .  Most of the cases single processors or two processors [ or two cores ]  out performs the four processors [ or four core ] due minimized context switching.
 
- Snapshots slows down the performance due required extra maintenance of machine state so make sure this is disabled while performance testing.

- Try to use less colors say 16 colors  and minimize the video memory say from 16MB to 8MB.

- use large pages(not the OS one ) in Oracle Virtual box. Increase it from command line using vboxsrvc command.  It can not be increased from GUI. Please read manual.

- Use appropriate kernel network parameters like default and maximum send and receive buffer size.

- Decrease the ticker frequncy  by adding divider=10 in /etc/grub.conf boot loader for corresponding kernel line. RHEL 6 is tickless so not required for that.


- OEL RHEL compatible kernel offers slightly better processor speed 3% in single task and 1% in multi tasking than OEL-UEK (not sure why - due processor scheduler or any reason) but it offers sligjly less performance than OEL UEK kernel (even though both schedulers are kept same deadline for testing). So you can test which one suits your CPU/I-O

 - If using performance testing then use CPU affinity to assign CPU to each node according to capacity so that if respective performance of nodes or cluster has to be checked then CPU's usage should be correct. Avoid CPU over commit as well.

 - Do not add many virtual hard disks if it is on same physical box or  it is not essential for test  as doing so will increase virtualization overhead.  If Virtual machine freezes under heavy I/O then consider increasing host memory and guest memory.   In such cases you will get warning like 'ATA disk waits exceed 61 secsetc.'

 - Few paging can be tolerated but swapping should not be. Increase Linux VM parameter to increase unit of swapped pages in single call which is logarithmic(natual).

- if You disk freezes(too slow I/O)  [confirmed by Virtual machine log reporting too much disk time warning for e.g. Virtual box then detach disks,readd them in different controller with changed caching and then add back to original controller.Else machine will continue to freeze even after reboot ]

- Some versions of Oracle has mutex bugs- manly due process scheduling issue which causes significant CPU wait- make sure you are not being hit by same.



--- Read manual of virtual machine provide and OS Tunning

-- Just for manageability : UEFI linux does not go well with Windows 7 with dual boot for want of signing boot-loader for security so when installing Linux make sure you does not boot from UEFI disk.

change host name in linux

Host name is defined in file /etc/sysconfig/network  in linux ,so edit this file
1. vi /etc/sysconfig/network

2.  NETWORKING=yes
    HOSTNAME= NewHostname.localdomain

3. save

4. reboot

5. after reboot run the command hostname to check new hotname is in effect

-bash: cd: /media/sf_ : Permission denied mount host shard folder in oracle virtual box

Error:   -bash: cd: /media/sf_vmshare: Permission denied

Created a host folder as shared directory in Oracle Virtual box and specified auto mount option. When non root user tried to access thsi directoty above error -bash: cd: /media/sf_vmshare: Permission denied was returned. Remedy was to create a directory in that non root user and mount the shared hsot directory in that directory.  Ofcourse first the auto mount directory has to be dismounted.

E
[oracle@node1 ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5              13G  7.1G  5.0G  59% /
tmpfs                 1.2G  223M  907M  20% /dev/shm
/dev/sda1              73M   29M   41M  41% /boot
/dev/sda2            1008M  260M  698M  28% /tmp
vmshare               1.7T  193G  1.5T  12% /media/sf_vmshare
[oracle@node1 ~]$ cd /media/sf_vmshare
-bash: cd: /media/sf_vmshare: Permission denied

REMEDY:

 [oracle@node1 ~]$ mkdir ~/vmshare
[oracle@node1 ~]$ su - root
Password:
[root@node1 ~]# umount vmshare
[root@node1 ~]# mount -t vboxsf   vmshare  /home/oracle/vmshare/
[root@node1 ~]# exit
logout
[oracle@node1 ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5              13G  7.1G  5.0G  59% /
tmpfs                 1.2G  223M  907M  20% /dev/shm
/dev/sda1              73M   29M   41M  41% /boot
/dev/sda2            1008M  260M  698M  28% /tmp
vmshare               1.7T  193G  1.5T  12% /home/oracle/vmshare/
[oracle@node1 ~]$ cd /home/oracle/vmshare/
[oracle@node1 vmshare]$ touch abc

Create local yum repository in rhel 6.4

resolving pckages dependency in packages installation via yum is lot easier than installing packages from plain rpm command. Here are simple steps to create a local yum repository pointing to rhel 6.4 dvd contents copied to file system. Same steps can be applied for creating yum repository pointing to DVD drive.

1. Copy all linux dvd media into a directory say  /rhel6.4_media

2. install package createrepo

cd /rhel6.4_media/ Packages/
rpm -ivh deltarpm*
rpm -ivh python-deltarpm*
rpm -ivh createrepo*.rpm

3. create file  /etc/yum.repos.d/localrepo.repo with below content

[localrepo]
name=Unixmen Repository
baseurl=file:///rhel6.4_media
gpgcheck=0
enabled=1

3. create local repository

createrepo -v  /rhel6.4_media/
yum clean all
yum update
yum repolist

4.  yum repolist

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
localrepo                                                                                                                                        | 2.9 kB     00:00 ...
localrepo/primary_db                                                                                                                             | 3.1 MB     00:00 ...
repo id                                                                     repo name                                                                             status
localrepo                                                                   Unixmen Repository                                                                    3,720
repolist: 3,720


this will show number of packages available under above created repository

yum is avaialable - you can search and install any packge avaialble in dvd media you copied - you do not need to worry about how to resolve dependency.

yum install glibc-devel

add new hard disk and ext4 file system in linux on oracle virtual box

1. create hdd from virtual media manager option

2. oepn settings of virtaul machine and add new hdd in sata controller

3. partition the /dev/sdb from fdisk:
    fdisk /dev/sdb1
4. create file system

 mkfs.ext4 /dev/sdb1

5. mount the new file system into newly created mount directory

  mkdir /u02
 mount /dev/sdb1 /u02

6. add entry for new mount point in /etc/fstab

/dev/sdb1 /u02 ext4 defaults 0 0
 


 

RPMS for Oracle 10g2 on 64 bit Linux

Oracle installation on 64 bit requires that certain 32bit packages also needs to be installed on system. So first of all you should be able to distinguish between a 32-bit or 64-bit package. Following rpm command can be used for this purpose.

#rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep

For example,  rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep glibc-devel
See the oracle installation documentation that comes with oracle installation disks.

For e.g. for installing Oracle 10gR2 on 64 bit RHEL 5:

Check system RPMs while installing 10gR2 on 64 bit and install RPMS using yum

rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep compat
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep binutils
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep compat-db
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep compat-libstdc++
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep control-center
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep gcc
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep gcc-c++
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep glibc
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep glibc-common
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep glibc-devel
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep glibc-headers
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep gnome-libs
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libgcc
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libaio
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libgcc
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libstdc++
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libstdc++
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libgomp
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libXp
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep make
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep pdksh
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep sysstat
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep binutils
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep compat-libstdc++
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep gcc
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep glibc
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep glibc-32bit
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep glibc-devel
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libaio
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libelf
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libgcc
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libstdc++
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libstdc++-devel
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep make
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep sysstat

avahi-compat-libdns_sd-0.6.16-6.el5 (x86_64)
binutils-2.17.50.0.6-12.el5 (x86_64)
control-center-2.16.0-16.el5 (i386)
control-center-2.16.0-16.el5 (x86_64)
libgcc-4.1.2-46.el5 (x86_64)
libgcc-4.1.2-46.el5 (i386)
glibc-2.5-42 (i686)
glibc-2.5-42 (x86_64)
glibc-common-2.5-42 (x86_64)
glibc-common-2.5-42 (x86_64)
libgcc-4.1.2-46.el5 (x86_64)
libgcc-4.1.2-46.el5 (i386)
libaio-0.3.106-3.2 (i386)
libaio-0.3.106-3.2 (x86_64)
libgcc-4.1.2-46.el5 (x86_64)
libgcc-4.1.2-46.el5 (i386)
libstdc++-4.1.2-46.el5 (x86_64)
libstdc++-4.1.2-46.el5 (i386)
libstdc++-4.1.2-46.el5 (x86_64)
libstdc++-4.1.2-46.el5 (i386)
libXpm-3.5.5-3 (x86_64)
make-3.81-3.el5 (x86_64)
binutils-2.17.50.0.6-12.el5 (x86_64)
libgcc-4.1.2-46.el5 (x86_64)
libgcc-4.1.2-46.el5 (i386)
glibc-2.5-42 (i686)
glibc-2.5-42 (x86_64)
glibc-common-2.5-42 (x86_64)
libaio-0.3.106-3.2 (i386)
libaio-0.3.106-3.2 (x86_64)
elfutils-libelf-0.137-3.el5 (x86_64)
libgcc-4.1.2-46.el5 (x86_64)
libgcc-4.1.2-46.el5 (i386)
libstdc++-4.1.2-46.el5 (x86_64)
libstdc++-4.1.2-46.el5 (i386)
make-3.81-3.el5 (x86_64)

 groupadd oinstall
 usermod -g oinstall oracle
 yum groupinstall "X Window System" "GNOME Desktop Environment"

 yum install compat-db.i386
 yum install compat-db.x86_64
 yum install compat-libstdc++-33.i386
 yum install compat-libstdc++-33.x86_64
 yum install control-center.i386
 yum install control-center.x86_64
 yum install control-center-devel.i386
 yum install control-center-devel.x86_64
 yum install gcc-c++.x86_64
 yum install gcc-c++.x86_64
 yum install gcc-c++.x86_64
 yum install glibc-devel.i386
 yum install glibc-devel.x86_64
 yum install glibc-devel.x86_64
 yum install glibc-devel.i386
 yum install compat-glibc-headers.x86_64
 yum install glibc-headers.x86_64
 yum install imake.x86_64
 yum install libaio.i386
 yum install libaio.x86_64
 yum install libaio-devel.i386
 yum install libaio-devel.x86_64
 yum install libgomp.x86_64
 yum install libstdc++
 yum install libstdc++.i386
 yum install libstdc++.x86_64
 yum install libstdc++-devel.i386
 yum install libstdc++-devel.x86_64
 yum install libstdc++-devel.x86_64
 yum install sysstat.x86_64
 yum install libXp.i386
 yum install libXp.x86_64
 yum install libXpm.i386
 yum install libXpm.x86_64
 yum install libXpm-devel.i386
 yum install libXpm-devel.x86_64
 yum install libXp-devel.i386
 yum install libXp-devel.x86_64
 yum install mutt

 yum install unixODBC-devel.x86_64

 yum install mysql-connector-odbc-3.51.26r1127-1.el5.x86_64
 yum install mysql.x86_64
 yum install mysql-server.x86_64
 make install
 yum install mysql-devel.x86_64
yum install php-mysql.x86_64
 yum provides *myodbc-installer*


See above for how to tackle the missing library error.

Now find the name of missing required rpm by command

yum provides libXt.so.6

This will give you the name of missing package. Install its 32bit or its 64 bit version of package, or both, depending on the case and go ahed! Here in this case i386 implies 32 bit version of missing package is required.  


using pen drive in linux, mount usb pen drive in linux

Now a days from RHEL 5 linux is able to auto mount the pen drive but if it is not the case then you can follow below steps to mount pen drive in linux.

Back 6 years ago , I had to transfer oracle 11g download to linux machine found ftp services were not installed and no linux cd available. luckily I had 2G pen drive and I was able to move my 2g 11g download from windows to linux.

It was no different than mounting any normal disk.

How I did :

0. created a directory /pendrive

1. When I started linux saw removable devices sercies status [OK]

2. next I gave fdisk -l and noticed the output as below.
[root@lnx2 root]# fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 172 1277167+ 82 Linux swap
/dev/sda3 173 236 514080 83 Linux
/dev/sda4 237 1305 8586742+ f Win95 Ext'd (LBA)
/dev/sda5 237 1305 8586711 83 Linux


3. now
[root@lnx2 root]# fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 172 1277167+ 82 Linux swap
/dev/sda3 173 236 514080 83 Linux
/dev/sda4 237 1305 8586742+ f Win95 Ext'd (LBA)
/dev/sda5 237 1305 8586711 83 Linux

Disk /dev/sdb: 1024 MB, 1024966656 bytes
32 heads, 63 sectors/track, 993 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 992 999813+ 6 FAT16

then noticed the difference , I found the pen drive device name

[root@lnx2 root]# mount /dev/sdb1 /pendrive


now pen drive content are loaded in this location /pendriver .

after my read from ths location and wrote all desired stuff to local hard disk but cancelled meanwhile.I tried dismounting pen drive using umount but found

[root@lnx2 root]# umount /dev/sdb1
umount: /pendrive: device is busy

I retried after a minute and got successful
[root@lnx2 root]# umount /dev/sdb1