Contents of Boot Logical Volume
Contents of Boot Logical Volume
Boot
AIX Boot process
Contents of Boot Logical Volume (/dev/hd5)
How to change the current Boot device order
Viewing AIX Boot and console Logs
Boot and console messages can be used to identify and fix problems. These messages are automatically stored
on disk by AIX. To view the stored messages, use the alog command. Here are a couple examples of the alog
command:
# alog -L
boot
bosinst
nim
console
cfg
dumpsymp
# alog -L -t boot
file:size:verbosity
/var/adm/ras/bootlog:131072:1
AIX FAQ Page 2 of 50
Devices
Device configuration Database
Listing the installed and supported devices (lsdev)
Listing the system configuraion and Vital product data of devices (lscfg)
Listing the device attributes (lsattr)
Change the attributres of devices (chdev)
Configuring new devices (cfgmgr)
Make device files (mkdev)
Removing devices from system (rmdev)
To manually add a device to the system (mkdev)
To Find the boot informations, Disk Size, Kernel bits etc.. (getconf)
To display sytem configuration information (prtconf)
Device informations are stored in ODM. There are two device configuratoin databases in AIX
Predefined Database contains data for all the supported devices based on the system configuration.
Customized Database contains configuration database for all currently defined and configured
(available) devices.
lsdev
# lsdev -C
To display configuration and vital product data (VPD) about the system
lscfg
# lscfg -v
To find out the WWN, FRU #, firmware level of fibre adapter fcs0
lsattr
Examples:
To find out the possible media_speed values for ethernet card ent0
AIX FAQ Page 4 of 50
chdev
-l <device name>
-a <attribute=new_value>
-T to change the value temporarily
-P to make the change permanent after reboot if the
device is currently in use and can not be changed
To change the SCSI ID of adapter scsi0 that cannot be changed made unavailable due to available disk drives
connected to it
rmdev
# rmdev -l (device)
# rmdev -l (device) -d
To delete the scsi adapter scsi0 and all its child devices
mkdev
-d define
-c class
-l <logical device name>
-p parent name
-s subclass
-t type
Examples:
# mkdev -l rmt0
cfgmgr configures devices and optionally installs device software by running the programs specified in the
Configuration Rules object class.
cfgmgr
#cfgmgr
AIX FAQ Page 6 of 50
# cfgmgr -l fcs0
# cfgmgr -i /tmp/drivers
getconf, bootinfo commands can be used to collect the system configuration variable values such as kernel bit,
hardware bit, boot device, real mem present, disk size etc... bootinfo command is not supported on Aix V5.2
onwards.
# bootinfo -s hdiskx ----> to find out the size of the hard drive
prtconf command displays system Configuration information. If run without any flags, it displays the system
model, machine serial, processor type, number of processors, processor clock speed, cpu type, total memory
size, network information, filesystem information, paging space information, and devices information
Flags:-
Examples:-
# prtconf -c
CPU Type: 64-bit
# prtconf -m
Memory Size: 4096 MB
# prtconf -s
Processor Clock Speed: 1654 MHz
# prtconf
System Model: IBM,9119-595
Machine Serial Number: 02898EB
Processor Type: PowerPC_POWER5
Number Of Processors: 2
Processor Clock Speed: 1654 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 5 sapnims
Memory Size: 4096 MB
Good Memory Size: 4096 MB
Platform Firmware level: Not Available
Firmware Version: IBM,SF235_209
Console Login: enable
Auto Restart: true
Full Core: false
Network Information
Host Name: sapnims
IP Address: 10.253.1.24
Sub Netmask: 255.255.255.0
Gateway: 10.253.1.253
Name Server: 128.137.24.4
Domain Name: gene.com
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 546 1 00..00..00..00..01
hdisk1 active 546 1 00..00..00..00..01
.......................
.......................
......................
backup
Restore files backed-up using mksysb/backup commands
mksysb
Creates an installable image of the root volume group either in a file or on to a bootable tape
Bootable tape is created in backup format
Can be restored individual files/directories using restore command
mksysb
1. Boot image
2. bosinstall image (image.data, bosinst.data, tapeblksz, etc..)
3. An empty table of contents
4. System Backup Image in Back up format
/bosinst.data file contains answer for questions during installation time such as Console name, Installation
methode, locale seetings, etc.. If there is no /bostinst.data file present, then a sample file
/usr/lpp/bosinst/bosinst.template is copied as /bosinst.data during backup process.
/image.data file contains logical volume and filesystem information of root volume group which is used by
BOS install for creating target rootvg. If you want to create a custom image.data file, create the file using
mkszfile, modify the file as per your requirement and call the mksysb command without -i option.
Examples:
# mksysb -i /dev/rmt0
# mksysb -i -e /dev/rmt0
# mksysb /stage/backp/mksysb.img
savevg
restvg
Restore files
restore
System Dump
What is dump?
Configuring dump devices in AIX
How to start the system dump manually?
Copying system dump to other directory or media
Examining system dump using kdb
Important LED codes related to dump
If a kernel panic occures, a dump will be invoked automatically. The followings are dumped during the dump
process.
1. List of currently running processes and related information about the process
2. Curretnly mounted filesystems, inode table and open file table
3. currently configured ttys and their status
4. Memory buffers for data
5. system buffers
6. system variables and statistics
7. Kernel's own record of process it is currently running.
sysdumpdev command is used to change the primary or secondary dump device designation in a running
system.
sysdumpdev
-l list the current dump destination
-L view satistical information about previus dump
-e estimate the dump size
-d <directory> directory to copy the dump during boot time
-p <devive name> to set the device as primary dump device
-s <device name> to set the device as secondary dump device
-P to make the changes permanent even after reboot
Exaples:
# sysdumpdev -s /dev/sysdumpnull
AIX FAQ Page 11 of 50
#susdumpdev -e
sysdumpstart command is used to start a kernel dump to the primary or secondary dump device. When the
dump completes, the system halts. Use the kdb command to examine the dump.
If there is enough space to copy the dump to /var/adm/ras directory, then it will be copied directly during
reboot. Dump is copied as /var/adm/ras/vmcore.x file. If there is not enough space, then "copydumpmenu" is run
by /sbin/rc.boot to display the copy dump menu. Using this copydumpmenu utility, a dump can be copied to
removable such as tape.
snap utility can be used to gather system information along with dump and compress the information in a tar
file.
snap
Example:
kdb command is an interactive utility for examining an OS image or the running kernel.
Paging
Swap space related commands and files in AIX
swapon
swapoff
lsps
chps
mkps
rmps
/etc/swapspaces
# swapoff paging00
# rmps paging00
AIX FAQ Page 13 of 50
LVM
synclvodm -Pv <vgname>
imfs -x -l <lvname>
imfs -l <lv_name>
# varyonvg vgname
Cook-book for creating a Volume Group and file systems using LVM
lspv
hdisk0 00c33e2e8347acfd rootvg active
hdisk1 00c33e2e8c8a25e3 rootvg active
hdisk36 none None
hdisk37 none None
lsvg -l saplocvg
saplocvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
sapmntlv jfs2 64 64 1 closed/syncd N/A
saplocvg_log jfs2log 1 1 1 closed/syncd N/A
If the device configuration database (ODM) is not consistent with Logical Volume Manager information, the
synclvodm command can be used to resynchronize the database. It Synchronizes or rebuilds the logical volume
control block, the device configuration database, and the volume group descriptor areas on the physical volumes
NIM
To list all the mksysb resources
# lsnim -t mksysb
# lsnim -t spot
# lsnim -t standalone
OR
# lsnim -c machines
# nimconfig -r
Networking
AIX FAQ Page 16 of 50
To find out the link speed and mac address of an Ethernet adapter ent0
# entstat -d ent0
To make the alias permaent, either add the above line to /etc/rc.net or /etc/rc.tcpip. You can also make it
permanent by running the following command.
Network Options:
# no -a
To enable IP forwarding
# no -o "ipforwarding=1"
AIX FAQ Page 17 of 50
# no -p -o ipforwarding=1
# no -r -o ipforwarding=1
# no -d ipforwarding
Iptrace, Ipreport and tcpdump commands are used to trace and analyze network packets in AIX.
1. Log in as a root user, then type the following command to start the iptrace utility:
The utility will capture all packets using TCP protocol through the en0 interface from the source host it-ibm01
to the destination host it-ibm100. Captured packets are logged into the raw file /tmp/iptrace.raw.
2. To stop the iptrace daemon so that it no longer captures packets, type the following command:
# stopsrc -s iptrace
Etherchannel
EtherChannel and IEEE 802.3ad Link Aggregation are network port aggregation technologies that allow several
Ethernet adapters to be aggregated together to form a single pseudo Ethernet device. For example, ent0 and ent1
AIX FAQ Page 18 of 50
can be aggregated into an EtherChannel adapter called ent3; interface en3 would then be configured with an IP
address. The system considers these aggregated adapters as one adapter. In addition, all adapters in the
EtherChannel or Link Aggregation are given the same hardware (MAC) address, so they are treated by remote
systems as if they were one adapter. Both EtherChannel and IEEE 802.3ad Link Aggregation require support in
the switch so it is aware which switch ports should be treated as one.
The adapters that belong to an EtherChannel must be connected to the same EtherChannel-enabled switch. You
must manually configure this switch to treat the ports that belong to the EtherChannel as an aggregated link
If an adapter fails, network traffic is automatically sent on the next available adapter without disruption to
existing user connections. The adapter is automatically returned to service on the EtherChannel or Link
Aggregation when it recovers.
Because the EtherChannel cannot be spread across two switches, the entire EtherChannel is lost if the switch is
unplugged or fails. To solve this problem, a new backup option available in AIX 5.2 and later keeps the service
running when the main EtherChannel fails. The backup and EtherChannel adapters should be attached to
different network switches, which must be inter-connected for this setup to work properly. In the event that all
of the adapters in the EtherChannel fail, the backup adapter will be used to send and receive all traffic. When
any link in the EtherChannel is restored, the service is moved back to the EtherChannel.
The Network Interface Backup setup is most effective when the adapters are connected to different network
switches, as this provides greater redundancy than connecting all adapters to one switch. When connecting to
different switches, make sure there is a connection between the switches. This provides failover capabilities
from one adapter to another by ensuring that there is always a route to the currently-active adapter.
ODM
Object Data Manager (ODM)
What is ODM?
Location of ODM Repositories
Some ODM Database files
Some Useful ODM commands
ODM commands - examples
AIX FAQ Page 19 of 50
What is ODM?
ODM
This can be defined in /etc/environment file. The ODM object clases are held in three repositories
1. /etc/objrepos
2. /usr/lib/objrepos
3. /usr/share/lib/objrepos
SWservAt
# odmget CuDv
To find out an object within CuAt with condition name=sys0 and attibute=maxuproc
Monitoring Commands
nmon
vmstat
iostat
AIX FAQ Page 21 of 50
sar
topas
nmon
svmon
filemon
mpstat
rmss
netpmon
nmon
http://www-128.ibm.com/developerworks/eserver/articles/analyze_aix/index.html
vmstat
The vmstat command is useful for obtaining an overall picture of CPU, paging, and memory usage. The
following is a sample report produced by the vmstat command:
1. vmstat 5 2
Remember that the first report from the vmstat command displays cumulative activity since the last system
boot. The second report shows activity for the first 5-second interval.
iostat
The iostat command is the fastest way to get a first impression, whether or not the system has a disk I/O-bound
performance problem. This tool also reports CPU statistics.
Flags
-a Specifies adapter throughput report.
-d Specifies drive report only.
-m Specifies statistics for paths.
-t Specifies tty/cpu report only.
-z Resets the disk input/output statistics
# iostat 2 2
tty: tin tout avg-cpu: % user % sys % idle % iowait
0.0 0.8 8.4 2.6 88.5 0.5
0.0 80.2 4.5 3.0 92.1 0.5
svmon
AIX FAQ Page 22 of 50
The svmon command provides a more in-depth analysis of memory usage. It is more informative, but also more
intrusive, than the vmstat and ps commands. The svmon command captures a snapshot of the current state of
memory.
The memory consumption is reported using the inuse, free, pin, virtual and paging space counters.
Flags
-G Global report
-U User report
-P Process report
-i To define intervel and number of intervels. eg. -i 1 5
To find out the total memory/swap and free memory/swap available in an AIX system
# svmon -G
size inuse free pin virtual
memory 3932160 3914793 17367 444363 1609451
pg space 1048576 6622
# pagesize
4096
So, the above system have almost 16GB physical Memory and 4 GB swap
A memory leak can be detected with the svmon command, by looking for processes whose working segment
continually grows. A leak in a kernel segment can be caused by an mbuf leak or by a device driver, kernel
extension, or even the kernel. To determine if a segment is growing, use the svmon command with the -i option
to look at a process or a group of processes and see if any segment continues to grow.
# svmon -P 13548 -i 1 2
Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd LPage
13548 pacman 8535 2178 847 8533 N N N
filemon
The filemon command monitor a trace for file system and IO system events and reports performance statistics
for files, virtual memory segments, logical volumes and physical volumes. filemon is useful to those whose
applications are believed to be disk-bound and want to know where and why.
filemon command shows the load on different disks, logical volumes and files in a great detail.
-O [lv | pv | vm | If | all ]
(If - Logical file level, vm - Virtual memory level, lv - lv level)
-u Reports on files that were opened prior to the start of the trace daemon
If the output file is not specified, the output is sent to standard output.
rmss
AIX FAQ Page 24 of 50
The rmss command provides you with a means to simulate different sizes of real memory that are smaller than
your actual machine, without having to extract and replace memory boards or reconfigure memory using logical
partitions.
# rmss -c 500
Simulated memory size changed to 500 Mb.
To reset the memory size to the real memory size of the machine, enter:
# rmss -r
Tuning Commands
vmo
ioo
no
nice and renice
vmtune
defragfs
tuncheck: This command validates a file either to be applied immediately or at reboot time (-r flag). It checks
the ranges, dependencies, and prompts to run bosboot if required. Run this command if you copy a file to a new
system, or edit it with an editor such as vi.
tunsave: This command saves all current values to a file, including optionally the
nextboot file.
tunrestore: This command applies values from a file, either immediately, or at the next reboot (-r flag). With
the -r flag, it validates and copies the file over the current nextboot file.
tundefault: This command resets all parameters to their default value. It can be applied at the next reboot with
the -r flag.
These commands are used to set or display current or next boot values of different tuning parameters.
These commands can also make permanent changes or defer changes until the next reboot. When a permanent
change or nextboot value is changed using these commands, the /etc/tunables/nextboot file is updated
automatically with the new values (if the new value is different from the default value).
AIX FAQ Page 25 of 50
The following flags are common for ioo, vmo and no commands.
Examples:
cat /etc/tunables/nextboot
vmo:
minfree = "1200"
maxfree = "1280"
minperm% = "10"
maxperm% = "40"
maxclient% = "40"
ioo:
j2_nBufferPerPagerDevice = "1024"
no:
tcp_recvspace = "65536"
tcp_sendspace = "65536"
tcp_pmtu_discover = "0"
udp_pmtu_discover = "0
minfree Minimum acceptable number of real-memory page frames in the free list. When the size of the free list
falls below this number, the VMM begins stealing pages. It continues stealing pages until the size of the free list
reaches maxfree.
maxfree Maximum size to which the free list will grow by VMM page-stealing. The size of the free list may
exceed this number as a result of processes terminating and freeing their working-segment pages or the deletion
of files that have pages in memory.
minperm If the percentage of real memory occupied by file pages falls below this level, the page-replacement
algorithm steals both file and computational pages, regardless of repage rates.
maxperm' If the percentage of real memory occupied by file pages rises above this level, the page-replacement
algorithm steals only file pages.
maxclient If the percentage of real memory occupied by file pages is above this level, the page-replacement
algorithm steals only client pages.
AIX FAQ Page 26 of 50
Disk-I/O pacing is intended to prevent programs that generate very large amounts of output from saturating the
system’s I/O facilities and causing the response times of less-demanding programs to deteriorate.
When a process tries to write to a file that already has high-water mark pending writes, the process is put to
sleep until enough I/Os have completed to make the number of pending writes less than or equal to the low-
water mark. The logic of I/O-request handling does not change. The output from high-volume processes is
slowed down somewhat.
The maxpout parameter specifies the number of pages that can be scheduled in the I/O state to a file before the
threads are suspended. The minpout parameter specifies the minimum number of scheduled pages at which the
threads are woken up from the suspended state. The default value for both the maxpout and minpout parameters
is 0, which means that the I/O pacing feature is disabled. Changes to the system-wide values of the maxpout and
minpout parameters take effect immediately without rebooting the system.
Changing the values for the maxpout and minpout parameters overwrites the system-wide settings. You can
exclude a file system from system-wide I/O pacing by mounting the file system and setting the values for the
maxpout and minpout parameters explicitly to 0. The following command is an example: mount -o
minpout=0,maxpout=0 /<file system>
netpmon Monitors activity and reports statistics on network I/O and network-related CPU usage
Software
AIX FAQ Page 27 of 50
Software Stats
Listing Installed Software
Installing Filesets/Software
Installing PTFS/Patches
Updating the software to the latest level
Installing emergency fixes in AIX
Software States:
When a software or an update is first installed, it is in the APPLIED state. It can be later commited or rejectd.
APPLIED state
COMMITED stage
Reject action removes the APPLIED software and go back to the previous commited version
# lslpp -l
# lslpp -l bos.net.nfs.client
# lslpp -Lc
# lslpp -f bos.perf
# lslpp -w /usr/sbin/nfsd
# lslpp -ha
To the filesets that do not have the required prerequisites or are not completely installed
# lslpp -v
Emaples:
installp -C
To install bos.net software (apply and commit) package with all pre-requisites from directory /tmp/net
instfix coomand is used to install a fix or set of fixes. It is also used to find out if a fix is installed on a
system.
# instfix -i -v
To list filesets which are lesser than the specified maintenance level
To install all filesets associated with fix Ix38794 from the tape
# instfix -T -d /dev/cd0
To verify that all filesets have all required requisites and are completely installed
#lppchk -v
oslevel command is used to find out the version and maintenance level of AIX
# smit update_all
# emgr -l
# emgr -e /mnt/IY93496.070302.epkg.Z
Security
"chsec" command
The chsec command changes the attributes stored in the security configuration stanza files. These security
configuration stanza files have attributes that you can specify with the Attribute = Value parameter:
/etc/security/environ
/etc/security/group
/etc/security/lastlog
/etc/security/limits
/etc/security/login.cfg
/usr/lib/security/mkuser.default
/etc/security/passwd
/etc/security/portlog
/etc/security/user
Syntax:
To change the CPU time limit of user joe to 1 hour (3600 seconds):
"chuser" command
The chuser command changes attributes for the user identified by the Name parameter. The user name must
already exist. To change an attribute, specify the attribute name and the new value with the Attribute=Value
parameter
The password on aix can be changed nom interactively using the setpwd command (Not an AIX command)
http://www.tivoli-ug.org/downloads/setpwd.aix.c
LPAR
LPAR facts
For initially configuring a P-Series system for installtion in LPAR mode, the system should be placed on
Partion Stand-By mode
# lsslot -c pci
# lsslot -c pci -a
1. Determine the PCI slot for the adapter using lsslot -c slot and get the "pciX' device name
2. Remove the device from AIX using rmdev -l pciX -R (-R to remove all the child to parent)
3. On HMC dynamically allocate the device to another
4. On the destination box, run 'cfgmgr' to configure the allocated device
The HMC itself can be rebooted by loging to HMC with SSH, as user hscroot, and issueing the command
$ hmcshutdown -r -t0
To shutdown a LPAR
# lsrsrc IBM.ManagementServer (Name and Hostname are HMC's Name and hostname of HMC)
Resource Persistent Attributes for IBM.ManagementServer
resource 1:
Name = "10.253.1.22"
Hostname = "10.253.1.22"
ManagerType = "HMC"
LocalHostname = "10.253.1.54"
ClusterTM = "9078-160"
ClusterSNum = ""
ActivePeerDomain = ""
NodeNameList = {"err3qdb0"}
resource 2:
Name = "128.137.44.205"
Hostname = "128.137.44.205"
ManagerType = "HMC"
LocalHostname = "10.253.1.54"
ClusterTM = "9078-160"
ClusterSNum = ""
ActivePeerDomain = ""
NodeNameList = {"err3qdb0"}
smtctl -m off
vtmenu
vtmenu is a Perl script which displays a list of partitions, opening a virtual terminal on the one selected. If more
than one managed systems exists, a list of them is displayed first. After a managed system is selected, a list of
all logical partitions on that managed system is displayed. The vtmenu command does not accept any flags or
parameters and ignores all that are specified.
~.
mkvterm: mkvterm opens a virtual terminal session for an AIX, Linux, or virtual I/O server partition
# lsslot -c phb
PHB Name Description Device(s)
PHB 1 Logical PCI Host Bridge pci0
U7879.001.DQDGTGK-P1-T14 pci3 sisscsia0
U7879.001.DQDGTGK-P1-T4 pci4 usbhc0 usbhc1
U7879.001.DQDGTGK-P1-T6 pci5 ent0 ent1
PHB 2 Logical PCI Host Bridge pci1
U7879.001.DQDGTGK-P1-C3 pci6 ent2 ent3
U7879.001.DQDGTGK-P1-C4 pci7 ent4 ent5
U7879.001.DQDGTGK-P1-C5 pci8 fcs0
PHB 3 Logical PCI Host Bridge pci2
U7879.001.DQDGTGK-P1-T12 pci10 sisscsia1
U7879.001.DQDGTGK-P1-T15 pci11 ide0
U7879.001.DQDGTGK-P1-C1 pci12 fcs1
$ lssyscfg -r sys
name=Server-9119-595-SN02898EB,type_model=9119-595,serial_num=02898EB,ipaddr=10.128.253
ndary=10.128.255.252,state=Operating,sys_time=10/13/2006 20:15:55,power_off_policy=1,co
cod_proc_capable=1,hca_capable=1,huge_page_mem_capable=unavailable,micro_lpar_capable=1
,5250_application_capable=0,redundant_err_path_reporting_capable=1,shared_eth_failover
g_passing_capable=1,sp_failover_capable=1,vet_activation_capable=1,virtual_io_server_c
250_cpw_percent=0,max_lpars=254,max_power_ctrl_lpars=1,service_lpar_id=3,service_lpar_n
...............................
...............................
,pend_mfg_default_boot_mode=norm,sp_failover_enabled=1,sp_failover_state=Ready
name=eraptci0,lpar_id=7,lpar_env=aixlinux,state=Running,resource_config=1,os_version=0.
0.0.0.0.0,logical_serial_num=02898EB7,default_profile=eraptci0,curr_profile=eraptci0,
work_group_id=none,shared_proc_pool_util_auth=0,power_ctrl_lpar_ids=none,boot_mode=norm,
lpar_keylock=norm,auto_start=0,redundant_err_path_reporting=0
name=erep2ci0,lpar_id=6,lpar_env=aixlinux,state=Running,resource_config=1,os_version=0.
0.0.0.0.0,logical_serial_num=02898EB6,default_profile=erep2ci0,curr_profile=erep2ci0,
work_group_id=none,shared_proc_pool_util_auth=0,power_ctrl_lpar_ids=none,boot_mode=norm,
lpar_keylock=norm,auto_start=0,redundant_err_path_reporting=0
2. Backup critical console information so that previous levels can be restored in the event of a
problem while upgrading the software. Do not use this critical console data after a successful
upgrade to a new version of the HMC software. We can backup the console data in DVD-RAM
media
4. Save upgrade data. You can save the current HMC configuration in a designated disk partition on
the HMC. Only save upgrade data immediately prior to upgrading your HMC software to a new
release. This action allows you to restore HMC configuration settings after upgrading
HMC Code update --> Save Upgrade Data --> Save on Hard Drive --> Finish
P5
Virtual IO Server
Virtual Ethernet and SEA
Virtual SCSI
Capped mode: The processing units given to the partition at a time never exceed the guaranteed processing
capacity (the entitlement capacity is guaranteed by the system and it is not exceeded when resources are
available in the shared processing pool).
AIX FAQ Page 35 of 50
Uncapped mode: The processing capacity given to the partition at a time may exceed the guaranteed
processing capacity when resources are available in the shared processing pool. You must specify the uncapped
weight of that partition.
If multiple uncapped logical partitions require idle processing units, the managed system distributes idle
processing units to the logical partitions in proportion to each logical partition's uncapped weight. The higher
the uncapped weight of a logical partition, the more processing units the logical partition gets
# lparstat -i
Node Name : applsrv
Partition Name : Apps_Server
Partition Number : 4
Type : Shared-SMT
Mode : Uncapped
Entitled Capacity : 0.30
Partition Group-ID : 32772
Shared Pool ID : 0
Online Virtual CPUs : 2
Maximum Virtual CPUs : 10
Minimum Virtual CPUs : 1
Online Memory : 512 MB
Maximum Memory : 1024 MB
Minimum Memory : 128 MB
Variable Capacity Weight : 128
Minimum Capacity : 0.20
Maximum Capacity : 1.00
Capacity Increment : 0.01
Maximum Dispatch Latency : 16999999
Maximum Physical CPUs in system : 2
Active Physical CPUs in system : 2
Active CPUs in Pool : -
Unallocated Capacity : 0.00
Physical CPU Percentage : 15.00%
Unallocated Weight : 0
The following command disables all remote WebSM connections to the HMC:
VIO Server
The Virtual I/O Server is part of the IBM eServer p5 Advanced Power Virtualization hardware feature. Virtual
I/O Server allows sharing of physical resources between LPARs including virtual SCSI and virtual networking.
This allows more efficient utilization of physical resources through sharing between LPARs and facilitates
server consolidation.
AIX FAQ Page 36 of 50
Installation
You have two options to install the AIX-based VIO Server:
1. Install from CD
2. Install from network via an AIX NIM-Server
After the installation, the system is rebooted. After the reboot you are presented with the VIO-Server login
prompt. You can't login as user root as you have to use the special user id padmin. No initial default password
is set. Immediately after login you are forced to set a new password
Before you can do anything you have to accept the I/O Server license. This is done with the license command.
$ license -accept
You can see all available commands with the command help. All these commands are shell aliases to a single
SUID-binary called ioscli which is located in the directory /usr/ios/cli/bin. If you are familiar with AIX you will
recognize most commands but most command line parameters differ from the AIX versions.
As there are no man pages available you can see all options for each command separately by issueing the
command help <command>
$ oem_setup_env
Virtual Ethernet
Any LPAR with the same port and Same virtual LAN ID will be able to communicate with each other.
For making a virtual Ethernet as SEA (Shared Ethernet adapter), select "Access External network" and leave
IEEE802.1Q for the virtual adapter in the VIO server profile.
2. Create the shared ethernet adapter using real and virtual adapters
$ mkvdev -sea ent0 <- this is the real Ethernet
-vadapter ent2 <- this is the Virtual Ethernet
-default ent2 <- this simple setup it's to only one so it's the default
-defaultid 1 <- this is the Port Virtual ID from the HMC
AIX FAQ Page 37 of 50
ent3 Available
en3
et3
Virtual SCSI
3. To assign the whole disk "hdisk1" to cleintY. (Make sure the hdisk1 is not part of any volume
group)
$ mkvdev -vdev hdisk1 -vadapter vhost1 -dev clientY
clientY Available
$
$ lsdev -dev clientx –attr
attribute value description user_settable
LogicalUnitAddr 0x8100000000000000 Logical Unit Address False
aix_tdev lv00 Target Device Name False
HACMP
List of HACMP related documents can be found here
http://www-03.ibm.com/servers/eserver/pseries/library/hacmp_docs.html
HACMP Daemons
HACMP Log files
HACMP Startup and Shutdown
HACMP Daemon
01. clstrmgr
02. clinfo
03. clmuxpd
04. cllockd
/tmp/hacmp.out: It records the output generated by the event scripts as they execute. When checking the
/tmp/hacmp.out file, search for EVENT FAILED messages. These messages indicate that a failure has occurred.
Then, starting from the failure message, read back through the log file to determine exactly what went wrong.
The /tmp/hacmp.out file is a standard text file. The system creates a new hacmp.out log file every day and
retains the last seven copies. Each copy is identified by a number appended to the file name. The most recent
log file is named /tmp/hacmp.out; the oldest version of the file is named /tmp/hacmp.out.7
/usr/es/adm/cluster.log: It is the main HACMP log file. HACMP error messages and messages about HACMP-
related events are appended to this log with the time and date at which they occurred
/tmp/emuhacmp.out: It records the output generated by the event emulator scripts as they
execute. The /tmp/emuhacmp.out file resides on the node from which the event emulator is
invoked.
Cluster to re-aquire resources: If cluster services were stopped with the forced option, hacmp expects all cluster
resources on this node to be in the same state when cluster services are restarted. If you have changed the state
of any resources while cluster services were forced down, you can use this option to have hacmp reacquire
resources during startup.
Graceful: Local machine shuts itself gracefully. Remote machine interpret this as a graceful down and do not
takeover resources
Takeover: Local machine shuts itself down gracefully. Remote machine interpret this as a non-graceful down
and takeover resources
Forced: Local machine shuts down cluster services without releasing any resources. Remote machine do not
take over any resources. This mode is use ful for system maintenence.
HACMP 5.x
32 nodes in a cluster
64 resource group in a cluster
256 IP addresses known to HACMP (Service and boot IP lables)
RSCT limit: 48 heartbeat rings
AIX FAQ Page 41 of 50
The Cluster Communication Daemon, clcomdES, provides secure remote command execution and HACMP
ODM configuration file updates by using the principle of the "least privilege".
Since cluster communication does not require the standard AIX \"r\" commands, the dependency on
the /.rhosts file has been removed. Thus, even in \"standard\" security mode, the cluster security has
been enhanced.
Provides reliable caching mechanism for other node's ODM copies on the local node (the node from
which the configuration changes and synchronization are performed).
Limits the commands which can be executed as root on remote nodes (only the commands in
/usr/es/sbin/cluster run as root).
clcomdES is started from /etc/inittab and is managed by the system resource controller (SRC)
subsystem.
Provides its own heartbeat mechanism, and discovers active cluster nodes (even if cluster manager or
RSCT is not running).
Uses HACMP ODM classes and the /usr/es/sbin/cluster/rhosts file to determine legitimate partners.
Heartbeating
Starting with HACMP V5.1, heartbeating is exclusively based on RSCT topology services
The heartbeat via disk (diskhb) is a new feature introduced in HACMP V5.1, with a proposal to provide
additional protection against cluster partitioning and simplified non-IP network configuration. This type of
network can use any type of shared disk storage (Fibre Channel, SCSI, or SSA), as long as the disk used for
exchanging KA messages is part of an AIX enhanced concurrent volume group. The disks used for heartbeat
networks are not exclusively dedicated for this purpose; they can be used to store application shared data
HACMP V5.1 provides a new facility, the forced varyon of a volume group option on a node. You should use a
forced varyon option only for volume groups that have mirrored logical volumes, and use caution when using
this facility to avoid creating a partitioned cluster.
When using a forced varyon of volume groups option in a takeover situation, HACMP first tries a normal
varyonvg. If this attempt fails due to lack of quorum, HACMP checks the integrity of the data to ensure that
there is at least one available copy of all data in the volume group before trying to force the volume online. If
there is, it runs varyonvg -f; if not, the volume group remains offline and the resource group results in an error
state.
AIX FAQ Page 42 of 50
Startup preferences
Online On Home Node Only: At node startup, the RG will only be brought online on the highest priority
node. This behavior is equivalent to cascading RG behavior.
Online On First Available Node: At node startup, the RG will be brought online on the first node
activated. This behavior is equivalent to that of a rotating RG or a cascading RG with inactive takeover.
If a settling time is configured, it will affect RGs with this behavior.
Online On All Available Nodes: The RG should be online on all nodes in the RG. This behavior is
equivalent to concurrent RG behavior. This startup preference will override certain fall-over and fall-
back preferences.
Fallover preferences
Fallover To Next Priority Node In The List: The RG will fall over to the nextavailable node in the node
list. This behavior is equivalent to that of cascading and rotating RGs.
Fallover Using Dynamic Node Priority: The RG will fall over based on DNP calculations. The resource
group must specify a DNP policy.
Bring Offline (On Error Node Only): The RG will not fall over on error; it will simply be brought
offline. This behavior is most appropriate for concurrent-like RGs.
The settling time specifies how long HACMP waits for a higher priority node (to join the cluster) to activate a
custom resource group that is currently offline on that node. If you set the settling time, HACMP waits for the
duration of the settling time interval to see if a higher priority node may join the cluster, rather than simply
activating the resource group on the first possible node that reintegrates into the cluster.
Fallback preferences
Fallback To Higher Priority Node: The RG will fall back to a higher priority node if one becomes
available. This behavior is equivalent to cascading RG behavior. A fall-back timer will influence this
behavior.
Never Fallback: The resource group will stay where it is, even if a higher priority node comes online.
This behavior is equivalent to rotating RG behavior.
A delayed fall-back timer lets a custom resource group fall back to its higher priority node at a specified time.
This lets you plan for outages for maintenance associated with this resource group.
You can specify the following types of delayed fall-back timers for a custom resource group:
Daily
Weekly
Monthly
Yearly
On a specific date
AIX FAQ Page 43 of 50
Application Monitoring
HACMP can also monitor applications in one of the following two ways:
Application process monitoring: Detects the death of a process, using RSCT event management
capability.
Application custom monitoring: Monitors the health of an application based on a monitoring method
(program or script) that you define.
For application process monitoring, a kernel hook informs manager that the monitored process has died,
and HACMP application recovery process.
For the recovery action to take place, you must provide and restart the application (the application start/stop
application server definition may be used). HACMP tries to restart the application and waits for the a specified
number of times, before sending an notification actually moving the entire RG to a different node (next priority
list).
For custom application monitoring (custom method), cleanup and restart methods, you must also
provide
To find out the current cluster stat and obtain informatin about cluster
# cldump
_____________________________________________________________________________
Cluster Name: erpqa1
Cluster State: UP
Cluster Substate: STABLE
_____________________________________________________________________________
AIX FAQ Page 44 of 50
---------------------------- ---------------
err3qdb0 ONLINE
err3qci0 OFFLINE
Syncronizing the VG info in HACMP if cluster is already running:
1. In the system where the VG changes are made, break the reserve on disks using varyonvg
command
# varyonvg -b -u <vgname>
2. Import the VG in the system where the VG info need to be updated. Use the -n and -F flag to not
to vary on the VG
5. Varyoff the VG
# varyoffvg <vgname>
# cllsappmon
OraDB_Mon user
SapCI_Mon user
To get the detailed information about application monitoring
# cllsappmon <app_mon_name>
# cllsappmon -h OraDB_Mon
#name type MONITOR_METHOD MONITOR_INTERVAL INVOCATION HUNG_MONITOR_SIGNA
STABILIZATION_INTERVAL FAILURE_ACTION RESTART_COUNT RESTART_INTERVAL RESTART_METHOD
NOTIFY_METHOD CLEANUP_METHOD PROCESSES PROCESS_OWNER INSTANCE_COUNT RESOURCE_TO_MONITOR
OraDB_Mon user /usr/local/bin/dbmonitor 30 longrunning 9 180 fallover
1 600 /usr/local/bin/dbstart /usr/local/bin/dbstop
AIX FAQ Page 46 of 50
# clclear
1. Rolling Migration
2. Snapshot Migration
Storage
IBM Sub System Device Driver (SDD)
List all Vpath devices and their states
# lsvpcfg
vpath0 (Avail pv lotus02) 50014562 = hdisk2 (Avail ) hdisk19 (Avail )
vpath1 (Avail pv lotus02) 50114562 = hdisk3 (Avail ) hdisk20 (Avail )
Total Devices : 17
DEV#: 0 DEVICE NAME: vpath0 TYPE: 2105F20 SERIAL: 50014562
Active Adapters :8
Adpt# Name State Mode Select Errors Paths Active
0 fscsi2 NORMAL ACTIVE 799440626 0 44 44
1 fscsi0 NORMAL ACTIVE 797798530 0 44 44
2 fscsi1 NORMAL ACTIVE 785716308 0 44 44
To fixe a DPO Vpath Volume group that has mixed vpath and hdisk volumes.
# dpovgfix vg00
EMC Powerpath
To configure all the emc hdisks, run emc_cfgmgr script. This script invokes the AIX cfgmgr tool to probe each
adapter bus separately
HP Autopath
# dlnkmgr view -drv
PathID HDevName Device LDEV
000000 dlmfdrv0 hdisk2 XP1024.40318.04DB
000001 dlmfdrv0 hdisk30 XP1024.40318.04DB
000002 dlmfdrv1 hdisk3 XP1024.40318.0522
000003 dlmfdrv1 hdisk31 XP1024.40318.0522
To remove all the DLM drives
# dlmrmdev
dlmfdrv0 deleted
dlmfdrv1 deleted
dlmfdrv10 deleted
To clear the SCSI reserves on the disks
#dlmpr -a -c
/usr/DynamicLinkManager/drv/dlmfdrv.conf
MPIO
To list all the paths which are in Enabled status
# lspath -s ena -Fname -p fscsi0
Tips
ssh client and sftp not working for users other than root
Solu: Check the permission for /opt/freeware. If others does not have read and execute permissoins, sftp may
fail. Change the permissions.
AIX FAQ Page 48 of 50
After AIX fresh installation, not able to login into the system or no login prompt
This problem may come if terminal / cable is not the right one. We need to change the attributes of tty0 device
to get over this issue.
select tty0
At the end of 'STTY attributes for RUN time' field, add ",clocal"
In 'STTY attributes for LOGIN' filed, add ",clocal"
Select 'Apply change to DATABASE only' to "yes"
OR
After AIX 5.2 fresh installation, system was not finding any SAN storages
Fileset devices.fcp.disk was not installed on the system. Fileset installed and system rebooted.
New
Do you have some thing to share on AIX??
Please add your notes to this page by clicking on the Edit Page Link
The password is 'guest'
2 to 3
3 to 2
4 to 5
AIX FAQ Page 49 of 50
5 to 4
7 to 7
6 & 8 to 20 ( important )
20 to 6 & 8 ( important )
2 to 2
3 to 3
4 to 8
5 to 7
7 to 5
6 & 8 to 4
20 to 6 & 1
TxD 3 to 2 RxD
RxD 2 to 3 TxD
RTS 7 to 8 CTS
CTS 8 to 7 RTS
DTR 4 to 6&1 DSR, CD
DSR,CD 6&1 to 4 DTR
GND 5 to 5 GND
RI 9 to 9 RI
AIX FAQ Page 50 of 50