UNIX Commands for DBAs

As DBAs that working tightly with the operation system (OS), we need to know how to query the OS and its hardware. Usually we do it before fresh install, upgrade or migration of the DB/OS. Here is the first and basic commands, Later on I will go further more.

Is my Operating System is 64-bit?

Linux:

uname -m

On 64-bit, you will get:

x86_64

On 32-bit, you will get:

i686 or similar

HP:

getconf KERNEL_BITS

Solaris:

/usr/bin/isainfo –kv

On 64-bit, you will get:

64-bit sparcv9 kernel modules

On 32-bit, you will get:

32-bit sparc kernel modules

Checking whether current oracle installation is 32-bit or 64-bit.

file $ORACLE_HOME/bin/oracle

Linux:

On 64-bit, you will get:

oracle: setuid setgid ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), not stripped

On 32-bit, you will get:

oracle: setuid setgid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped

HP:

On 64-bit, you will get:

oracle:         ELF-64 executable object file - IA64

or

oracle:         ELF-64 executable object file - PA-RISC 2.0 (LP64)

Sun:

On 64-bit, you will get:

oracle:         ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped

On 32-bit, you will get:

oracle: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped

Display number of CPU’s:

Linux:

cat /proc/cpuinfo|grep processor|wc -l

HP:

ioscan -fkn -C processor|tail +3|wc -l

Solaris:

psrinfo -v|grep "Status of processor"|wc –l
psrinfo -v|grep "Status of processor"|wc –l
lscfg -vs|grep proc | wc -l

Comments

Popular posts from this blog

Fixing & Registering ORACLE_HOMES in Central Inventory

Export in Pl/Sql via DBMS_DATAPUMP