Useful AIX Commands for Oracle DBA: Easy Cheat Sheet

If your Oracle database runs on IBM AIX, you need to know a few operating system commands. A slow database is often a CPU, memory, disk or network problem, not an Oracle problem. This guide lists the most useful AIX commands for Oracle DBAs, in simple words, with examples you can copy and use today.

AIX commands for Oracle DBA

What’s inside

  1. Check AIX version and server details
  2. CPU and memory commands
  3. Paging (swap) space commands
  4. Disk and filesystem commands
  5. Process commands
  6. Oracle user limits and settings
  7. Network commands
  8. Logs and error checking
  9. Performance monitoring tools
  10. Handy commands for Oracle patching and installs
  11. FAQ

1. Check AIX version and server details

CommandWhat it does
oslevel -sShows AIX version, Technology Level (TL) and Service Pack (SP)
uname -aShows host name and OS details
prtconfShows full hardware details (CPU, memory, firmware)
bootinfo -KShows kernel bit mode (64 means 64-bit)
lparstat -iShows LPAR details: entitled CPU, memory, mode
hostnameShows server name

bash

oslevel -s
# Example output: 7300-01-02-2320

Why it matters: Oracle’s installation and patch requirements depend on the AIX level, so always check it first.


2. CPU and memory commands

CommandWhat it does
lsattr -El sys0 -a realmemShows total RAM
vmstat 2 5Shows CPU, memory and paging every 2 seconds, 5 times
svmon -GShows overall memory usage
lparstat 2 5Shows CPU usage of the LPAR
mpstat 2 5Shows CPU usage per logical CPU
sar -u 2 5Shows CPU utilisation

bash

vmstat 2 5

How to read vmstat quickly:

  • us = CPU used by user programs (Oracle shows up here)
  • sy = CPU used by the system
  • id = idle CPU (low value means a busy CPU)
  • wa = CPU waiting on I/O (a high value points to a disk problem)
  • pi / po = pages in/out of paging space (should stay close to zero)

3. Paging (swap) space commands

CommandWhat it does
lsps -aShows paging space size and usage
lsps -sShows a summary of paging space used

bash

lsps -s

Tip: If paging space usage keeps growing, the server is short of memory. Oracle SGA and PGA settings may need review, and heavy paging slows the database badly.


4. Disk and filesystem commands

CommandWhat it does
df -gShows filesystem size and free space in GB
du -sg /u01/app/oracle/*Shows how much space each folder uses
lsvgLists volume groups
lsvg -l datavgLists logical volumes in a volume group
lspvLists physical disks
lsfsLists filesystems
iostat -Dl 2 5Shows disk activity and response times
lsattr -El hdisk4Shows disk attributes

bash

df -g /u01 /u02 /tmp
iostat -Dl 2 5

Why it matters: A full filesystem such as /u01, /tmp or the archive log location can stop the database. Check the free space regularly.

Find large files fast:

bash

find /u01/app/oracle -type f -size +1000000 -exec ls -l {} \;

5. Process commands

CommandWhat it does
ps -ef | grep pmonShows running Oracle instances
ps -ef | grep tnslsnrShows the listener process
ps -fu oracleShows all processes of the oracle user
topasLive view of CPU, memory, disk and top processes
kill -9 <pid>Force-kills a process (use carefully)
ps aux | sort -rn +2 | head -10Shows the top 10 CPU-using processes

bash

ps -ef | grep pmon | grep -v grep

Tip: Never use kill -9 on Oracle background processes such as pmon or smon. Use shutdown abort from SQL*Plus if the database must be stopped.


6. Oracle user limits and settings

CommandWhat it does
ulimit -aShows limits for the current user
lsuser -a fsize data stack nofiles oracleShows limits set for the oracle user
lsattr -El sys0 -a maxuprocShows the maximum processes per user
chdev -l sys0 -a maxuproc=16384Changes the maximum processes per user (as root)
id oracleShows the user and group IDs of oracle
lsgroup ALLLists all groups

bash

su - oracle
ulimit -a

Why it matters: Wrong limits cause errors like “too many open files” or “unable to fork process”. Oracle recommends unlimited values for fsize, data, stack, rss and cpu, and nofiles of at least 65536.


7. Network commands

CommandWhat it does
ifconfig -aShows IP addresses and network interfaces
netstat -inShows interface statistics and errors
netstat -an | grep 1521Shows listener port connections
ping <host>Tests whether a server is reachable
nslookup <host>Checks DNS name resolution
no -aShows all network tuning options
entstat -d en0Shows detailed Ethernet adapter statistics

bash

netstat -an | grep 1521

Tip: Count connections to the listener port to see how many clients are connected.


8. Logs and error checking

CommandWhat it does
errptShows the AIX error report (hardware, disk, memory errors)
errpt -a | moreShows detailed error entries
errpt -d HShows hardware errors only
alog -o -t bootShows the boot log
tail -100f alert_ORCL.logFollows the Oracle alert log live

bash

errpt | head -20

Why it matters: If the database has random crashes or I/O errors, check errpt first. Disk, adapter or memory faults show up here, often before Oracle reports them.


9. Performance monitoring tools

ToolUse
topasQuick live overview
nmonDetailed monitoring and graphs (can save data to a file)
vmstatMemory and CPU
iostatDisk I/O
sarHistory of CPU and I/O
svmonMemory per process
tprofFinds which programs use the most CPU

Run nmon and save data for later analysis:

bash

nmon -f -s 10 -c 360

This collects data every 10 seconds, 360 times (one hour), and writes an .nmon file you can open with the nmon Analyser spreadsheet.

Check memory used by one Oracle process:

bash

svmon -P &lt;pid>

10. Handy commands for Oracle installation and patching

CommandWhat it does
lslpp -l bos.adt.baseChecks if an AIX fileset is installed
lslpp -L | grep xlCChecks the xlC runtime filesets
slibcleanClears unused shared libraries from memory (run as root before patching)
genld -l | grep <oracle_home>Finds processes still using Oracle libraries
fuser -cu /u01Shows which processes use a filesystem
installp -aXYd /path <fileset>Installs a fileset
smittyMenu-based system administration tool

bash

/usr/sbin/slibclean

Tip: slibclean helps to avoid the “text file busy” error during Oracle patching on AIX.


Quick daily health check script

Save this as aix_health.sh and run it before or after maintenance:

bash

#!/bin/ksh
echo "=== Date ==="; date
echo "=== OS Level ==="; oslevel -s
echo "=== Uptime ==="; uptime
echo "=== Filesystems ==="; df -g
echo "=== Paging ==="; lsps -s
echo "=== CPU/Memory ==="; vmstat 2 3
echo "=== Oracle processes ==="; ps -ef | grep -E "pmon|tnslsnr" | grep -v grep
echo "=== Recent errors ==="; errpt | head -10

Make it executable with chmod +x aix_health.sh and run ./aix_health.sh.


11. FAQ

Which AIX command shows memory usage?

Use svmon -G for overall memory and vmstat 2 5 for live memory and paging activity.

How do I check free disk space on AIX?

Run df -g. It shows the size and free space of each filesystem in GB.

How do I check if the Oracle database is running on AIX?

Run ps -ef | grep pmon. If you see ora_pmon_<SID>, the instance is running.

What is the AIX equivalent of the Linux top command?

Use topas or nmon.

How do I check AIX errors?

Run errpt for the error summary and errpt -a for details.

What is slibclean and why do Oracle DBAs use it?

It removes unused shared libraries from memory. Running it before patching prevents “text file busy” errors.

Conclusion

These AIX commands for Oracle DBAs cover most daily checks: system level, CPU, memory, disk, processes, network and error logs. Bookmark this page and share it with your team. If you want more guides like this, read our related posts:

Have a command you use every day? Add it in the comments.

Leave a Comment