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.
Table of Contents
AIX commands for Oracle DBA
What’s inside
- Check AIX version and server details
- CPU and memory commands
- Paging (swap) space commands
- Disk and filesystem commands
- Process commands
- Oracle user limits and settings
- Network commands
- Logs and error checking
- Performance monitoring tools
- Handy commands for Oracle patching and installs
- FAQ
1. Check AIX version and server details
| Command | What it does |
|---|---|
oslevel -s | Shows AIX version, Technology Level (TL) and Service Pack (SP) |
uname -a | Shows host name and OS details |
prtconf | Shows full hardware details (CPU, memory, firmware) |
bootinfo -K | Shows kernel bit mode (64 means 64-bit) |
lparstat -i | Shows LPAR details: entitled CPU, memory, mode |
hostname | Shows 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
| Command | What it does |
|---|---|
lsattr -El sys0 -a realmem | Shows total RAM |
vmstat 2 5 | Shows CPU, memory and paging every 2 seconds, 5 times |
svmon -G | Shows overall memory usage |
lparstat 2 5 | Shows CPU usage of the LPAR |
mpstat 2 5 | Shows CPU usage per logical CPU |
sar -u 2 5 | Shows 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 systemid= 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
| Command | What it does |
|---|---|
lsps -a | Shows paging space size and usage |
lsps -s | Shows 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
| Command | What it does |
|---|---|
df -g | Shows filesystem size and free space in GB |
du -sg /u01/app/oracle/* | Shows how much space each folder uses |
lsvg | Lists volume groups |
lsvg -l datavg | Lists logical volumes in a volume group |
lspv | Lists physical disks |
lsfs | Lists filesystems |
iostat -Dl 2 5 | Shows disk activity and response times |
lsattr -El hdisk4 | Shows 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
| Command | What it does |
|---|---|
ps -ef | grep pmon | Shows running Oracle instances |
ps -ef | grep tnslsnr | Shows the listener process |
ps -fu oracle | Shows all processes of the oracle user |
topas | Live view of CPU, memory, disk and top processes |
kill -9 <pid> | Force-kills a process (use carefully) |
ps aux | sort -rn +2 | head -10 | Shows 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
| Command | What it does |
|---|---|
ulimit -a | Shows limits for the current user |
lsuser -a fsize data stack nofiles oracle | Shows limits set for the oracle user |
lsattr -El sys0 -a maxuproc | Shows the maximum processes per user |
chdev -l sys0 -a maxuproc=16384 | Changes the maximum processes per user (as root) |
id oracle | Shows the user and group IDs of oracle |
lsgroup ALL | Lists 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
| Command | What it does |
|---|---|
ifconfig -a | Shows IP addresses and network interfaces |
netstat -in | Shows interface statistics and errors |
netstat -an | grep 1521 | Shows listener port connections |
ping <host> | Tests whether a server is reachable |
nslookup <host> | Checks DNS name resolution |
no -a | Shows all network tuning options |
entstat -d en0 | Shows 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
| Command | What it does |
|---|---|
errpt | Shows the AIX error report (hardware, disk, memory errors) |
errpt -a | more | Shows detailed error entries |
errpt -d H | Shows hardware errors only |
alog -o -t boot | Shows the boot log |
tail -100f alert_ORCL.log | Follows 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
| Tool | Use |
|---|---|
topas | Quick live overview |
nmon | Detailed monitoring and graphs (can save data to a file) |
vmstat | Memory and CPU |
iostat | Disk I/O |
sar | History of CPU and I/O |
svmon | Memory per process |
tprof | Finds 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 <pid>
10. Handy commands for Oracle installation and patching
| Command | What it does |
|---|---|
lslpp -l bos.adt.base | Checks if an AIX fileset is installed |
lslpp -L | grep xlC | Checks the xlC runtime filesets |
slibclean | Clears unused shared libraries from memory (run as root before patching) |
genld -l | grep <oracle_home> | Finds processes still using Oracle libraries |
fuser -cu /u01 | Shows which processes use a filesystem |
installp -aXYd /path <fileset> | Installs a fileset |
smitty | Menu-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.