AIX commands

aix-commands

AIX has a vast array of aix commands that enable you to do a multitude of tasks. Depending on what you need to accomplish, you use only a certain subset of these commands. These subsets differ from user to user and from need to need.

Underneath are a few core aix commands that are commonly used.

How do I find my system serial number?

aix commands:

# prtconf | egrep “System Model|Serial Number”
System Model: IBM,9111-520
Machine Serial Number: 65xxxxxxx

How do I find out which version of AIX I am running?

aix commands:

# oslevel -s
6100-07-05-1228

The first four digits are the major release e.g. AIX 6.1
The next two digits denote the TL (Technology Level) e.g TL07
The third set of digits are the SP (Service Pack) e.g. SP05
The final four digits are the (US format) date of this release eg. 28th December

How many disks do I have?

aix commands:

# lspv
hdisk1 004ce4cf0ff6d5c6 rootvg active
hdisk2 00c9b8fa3120beb9 rootvg active
hdisk0 004ce65e242273d3 datavg active
hdisk3 004ce4cf1e6fcd31 datavg active

You can see from this example that the system has four physical disk/LUNs and they are assigned to two Volume Groups (rootvg and datavg). Every system has a “rootvg” as this is where AIX is installed, and the system is booted from.

A VG (Volume Group) is a local disk (AKA. PLEX) which can consist of one or more disks or LUNs. The disks do not need to be the same size unless they are used for mirroring. VGs enable files to be spread across multiple disks (AKA Physical Volumes or PVs). Here we will write down some useful aix commands:

How large are the disks?

aix commands:

# lspv | awk ‘{print $1}’ | while read D
> do
> print “$D: $(bootinfo -s $D) MB”
> done
hdisk2: 70006 MB
hdisk3: 70006 MB
hdisk0: 70006 MB
hdisk4: 70006 MB

How free space do I have?

aix commands:

# lsvg | lsvg -i | egrep “GROUP|FREE”
VOLUME GROUP: rootvg VG IDENTIFIER: 00c9c8fb00004c0000000132da76b3ae
MAX LVs: 256 FREE PPs: 267 (34176 megabytes)
VOLUME GROUP: datavg VG IDENTIFIER: 00c9c8fb00004c000000013a8c97f698
MAX LVs: 256 FREE PPs: 114 (14592 megabytes)

How much memory do I have?

aix commands:

# lsattr -El mem0
ent_mem_cap I/O memory entitlement in Kbytes False
goodsize 7744 Amount of usable physical memory in Mbytes False
mem_exp_factor Memory expansion factor False
size 7744 Total amount of physical memory in Mbytes False
var_mem_weight Variable memory capacity weight False

How many processors do I have?

aix commands:

# prtconf | grep -i proc
Processor Type: PowerPC_POWER5
Processor Implementation Mode: POWER 5
Processor Version: PV_5
Number Of Processors: 2
Processor Clock Speed: 1499 MHz
Model Implementation: Multiple Processor, PCI bus
+ proc0 Processor
+ proc2 Processor

How much paging space do I have?

aix commands:

# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
paging00 hdisk4 backupvg 1024MB 1 yes yes lv 0
hd6 hdisk2 rootvg 1024MB 1 yes yes lv 0

Which devices does the machine boot from?

aix commands:

# bootlist -om normal
hdisk2 blv=hd5 pathid=0
cd0

What are the most recent error messages?

aix commands:

# errpt | head
IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
A6DF45AA 0120072314 I O RMCdaemon The daemon is started.
D221BD55 0120071814 I O perftune RESTRICTED TUNABLES MODIFIED AT REBOOT
CE9566DF 0120071714 P H ent6 TOTAL ETHERCHANNEL FAILURE
2BFA76F6 0120071714 T S SYSPROC SYSTEM SHUTDOWN BY USER
9DBCFDEE 0120071714 T O errdemon ERROR LOGGING TURNED ON
192AC071 0117153714 T O errdemon ERROR LOGGING TURNED OFF
A6DF45AA 0117075214 I O RMCdaemon The daemon is started.
D221BD55 0117074714 I O perftune RESTRICTED TUNABLES MODIFIED AT REBOOT
CE9566DF 0117074714 P H ent6 TOTAL ETHERCHANNEL FAILURE

When was the system last shutdown and/or rebooted?

aix commands:

# last | egrep “reboot|shutdown” | head
reboot ~ Jan 20 07:18
shutdown lft0 Jan 17 15:38
reboot ~ Jan 17 07:47
shutdown lft0 Jan 16 20:01
reboot ~ Jan 16 07:30
Which subsystems are active?

# lssrc -a
Subsystem Group PID Status
platform_agent 3211384 active
tlmagent 3473530 active
cimsys 3407986 active
snmpd tcpip 3604604 active

…..
..
IBM.ServiceRM rsct_rm 6946932 active
IBM.AuditRM rsct_rm 8650766 active
qdaemon spooler inoperative
writesrv spooler inoperative
lpd spooler inoperative
keyserv keyserv inoperative
ypbind yp inoperative
llbd iforncs inoperative…

Which packages are installed?

aix commands:

# lslpp -l | more
Fileset Level State Description
—————————————————————————-
Path: /usr/lib/objrepos
DirectorCommonAgent 6.3.0.3 COMMITTED All required files of Director
Common Agent, including JRE,
LWI
DirectorPlatformAgent 6.3.0.1 COMMITTED Director Platform Agent for
IBM Systems Director on AIX
Firefox.base.adt 3.5.8.0 COMMITTED Firefox Development Tools
Firefox.base.rte 3.5.8.0 COMMITTED Firefox Web Browser
….
..

System Scan AIX is designed to be help you understand how your system was build and to look at highlight potential issues. The software analyse your system as close to “Zero Footprint” as possible and provides you with recommendations for improvement.

In summary System Scan AIX is unique because it is more concerned with how the actual OS has been built and configured, and potential security and performance problems that may not even be included in your policies or practices, thus enabling you to actually improve the way you work now and in the future.

Contact BlueFinch by filling in the form on the right.