IBM pSeries AIX System Administration - Certification study guide
AIX 5L Difference Guide - 5.3 Version
AIX 5L performance and system Tuning
AIX 5L Problem solving and troubleshooting
Aix 5L Communications - Certification study guide
AIX Logical Volume Manager - A to Z
TCP/IP tutorial and technical overview
AIX 5L Difference Guide - 5.3 Version
AIX 5L performance and system Tuning
AIX 5L Problem solving and troubleshooting
Aix 5L Communications - Certification study guide
AIX Logical Volume Manager - A to Z
TCP/IP tutorial and technical overview
For list of more IBM Redbook pdf links, click here
For pSeries document library, click here
AIX Documents:
For AIX 7.1 reference Click hereFor Aix 6.1 reference Click here
For Aix 5.3 reference Click here
For Aix 5.2 reference Click here
For Aix 5.1 reference Click here
For IBM RS6000 / pSeries Hardware Documentation Click here
AIX Shareware and Freeware Websites:
Aix toolbox for linux applications - Open source packages available in for installation on AIX 4.3.3 and 5L
Public domain software Library for Aix - You can find almost all the freeware software for AIX in both binary and source code format.
Bull's large open source archive for AIX - Another excellent web site for AIX open source archive in bff format including gcc, perl, openssh, apache and more
IBM Error Codes Reference
http://publib.boulder.ibm.com/infocenter/eserver/v1r3s/index.jsp?topic=/ipha6/diag1.htm
http://publib.boulder.ibm.com/infocenter/eserver/v1r3s/index.jsp?topic=/ipha6/diag1.htm
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
Open Firmware
Listing and changing the current boot order
Viewing AIX Boot and Console Logs
Backup and restore volume groups using savevg and restvg
restvg
backup
Restore files backed-up using mksysb/backup commands
restvg command is used to restore volume groups other than rootvg
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
Configuring dump devices
To start the dump manually
Copying system dump
Examing system dump
LED Codes Related to dump
Initialize nim master server:
nimconfig -a pif_name=en0 -a master_port=1058 -a netname = net2 -a cable_type=tp
Some useful NIM SMIT Fast paths
smit nim_mkmac # Adding new machines smit nim_bosinst # For doing BOS install operation on a machine
PdDv, PdAt, PdCn, etc..
# odmget CuDv
cfgmgr: 0514-604 Cannot access the CuDv object class in the
device configuration database.
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.
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.
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.
masservers: Maxiimum number of kernel processes dedicated to AIO processing
maxreqs: maximum number of asynchronous I/O requests that can be outstanding at one time
autoconfig: The state to which AIO is to be configured during system initialization. The possible values are "defined", which means that AIO cannot be used, and "available"
The way it does this is by setting the sys0 settings of minpout and maxput parameters to 4096 and 8193, respectively:
Install filesets / software
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.
To verify that all filesets have all required requisites and are completely installed
smd5: lpa_module = /usr/lib/security/smd5 lpa_options = std_hash=true
Contents of Boot Logical Volume (/dev/hd5)
How to change the current Boot device order
Viewing AIX Boot and console Logs
Open Firmware
- Kernal - Copy of /unix
- LVM Commands
- ODM Predefined Structure
- ODM Customized Structure
- rc.boot shell script
Listing and changing the current boot order
bootlist -m normal -o # Lists the current bootlist bootlist -m normal cd0 hdisk0 # To set cd0 and hdisk0 as first and second boot devices bootlist -m service cd0 rmt0 # To change the bootlist for service mode
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 # List the defined log types # alog -L boot bosinst nim console cfg dumpsymp alog -o -t boot # View the boot log alog -o -t console # View the console log
To find out the properties of boot log file
# alog -L -t boot file:size:verbosity /var/adm/ras/bootlog:131072:1
To find out whether a Hard drive is bootable
# ipl_varyon -i PVNAME BOOT DEVICE PVID VOLUME GROUP ID hdisk0 YES 00c898eb372ea9410000000000000000 00c898eb00004c00 hdisk1 YES 00c898eb38483a300000000000000000 00c898eb00004c00 hdisk2 NO 00c898bbdd86318c0000000000000000 00c898bb00004c00
Open Firmware
To get to open fimware, press F8 / 8 during system startup.
If the system hangs during boot, to get the detailed information of the boot messages, from the OK prompt:
OK> boot -s verbose
Installation
AIX provides three types of installation methods:
01. New and Complete Overwrite Install - To completely overwrite an existing version of the base operating system (BOS)
02. Migration Install - To upgrade AIX between versions and releases while preserving the existing root volume group.
03. Preservation Install - To preserve the user data in the root volume group.
01. New and Complete Overwrite Install - To completely overwrite an existing version of the base operating system (BOS)
02. Migration Install - To upgrade AIX between versions and releases while preserving the existing root volume group.
03. Preservation Install - To preserve the user data in the root volume group.
After the installation is completed, the system reboots and the Configuration Assistant Taskguide program, /usr/sbin/install_assist, is automatically started.
The Configuration Assistant program allows you to set up basic configuration, such as:
- Setting date, time, and time zone
- Setting the root password
- Adjusting system storage and paging space
- Configuring TCP/IP
- Updating installed software after Migration Installation
- Configuring Web-based System Management (websm)
- Configuring online documentation and search
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)
To list all the microcode and firmware level
To list the devices
To display configuration and vital product data (VPD) about the system
To display attributes and possible values of attributes for devices
To Change the attributes of devices-
To remove the devices
Add device to the system
Configuring New Devices using cfgmgr:
-A to list microcode information for all supported devices
-c To display levels without using menus
-r To display levels in tabular format
-d <device Name> to display mictocode level for a device
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)
To list all the microcode and firmware level
Device Configuration Database
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.
The devices in AIX can be in any of the following states
01. Available - Device is ready and can be used 02. Defined - Device is unavailable 03. Unknown - Undefined 04. Stopped - Configured but unavailable
To list the devices
lsdev
-C to list customized database -P to list predefined database -c (class) -t (type) -s (subtype)
To list all customised devices ie installed
# lsdev -C
To list all the Hard Drives in a system
# lsdev -Cc disk
To list all the adapters in a sytem
# lsdev -Cc adapter
To find out the type of Fibre adapter
# lsdev -Ct df1000f* -F "type" -l fcs1
To find out the parent of ent0 device
# lsdev -Cl ent0 -F parent
To list the supported device classes from the Predefined Devices object class,
# lsdev -P -r class PCM adapter aio array bus cdrom ....... ......
To list the name, class, subclass, and type of
every device in the Available state in the Customized Devices object
class with column headers:
# lsdev -C -H -S a -F 'name class subclass type' name class subclass type sys0 sys node chrp sysplanar0 planar sys sysplanar_rspc mem0 memory sys totmem L2cache0 memory sys L2cache_rspc proc0 processor sys proc_rspc pci0 bus chrp pci pci1 bus chrp pci isa0 bus pci isac siota0 adapter isa_sio isa_tablet ppa0 adapter isa_sio chrp_ecp sa0 adapter isa_sio pnp501 sa1 adapter isa_sio pnp501 paud0 adapter isa_sio baud4232
To display configuration and vital product data (VPD) about the system
lscfg
-v Displays the VPD found on customized Database -p display paltform specifig device info. -l <device_name>
To list all installed devices in detail
# lscfg -v
To find out the WWN, FRU #, firmware level of fibre adapter fcs0
# lscfg -vpl fcs0
# lscfg -vpl fcs0
lscfg -vpl fcs0 fcs0 U7879.001.DQDRDGG-P1-C4-T1 FC Adapter Part Number.................03N7069 EC Level....................A Serial Number...............1B64304D32 Manufacturer................001B Customer Card ID Number.....280B FRU Number.................. 03N7069 Device Specific.(ZM)........3 Network Address.............10000000C95C98D3 ROS Level and ID............02881955 Device Specific.(Z0)........1001206D Device Specific.(Z1)........00000000 Device Specific.(Z2)........00000000 Device Specific.(Z3)........03000909 Device Specific.(Z4)........FF801413 Device Specific.(Z5)........02881955 Device Specific.(Z6)........06831955 Device Specific.(Z7)........07831955 Device Specific.(Z8)........20000000C95C98D3 Device Specific.(Z9)........TS1.91A5 Device Specific.(ZA)........T1D1.91A5 Device Specific.(ZB)........T2D1.91A5 Device Specific.(ZC)........00000000 Hardware Location Code......U7879.001.DQDRDGG-P1-C4-T1 PLATFORM SPECIFIC Name: fibre-channel Model: LP10000 Node: fibre-channel@1 Device Type: fcp Physical Location: U7879.001.DQDRDGG-P1-C4-T1
To display attributes and possible values of attributes for devices
lsattr
-E Displays the effective value -D Displays the Default Value -R Displays the range of legal values -a <Attribute> -l <Device_name>
Examples:
To find out the possible media_speed values for ethernet card ent0
# lsattr -El ent0 -a media_speed -R 10_Half_Duplex 10_Full_Duplex 100_Half_Duplex 100_Full_Duplex Auto_Negotiation
To find out the effective attribute of a device "mem0"
# lsattr -El mem0 goodsize 512 Amount of usable physical memory in Mbytes False size 512 Total amount of physical memory in Mbytes False
To list the defaults in the pre-defined db for device ent0
# lsattr -El sys0
To Change the attributes of devices-
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
# chdev -l scsi0 -a id=6 -P
To change the maximum number of processes allowed per user
Find out the valid range of values using lsattr command # lsattr -l sys0 -a maxuproc -R 40...131072 (+1) Change the maxuproc value using chdev command # chdev -l sys0 -a maxuproc=10000
To remove the devices
rmdev
-d removes the device from Customized DB -l <device_name> -R Unconfigure device and its chidren -S Makes deviec un-availabel by using stop method
To change device state from available to defined
# rmdev -l (device)
To delete the device
# rmdev -l (device) -d
To delete the scsi adapter scsi0 and all its child devices
# rmdev -Rdl scsi0
Add device to the system
mkdev
-d define -c class -l <logical device name> -p parent name -s subclass -t type
Examples:
To define a tape device
# mkdev -d -c tape -t 8mm -s scsi -p scsi0 -w 5,0
To define a dummy disk to the system
# mkdev -l hdisk1 -c disk -t osdisk -s scsi -p scsi0 -w 0,11 -d
To make the predefined rmt0 tape to available status
# mkdev -l rmt0
Configuring New Devices using cfgmgr:
cfgmgr configures devices and optionally installs
device software by running the programs specified in the Configuration
Rules object class.
cfgmgr
-v To give detailed output -l <Device_name> To configure the device and all it's chidren -i <device> Location of installation medium
To search for new devices and configure them
#cfgmgr
To configure detected devices attached to the fcs0 adapter
# cfgmgr -l fcs0
To install device drivers which is in /tmp/drivers automatically during configuration
# cfgmgr -i /tmp/drivers
Getting System configuration variable values
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.
Using bootinfo command
To find out the Kernel whether it is 32-bit or 64bit
To find out the Kernel whether it is 32-bit or 64bit
# bootinfo -K ---- > for Kernel # bootinfo -y ---- > for Hardware # bootinfo -s hdiskx ----> to find out the size of the hard drive
Some useful getconf command examples
# getconf KERNEL_BITMODE 64 # getconf HARDWARE_BITMODE 64 # getconf DISK_SIZE /dev/hdisk0 8678 # getconf REAL_MEMORY 524288 # getconf BOOT_DEVICE hdisk0 # getconf DISK_DEVNAME hdisk0 10-60-00-4,0 # getconf MP_CAPABLE 0
Displaying system configuration information
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:-
-c Displays cpu type, for example, 32-bit or 64-bit. -k Display the kernel in use, for example, 32-bit or 64-bit. -L Displays LPAR partition number and partition name if this is an LPAR partition, otherwise returns "-1 NULL". -m Displays system memory. -s Displays processor clock speed in MHz. -v Displays the VPD found in the Customized VPD object class for devices.
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 Paging Space Information Total Paging Space: 512MB Percent Used: 1% Volume Groups Information 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 ....................... ....................... ......................
List firmware and microcode level
lsmcode command display the firmware and microcode level-A to list microcode information for all supported devices
-c To display levels without using menus
-r To display levels in tabular format
-d <device Name> to display mictocode level for a device
lsmcode -c The current permanent system firmware image is AM730_035 The current temporary system firmware image is AM730_035 The system is currently booted from the temporary firmware image. lsmcode -A sys0!system:AM730_035 (t) AM730_035 (p) AM730_035 (t) hba0!2514300014108c03.RR0120 hba1!2514300014108c03.RR0120 sissas0!53495320.04200029 sissas1!53495322.04220029 hdisk0!ST91468.A1700D26.43413036 hdisk1!ST91468.A1700D26.43413036 fcs0!df1000fe-0002.271315 fcs1!df1000fe-0002.271315
Backup
Backup and Recovery
Backup rootvg using mksysbBackup and restore volume groups using savevg and restvg
restvg
backup
Restore files backed-up using mksysb/backup commands
Backup rootvg using mksysb
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
-e /excludes files in /etc/exclude.rootvg -i to create image.data file -v verbose mode -X extend /tmp filesystem if necessory for storing boot image
-i option calls mkszfile command which inturn creats /image.data file.
The bootable mksysb volume contains four images
- Boot image
- bosinstall image (image.data, bosinst.data, tapeblksz, etc..)
- An empty table of contents
- 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.
With these two files, it is possible to carry out an un-attended installation.
Examples:
To create system backup and create an /image.data file
# mksysb -i /dev/rmt0
To exclude files and directories stored in /etc/exclude.rootvg file
# mksysb -i -e /dev/rmt0
To store the mksysb image to a file called /stage/backp/mksysb.img
# mksysb /stage/backp/mksysb.img
Backup or restore VGs using savevg and restvg
savevg command is used to backup volume groups other than rootvgrestvg command is used to restore volume groups other than rootvg
savevg
-e excludes files/directories being backed in /etc/exclude.<vgname> file -i creates /tmp/vgdata/<vgname>/<vgname>.data file -f <device> device or filename on which the image to be stored -v verbose mode -X automatically expand /tmp filesystem if required
-i option calls mkvgdata command which inturn creates /tmp/vgdata/<vgname>/<vgname>.data file
restvg
Backing up a filesytem or files
restore
-q tells restore commnad that volume is ready -t, -T to list the list of files in the backup archive -v verbose -r restores all files in the filesystem archive -x to restore specifig files/directories -d to restore all files in a directory if the File parameter is a directory -s <number> To seek and restore the multiple backup tapes
To list the names of files in either a file-name or file-system archive
# restore -Tq -f /dev/rmt0
To list all the files in a mksysb tape backup
# restore -Tvqs 4 -f /dev/rmt0.1
To restore an entire file-system archive, enter:
# restore -rvqdf /dev/rmt0
To restore a specific file
# restore -xvqf myhome.bkup system.data
To restore a specific file "/etc/passwd" from mksysb image file "mksysb.host1"
# restore -xvqdf mksysb.host1 ./etc/passwd
Extracting data from mksysb tape
a. Rewind the tape using the command: # tctl -f /dev/rmt0 rewind b. Move the tape forward to the third tape marker (beginning of fourth image): # tctl -f /dev/rmt0.1 fsf 3 c. Restore data: # restore -xqvf /dev/rmt0.1 /tmp/my_file
DUMP
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.
- List of currently running processes and related information about the process
- Curretnly mounted filesystems, inode table and open file table
- currently configured ttys and their status
- Memory buffers for data
- system buffers
- system variables and statistics
- Kernel's own record of process it is currently running.
Configuring dump devices
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:
To permanently make /dev/hd7 as the primary dump device
# sysdumpdev -Pp /dev/hd7
To make /dev/sysdumpnull as the secondary dump device
# sysdumpdev -s /dev/sysdumpnull
To estimate the dump size
#susdumpdev -e
To start the dump manually
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.
# sysdumpstart {-p | -s}
Copying system 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
-a gathers all system configuration information -c creates compressed pax image (snap.pax.Z) -e HACMP specifig information -g gathers general info -f gathers filesystem info -k gathers kernel info -d <directory> optional snap commnad output directory default directory is /tmp/ibmsupt -D gathers dump and /unix -o <output_device> cpoies the compressed image to tape or diskette
Example:
To send dump with other gathered information in to tape drive
# snap -gfkD -o /dev/rmt0
Examing system dump
kdb command is an interactive utility for examining an OS image or the running kernel.
kdb <systemImageFile [KernelFile]]
LED Codes Related to dump
0c0 - Dump completed successfully 0c2 - Dump started 0c4 - Dump unsuccesful. Not enough space on dump device 0c5 - Dump failed to start 0c9 - System initiated dump started
Paging
Swap space related commands and files in AIX
swapon swapoff lsps chps mkps rmps /etc/swapspaces
swapon: Used to activate a paging space.
swapon -a --> activates all paging devices specified on /etc/swapspaces swapon < Device Name > --> Activates the specified paging space
mkps: This command is used to add an additional paging space.
Syntax:
Syntax:
mkps [ -a ] [ -n ] [ -s Number of LPs ] VG_Name -a activates the paging space during next reboot -n activates the paging space immediately
chps: This command is used to change the attributes of a paging space
Syntax:
Syntax:
chps [ -a LPs | -d LPs ] [ -a { y | n } ] paging_space_name -s Specifies the number of logical partitions to add -d specifies the number of logical partitions to subtract -a To specify to use the Paging Space at the next reboot
Cookbook to add / remove paging space dynamically
To add a paging space "paging0"
01. Create a new LV for paging space
mklv -t paging -y paging0 rootvg 10
02. Add the entry in /etc/swapspaces to activate the paging space during next reboot
chps -a y paging0
03. Activate the paging space
swapon /dev/paging0
To remove an active paging space "paging00"
1. Deactivate the paging space using swapoff commnad
# swapoff /dev/paging00
2. remove the paging space using rmps command
# rmps paging00
03. Remove the entry from /etc/swapspaces so that it is not activated during next reboot
# chps -a n paging00
LVM
synclvodm -Pv <vgname>
If you receive one of the following errors from the fsck or mount commands, the problem may be a corrupted superblock:
imfs -x -l <lvname>
imfs -l <lv_name>
imfs -l <lv_name>
getlvcb -AT <lvname>
VG Related commands
# lsvg - to list all the VGs # lsvg -o - To list all the active VGs # lsvg -l testvg -- To list the all the LVs in testvg # lsvg -p testvg -- To list all the PVs belongs to testvg # lsvg -i -- to read VG names from standard input
To sync the stale partitions on VG
# varyonvg vgname
To increase the LUN size and increase the file system
bootinfo -s hdiskxx chvg -g vgname # to make the new PPs available for the VG chlv -x xxxxx lv_name # to increase the max the PP of the LV if required chfs -a size=+20G <file_system> # to increase the file system size.
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 erpsb4ci0:/ # mkvg -s 512 -y saplocvg hdisk36 0516-1254 mkvg: Changing the PVID in the ODM. saplocvg erpsb4ci0:/ # lsvg saplocvg VOLUME GROUP: saplocvg VG IDENTIFIER: 00c33e2e00004c0000000111a483c8ab VG STATE: active PP SIZE: 512 megabyte(s) VG PERMISSION: read/write TOTAL PPs: 999 (511488 megabytes) MAX LVs: 256 FREE PPs: 999 (511488 megabytes) LVs: 0 USED PPs: 0 (0 megabytes) OPEN LVs: 0 QUORUM: 2 TOTAL PVs: 1 VG DESCRIPTORS: 2 STALE PVs: 0 STALE PPs: 0 ACTIVE PVs: 1 AUTO ON: yes MAX PPs per VG: 32512 MAX PPs per PV: 1016 MAX PVs: 32 LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no HOT SPARE: no BB POLICY: relocatable mklv -y saplocvg_log -t jfs2log saplocvg 1 hdisk36 saplocvg_log logform -V jfs2 /dev/saplocvg_log logform: destroy /dev/rsaplocvg_log (y)?y mklv -y sapmntlv -t jfs2 saplocvg 64 hdisk36 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 crfs -v jfs2 -d /dev/sapmntlv -m /sapmnt -A yes -p rw File system created successfully. 33553204 kilobytes total disk space. New File System size is 67108864
If you want to create a file system with INLINE log or with no log
crfs -v jfs2 -d LV_Name -m Mount_Point -A yes -p rw -a logname=INLINE -u Mount_Group
To change the default block size while creating the file systems
crfs -v jfs2 -d LV_Name -m Mount_Point -A yes -p rw -a logname=INLINE -u Mount_Group -a agblksize=4096
crfs -v jfs2 -d LV_Name -m Mount_Point -A yes -p rw -a logname=INLINE -u Mount_Group -a agblksize=4096
To change the file system use INLINE log instead of external jfs2log
chfs -a dev=/dev/lv00 -a log=INLINE /myfilesystem
To make the file system not to use any log
chfs -a dev=/dev/lv00 -a log=NULL /myfilesystem
Mirror the rootvg to hdisk1
extendvg -f rootvg hdisk1 chvg -Qn rootvg mklv -t sysdump -y lg_dumplvx rootvg 64 hdisk1 sysdumpdev -P -s /dev/lg_dumplvx mklvcopy hd2 2 hdisk1 mklvcopy hd3 2 hdisk1 mklvcopy hd4 2 hdisk1 mklvcopy hd5 2 hdisk1 mklvcopy hd6 2 hdisk1 mklvcopy hd8 2 hdisk1 mklvcopy hd9var 2 hdisk1 mklvcopy hd10opt 2 hdisk1 mklvcopy nmon_lv 2 hdisk1 syncvg -v rootvg bosboot -a -d /dev/hdisk0 bosboot -a -d /dev/hdisk1 bootlist -m normal -o hdisk0 hdisk1
While trying to extend the filesystem, getting the following error.
0516-787 extendlv: Maximum allocation for logical volume backuplv is 6600
This is because, the maximum LP is set to 6600 for that LV. We can can change it using chlv command.
0516-787 extendlv: Maximum allocation for logical volume backuplv is 6600
This is because, the maximum LP is set to 6600 for that LV. We can can change it using chlv command.
# chlv -x 8000 testlv
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
synclvodm rootvg hd7 synclvodm rootvg
To changes an available disk device to a physical volume by assigning a PVID
# chdev -l hdisk7 -a pv=yesTo clear the boot record located on physical volume hdisk1, use the command:
# chpv -c hdisk1To define hdisk3 as a hot spare, use the command:
# chpv -hy hdisk3To remove hdisk3 from the hot spare pool of its volume group, use the command:
# chpv -hn hdisk3
Filesystems
Recovering from super block errorsIf you receive one of the following errors from the fsck or mount commands, the problem may be a corrupted superblock:
fsck: Not an AIX3 file system fsck: Not an AIXV3 file system fsck: Not an AIX4 file system fsck: Not an AIXV4 file system fsck: Not a recognized file system type mount: invalid argumentThe problem can be resolved by restoring the backup of the superblock over the primary superblock using one of the following commands:
dd count=1 bs=4k skip=31 seek=1 if=/dev/lv00 of=/dev/lv00
To mount an ISO file to the system
$ loopmount -i cdrom.iso -o "-V cdrfs -o ro" -m /mnt
To unmount an ISO:
$ loopmount -l loop0 -m /mnt
NIM
nimconfig -a pif_name=en0 -a master_port=1058 -a netname = net2 -a cable_type=tp
To list all the mksysb resources
# lsnim -t mksysb
# lsnim -t spot
To list all the machines
# lsnim -t standalone
OR
# lsnim -c machines
To reset the NIM status of system host-10
# nim -o reset -a force=yes host-10
or
# nim -Fo reset host10
To Force Deallocate all the resources from system host-01
# nim -Fo deallocate -a subclass=all host-01
To rebuild the /etc/niminfo file in the master
# nimconfig -r
To rebuild the /etc/niminof file in the NIM client
# niminit -a master=<master_name> -a name=<client_machine_name>
To remove a machine from the NIM environment
# nim -o remove <machine_name>
To define a mksysb resource
# nim -o define -t mksysb -a server=master -a location=<location_of_mksysb_file> <mksysb_name>
To define a postinstall script
# nim -o define -t script -a server=master -a location=/export/nim/postscripts/postinstall.sh postinstall-script
To define a new Network called ent-192-168-1 with network address 192.168.1.0 and mask 255.255.255.0
# nim -o define -n ent-192-168-1 -t ent -a 192.168.1.0 -s 255.255.255.0 -g 192.168.1.0
To define a new system called "server1'
# nim -o define -t standalone -a platform=chrp -a netboot_kernel=64 -a cable_type1=tp -a if1="network_name server1 0" server1
To enable Base OS install in a client using mksysb resource
# nim -o bos_inst -a source=mksysb -a spot=spot_53ML4 -a accept_licenses=yes
-a mksysb=<location_of_mksysb_file> <system_name>
To add additional software to lppsource1
# nim -o update -a packages=all source=/dev/cd0 lppsource1
To update the spot and lppsource to the latest level
# nim_update_all -l <lpp_sourcename> -s <spot_name> -d <localtion_of_filesets> -u -B
Some useful NIM SMIT Fast paths
smit nim_mkmac # Adding new machines smit nim_bosinst # For doing BOS install operation on a machine
Common NIM Error codes
608 - tftp retrieve of client info file failure
Action If a 608 hang is encountered, verify that the ClientName.info file exists in the /tftpboot directory. If it does not exist, retry the NIM operation to create it. If it does exist, verify that tftp access to the /tftpboot directory is not restricted in the /etc/tftpaccess.ctl file. is also possible that the network adapter was not configured properly in the boot environment
Action If a 608 hang is encountered, verify that the ClientName.info file exists in the /tftpboot directory. If it does not exist, retry the NIM operation to create it. If it does exist, verify that tftp access to the /tftpboot directory is not restricted in the /etc/tftpaccess.ctl file. is also possible that the network adapter was not configured properly in the boot environment
611 - Remote mount of NFS file system failure
Action 611 hangs occur when the client machine is unable to mount a resource from a server. Ensure that NFS is running on the resource server. Verify that the resources specified for the operation are exported properly by checking the /etc/exports and /etc/xtab files on the server. Also, confirm that the resources have permissions set correctly for reading.
Action 611 hangs occur when the client machine is unable to mount a resource from a server. Ensure that NFS is running on the resource server. Verify that the resources specified for the operation are exported properly by checking the /etc/exports and /etc/xtab files on the server. Also, confirm that the resources have permissions set correctly for reading.
613 - Failure setting up route tables
Action 613 hangs usually occur because a route is incorrectly defined for a network in the NIM database. Verify that the correct gateways are specified between networks, and all gateways are functional. Use debug-enabled network boot images to determine which routes could not be defined.
Action 613 hangs usually occur because a route is incorrectly defined for a network in the NIM database. Verify that the correct gateways are specified between networks, and all gateways are functional. Use debug-enabled network boot images to determine which routes could not be defined.
Migrating AIX to new versions USING NIM LIVE alt_disk_install
It can be done using nimadm command.Updating NIM lppsource and SPOT
If your NIM environment has a mixture of TL levels, then in order to have some NIM clients at the original level, you need to keep a copy of the original lpp_source and SPOT level. These clients will still need the original level of lpp_source and SPOT.
01. Create a new lppsource directory. In this example, we will update AIX 6.1 TL 6 to TL 7
mkdir /export/nim/lppsource/6107
02. Copy the TL6 lopsource to TL 7 directory
cp -rp /export/nim/lppsource/6106/* /export/nim/lppsource/6107
03. Create a new lppsource for TL7 using the copied files
nim -o define -t lpp_source -a server=master -l /export/nim/lppsource/6107 6107-lppsource
04. Update the lppsource to the latest level. If the updates of are stored in the /updates directory, then
nim -o update -a packages=all -a source=/updates 6107-lppsource
05. After lpp_source is updated, there might be
some duplicate updates. You can perform the NIM lppmgr operation to
remove them. This operation enables you remove any duplicate software,
superseded updates, unnecessary languages, and non-simage software.
nim -o lppmgr -a lppmgr_flags="-bu -x -r -e" 6107-lppsource
06. Create a new SPOT using the updated lppsource
Networking
To find out the link status, link speed and mac address and statistics of an Ethernet adapter ent0
To change the Network speed
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 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.
# entstat -d ent0 (or entstat -dt en0) ETHERNET STATISTICS (ent0) : Device Type: 10/100/1000 Base-TX PCI-X Adapter (14106902) Hardware Address: 00:11:25:08:1c:21 Transmit Statistics: Receive Statistics: -------------------- ------------------- Packets: 242183399 Packets: 318139934 Bytes: 41638159225 Bytes: 234717791764 Interrupts: 0 Interrupts: 172984103 Transmit Errors: 0 Receive Errors: 0 Packets Dropped: 0 Packets Dropped: 0 Bad Packets: 0 Max Packets on S/W Transmit Queue: 21 S/W Transmit Queue Overflow: 0 Current S/W+H/W Transmit Queue Length: 1 Broadcast Packets: 16676 Broadcast Packets: 6200001 Multicast Packets: 0 Multicast Packets: 0 No Carrier Sense: 0 CRC Errors: 0 DMA Underrun: 0 DMA Overrun: 0 Lost CTS Errors: 0 Alignment Errors: 0 Max Collision Errors: 0 No Resource Errors: 0 Late Collision Errors: 0 Receive Collision Errors: 0 Deferred: 0 Packet Too Short Errors: 0 SQE Test: 0 Packet Too Long Errors: 0 Timeout Errors: 0 Packets Discarded by Adapter: 0 Single Collision Count: 0 Receiver Start Count: 0 Multiple Collision Count: 0 Current HW Transmit Queue Length: 1 General Statistics: ------------------- No mbuf Errors: 0 Adapter Reset Count: 1 Adapter Data Rate: 2000 Driver Flags: Up Broadcast Debug Running Simplex 64BitSupport ChecksumOffload PrivateSegment LargeSend DataRateSet 10/100/1000 Base-TX PCI-X Adapter (14106902) Specific Statistics: ----------------------------------------------------------------- Link Status : Up Media Speed Selected: Auto negotiation Media Speed Running: 1000 Mbps Full Duplex PCI Mode: PCI-X (100-133) PCI Bus Width: 64-bit Latency Timer: 144 Cache Line Size: 128 Jumbo Frames: Disabled TCP Segmentation Offload: Enabled TCP Segmentation Offload Packets Transmitted: 681521 TCP Segmentation Offload Packet Errors: 0 Transmit and Receive Flow Control Status: Disabled Transmit and Receive Flow Control Threshold (High): 49152 Transmit and Receive Flow Control Threshold (Low): 24576 Transmit and Receive Storage Allocation (TX/RX): 8/5
To find out the statistics of each adapter in a etherchannel
entstat -dt en2 # where en2 is a etherchannel device. This output give statistics about ent1 and ent2 including the link status and speed.
To find out the MAC address, Hardware/Physical location of a network card
# lscfg -vpl ent1 ent1 U7879.001.DQDGMBD-P1-T6 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902) 2-Port 10/100/1000 Base-TX PCI-X Adapter: Network Address.............001125E6ACAA ROM Level.(alterable).......DV0210 Hardware Location Code......U7879.001.DQDGMBD-P1-T6 PLATFORM SPECIFIC Name: ethernet Node: ethernet@1 Device Type: network Physical Location: U7879.001.DQDGMBD-P1-T6
Setting multiple IP address for a single network card
# ifconfig lo0 alias 195.60.60.1 # ifconfig en0 alias <IPadress> netmask <net_mask>
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.
# chdev -l en0 -a alias=<IP_address>,<netmask>
To delete a static route manually
Syntax:- chdev -l inet0 -a delroute=<net>,<destination_address>,<Gate_way_address>,<Subnet_mask>
Syntax:- chdev -l inet0 -a delroute=<net>,<destination_address>,<Gate_way_address>,<Subnet_mask>
# chdev -l inet0 -a delroute='net','0.0.0.0','172.26.160.2'
To change the IP address of an interface manually
# chdev -l en0 -a netaddr=192.168.123.1 -a netmask=255.255.255.0 -a state=up
To set the IP address initially
# mktcpip -h <hostname> -a <ipaddress> -m <subnet_mask> -i <if_name> -n <NameServer_address> -d <domain_name> -g <gateway_address> -A no
Smit fast paths
# smit chinet or smit inet
Name resolution order
We can achieve in two ways.01. By modifying /etc/netsvc.conf file 02. By setting NSORDER Variable. (NSORDER Overrides /etc/netsvc.conf.
To change the Network speed
# ifconfig en0 down detach # chdev -l ent0 -a media_speed=...... # ifconfig en0 up
Network Options:
no command is used to change the network tuning parameters.
To list the current network parameters / network options
# no -a
To enable IP forwarding
# no -o "ipforwarding=1"
To make ipforwarding=1 permanent now and after reboot
# no -p -o ipforwarding=1
To make the mbuff value to 200000 after the reboot
# no -r -o ipforwarding=1
To set the ipforwarding to the default level
# no -d ipforwarding
Network Packet Tracing and analyzing commands
Iptrace, Ipreport and tcpdump commands are used to trace and analyze network packets in AIX.
Using iptrace and ipreport utility:
1. Log in as a root user, then type the following command to start the iptrace utility:
# startsrc -s iptrace -a -s it-ibm01 \ -d it-ibm100 -p tcp -i en0 /tmp/iptrace.raw
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
3. To format the report
# ipreport -srn /tmp/iptrace.raw > /tmp/iptrace.rpt
Using tcpdump utility:
1. To start tcpdump utility:
# tcpdump -i en0 -w /tmp/tcpdump.raw host it-ibm01 and it-ibm100 and tcp
2. To read the captured /tmp/tcpdump.raw file
# tcpdump -v -x -r /tmp/tcpdump.raw > /tmp/tcpdump.rpt
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 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.
Network Interface Backup
Network Interface Backup protects against a single point of network failure by providing failure detection and failover with no disruption to user connections. When operating in this mode, only one adapter is active at any given time. If the active adapter fails, another adapter in the EtherChannel will be used for all traffic. When operating in Network Interface Backup mode, it is not necessary to connect to EtherChannel-enabled switches.
Network Interface Backup protects against a single point of network failure by providing failure detection and failover with no disruption to user connections. When operating in this mode, only one adapter is active at any given time. If the active adapter fails, another adapter in the EtherChannel will be used for all traffic. When operating in Network Interface Backup mode, it is not necessary to connect to EtherChannel-enabled switches.
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.
To create a etherchannel with Network Backup
# mkdev -c adapter -s pseudo -t ibm_ech -a adapter_names='ent0' -a backup_adapter='ent2' ent3 Available # lsattr -El ent3 adapter_names ent0 EtherChannel Adapters True alt_addr 0x000000000000 Alternate EtherChannel Address True auto_recovery yes Enable automatic recovery after failover True backup_adapter ent2 Adapter used when whole channel fails True hash_mode default Determines how outgoing adapter is chosen True mode standard EtherChannel mode of operation True netaddr 0 Address to ping True noloss_failover yes Enable lossless failover after ping failure True num_retries 3 Times to retry ping before failing True retry_time 1 Wait time (in seconds) between pings True use_alt_addr no Enable Alternate EtherChannel Address True use_jumbo_frame no Enable Gigabit Ethernet Jumbo Frames True
ODM
Object Data Manager (ODM)
What is ODM?
Location of ODM Repositories
Some ODM Database files
Some Useful ODM commands
ODM commands - examples
Location of ODM Repositories
Some ODM Database files
Some Useful ODM commands
ODM commands - examples
What is ODM?
ODM- Maintains system config, device and vital product data
- Provide a more robust, secure and sharable resource
- Provide a reliable object oriented database facility
Data Managed By ODM
- Device Configuration Information
- Software Vital Product Data
- SRC information
- Communications configuration data
- Menus and commands for SMIT
ODM has three components
- Object class - These are datafiles.
- Objects - Records within Datafiles
- Descriptors - Field within a record
Where ODM Object Class files are stored?
This can be defined in /etc/environment file. The ODM object clases are held in three repositories- /etc/objrepos
- /usr/lib/objrepos
- /usr/share/lib/objrepos
Some important ODM Database files
Supported devices and attributes and connection information are stored inPdDv, PdAt, PdCn, etc..
Records or customizrd Devices and attributes, VPD are stored in
CuDv, CuAt, CuDep, Config_Rules, CuVPD, etc ...
Have software information
lpp, history, product, inventory, etc..
SMIT menus, commands, options
sm_cmd_hdr, sm_cmd_opt, sm_menu_opt
NIM Resource and configuraion informations
nim_object, nim_pdattr, nim_altr
Errorlog, alog and dump file info
SWservAt
Useful ODM Commands
odmget - To retrives objects from an Object Class in stanza format odmdelete - To delete objects what meet a specifig criteria. If no criteria specified, all objects are deleted odmadd - To add a new object to an object class odmchange - To change all objects with in an Object Class that meet a specifig criteria odmshow - To display object class definition odmcreate - To create Object Class for application that will use ODM DB odmdrop - To remove an Oobject ClassSome ODM Command examples
To list all records with an Object Class CuDv# odmget CuDv
To find out an object within CuAt with condition name=sys0 and attibute=maxuproc
# odmget -q "name=sys0 and attribute=maxuproc" CuAt
CuAt:
name = "sys0"
attribute = "maxuproc"
value = "2000"
type = "R"
generic = "DU"
rep = "nr"
nls_index = 20
To delete the above object
# odmget -q "name=sys0 and attribute=maxuproc" CuAt > file.1
# odmdelete -q "name=sys0 and attribute=maxuproc" -o CuAt
To add the deleted object again to the above object class
# odmadd file.1 # add the file content to appropriate Object class
Fix ODM related errors for devices (CuDv Object Class)
$ cfgmgrcfgmgr: 0514-604 Cannot access the CuDv object class in the
device configuration database.
The Fix:
01. cd /etc/oberepos
02. cp Config_Rules Config_Rules.backup
03. odmget -q rule="/etc/methods/darcfgrule" Config_Rules
04. odmdelete -q rule="/etc/methods/darcfgrule" -o Config_Rules
05. savebase -v
06. cfgmgr
Performance Monitoring and Tunig
Monitoring Commands
nmon vmstat iostat sar topas nmon svmon filemon mpstat rmss netpmon
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:
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:
- vmstat 5 2
kthr memory page faults cpu ----- ----------- ------------------------ ------------ ----------- r b avm fre re pi po fr sr cy in sy cs us sy id wa 1 1 197167 477552 0 0 0 7 21 0 106 1114 451 0 0 99 0 0 0 197178 477541 0 0 0 0 0 0 443 1123 442 0 0 99 0
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 Disks: % tm_act Kbps tps Kb_read Kb_wrtn hdisk3 0.0 0.3 0.0 258032 224266 hdisk2 0.1 1.1 0.0 258088 1658678
To display the adapter information
# iostat -t -a -D System configuration: lcpu=120 drives=27 paths=252 vdisks=0 tapes=0 Adapter: fcs0 xfer: bps tps bread bwrtn 1.1M 47.7 468.3K 668.8K Adapter: fcs1 xfer: bps tps bread bwrtn 800.2K 34.7 330.9K 469.3K
To display disk statistics including queue info in long list format
# iostat -lD System configuration: lcpu=120 drives=27 paths=252 vdisks=0 Disks: xfers read write queue -------------- -------------------------------- ------------------------------------ ------------------------------------ -------------------------------------- %tm bps tps bread bwrtn rps avg min max time fail wps avg min max time fail avg min max avg avg serv act serv serv serv outs serv serv serv outs time time time wqsz sqsz qfull hdisk1 0.6 58.6K 12.3 1.8K 56.8K 0.1 3.8 0.0 0.0 0 0 12.2 5.4 0.8 92.3 0 0 0.5 0.0 47.0 0.0 0.0 0.2 hdisk0 0.5 63.6K 12.5 6.9K 56.7K 0.3 2.5 2.6 7.1 0 0 12.2 5.0 0.3 100.0 0 0 0.4 0.0 50.3 0.0 0.0 0.2 hdisk8 5.0 908.7K 81.5 203.2K 705.5K 17.1 17.6 0.2 284.0 0 0 64.5 540.5 0.3 40.7 0 0 2.3S 0.0 26.6 215.0 36.0 21.3 hdisk2 1.8 55.4K 3.4 45.9K 9.6K 2.8 12.4 0.2 11.8 0 0 0.6 156.5 0.3 11.6 0 0 4.5 0.0 0.0 0.0 0.0 0.0 hdisk6 5.3 931.6K 85.3 254.3K 677.3K 22.5 13.9 0.2 420.5 0 0 62.8 563.9 0.2 38.0 0 0 1.2S 0.0 10.4 107.0 36.0 18.7 hdisk7 5.0 944.0K 85.5 208.7K 735.3K 17.3 17.5 0.2 313.6 0 0 68.2 497.0 0.3 43.7 0 0 2.2S 0.0 27.2 215.0 35.0 22.0
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.
- The inuse counter represents the number of used frames.
- The free counter represents the number of free frames from all memory pools.
- The pin counter represents the number of pinned frames, that is, frames that cannot be swapped.
- The virtual counter represents the number of pages allocated in the system virtual space.
- The paging space counter represents the number of pages reserved or used on paging spaces.
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 work pers clnt pin 444363 0 0 in use 1609451 0 2305342 PageSize PoolSize inuse pgsp pin virtual s 4 KB - 3787625 6622 370027 1482283 m 64 KB - 7948 0 4646 7948 # 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 Vsid Esid Type Description LPage Inuse Pin Pgsp Virtual 0 0 work kernel seg - 4375 2176 847 4375 48412 2 work process private - 2357 2 0 2357 6c01b d work shared library text - 1790 0 0 1790 4c413 f work shared library data - 11 0 0 11 3040c 1 pers code,/dev/prodlv:4097 - 2 0 - - ginger :svmon -P 13548 -i 1 3 Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd LPage 13548 pacman 8589 2178 847 8587 N N N Vsid Esid Type Description LPage Inuse Pin Pgsp Virtual 0 0 work kernel seg - 4375 2176 847 4375 48412 2 work process private - 2411 2 0 2411 6c01b d work shared library text - 1790 0 0 1790 4c413 f work shared library data - 11 0 0 11 3040c 1 pers code,/dev/prodlv:4097 - 2 0 - -
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.
trcstop command is used to stop the filemon monitoring.
The syntax of filemon command is
filemon [-o output_file] [-O levels] [-u] [-v] -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.
To start the filemon monitoring for 1 min.
# filemon -uo filemon.out -O all ; sleep 60; trcstop
To find out the most active Logical Volumes
# awk '/Most Active Logical Volumes/,/^$/' filemon.out Most Active Logical Volumes ------------------------------------------------------------------------ util #rblk #wblk KB/s volume description ------------------------------------------------------------------------ 0.04 4208 0 34.9 /dev/paging00 paging 0.04 4000 0 33.2 /dev/hd6 paging 0.01 1680 11408 108.6 /dev/oralvr32 /oracle/R32 0.00 0 264 2.2 /dev/hd8 jfs2log
To find out most active Files
# awk '/Most Active Files/,/^$/' filemon.out
To find out most active physical Volumes
# awk '/Most Active Physical Volumes/,/^$/' filemon.out
rmss
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.
To change the memory size to 500 MB,
# 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
The /etc/tunables commands
To manage its files in the /etc/tunables directory, new commands have been added to AIX. They are as follows:
To manage its files in the /etc/tunables directory, new commands have been added to AIX. They are as follows:
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.
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.
ioo, vmo and no commands:
These commands are used to set or display current or next boot values of different tuning parameters.- ioo for IO tuning parameters
- vmo for Virtual Memory Manager parameters
- no for network 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).
The following flags are common for ioo, vmo and no commands.
-L [tunable] List the characteristics of one or all tunables -d tunable - Resets 'tunable' to default value -o [tunable] - Display the current value of 'tunable' -o tunable=<value> - Set the 'tuneble' to new value -D - Resets all tunables to their default value -p - Changes apply to both current and reboot values (/etc/tunables/nextboot file updated) -r - Changes apply to only reboot values (/etc/tunables/nextboot file updated)
Examples:
# vmo -p -o minfree=1200 -o maxfree=1280 # ioo -r -o maxpgahead=64 -o j2_minPageReadAhead=8 # no -r -o rfc1323=1 -o tcp_recvspace=262144 -o tcp_sendspace=262144
A sample /etc/tunables/nextboot file.
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.
aio (Asynchronous IO)
AIO is an AIX software subsystem that allows processes to issue I/O operations without waiting for I/O to finish. Because both I/O operations and applications processing run concurrently, they essentially run in the background and improve performance. This is particularly important in a database environment.- Prior to AIX 6.1, AIO is a device whose details are stored in the ODM and managed using the ‘chdev’ command.
- From AIX 6.1 and above, AIO is no longer a device, and is managed using the ‘ioo’ command.
- AIO is a prerequisite of Oracle, and must be ‘enabled’ prior to installing Oracle.
Prior to AIX 6.1, AIO is enabled as follows:
smit aio or chdev –l aio0 –aautoconfig=available -a minservers=100 -a maxservers=100 -a maxreqs=9152 mkdev aio0 chdev –l posix_aio0 –aautoconfig=available mkdev posix_aio0 aioo ### To manage aio parametersminserver: Minimum number of kernel processes dedicated to asynchronous I/O processing
masservers: Maxiimum number of kernel processes dedicated to AIO processing
maxreqs: maximum number of asynchronous I/O requests that can be outstanding at one time
autoconfig: The state to which AIO is to be configured during system initialization. The possible values are "defined", which means that AIO cannot be used, and "available"
From AIX 6.1 and above, AIO is activated ‘dynamically’
as and when a program makes a call to AIO, so it is no longer necessary
to manually enable AIO. The ‘ioo’ command is used change the properties
of AIO only.
# ioo -a aio_active = 0 aio_maxreqs = 65536 aio_maxservers = 30 aio_minservers = 3 aio_server_inactivity = 300 j2_atimeUpdateSymlink = 0 j2_dynamicBufferPreallocation = 16 j2_inodeCacheSize = 400 j2_maxPageReadAhead = 128 j2_maxRandomWrite = 0 j2_metadataCacheSize = 400 j2_minPageReadAhead = 2 j2_nPagesPerWriteBehindCluster = 32 j2_nRandomCluster = 0 j2_syncPageCount = 0 j2_syncPageLimit = 16 lvm_bufcnt = 9 maxpgahead = 8 maxrandwrt = 0 numclust = 1 numfsbufs = 196 pd_npages = 65536 posix_aio_active = 0 posix_aio_maxreqs = 65536 posix_aio_maxservers = 30 posix_aio_minservers = 3 posix_aio_server_inactivity = 300
Disk IO pacing (High water-mark and Low Water-mark)
AIX 6.1 enables I/O pacing by default. In AIX 5.3, you needed to explicitly enable this feature.The way it does this is by setting the sys0 settings of minpout and maxput parameters to 4096 and 8193, respectively:
Disk-I/O pacing is intended to prevent programs that
generate very large amounts of output from saturating the systems 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>
To change the high water-mark level
# chdev -a maxpout=20 -l sys0
Network Monitoring
netpmon Monitors activity and reports statistics on network I/O and network-related CPU usage. The netpmon command monitors a trace of system events, and reports on network activity and performance during the monitored interval. By default, the netpmon command runs in the background while one or more application programs or system commands are being executed and monitored. The netpmon command automatically starts and monitors a trace of network-related system events in real time. By default, the trace is started immediately; optionally, tracing may be deferred until the user issues a trcon command. When tracing is stopped by a trcstop command, the netpmon command generates all specified reports and exits.# netpmon Run trcstop command to signal end of trace. Fri Mar 23 10:08:43 2012 System: AIX 6.1 Node: nbmedia200 Machine: 00C7C24E4C00 # trcstop [netpmon: Reporting started] ======================================================================== Process CPU Usage Statistics: ----------------------------- Network Process (top 20) PID CPU Time CPU % CPU % ---------------------------------------------------------- netpmon 2294244 6.8347 9.820 0.000 ps 3080288 0.0156 0.022 0.000 ps 983804 0.0146 0.021 0.000 ps 3145998 0.0143 0.021 0.000 ps 3015104 0.0129 0.019 0.000 trcstop 3080290 0.0053 0.008 0.000 ksh 1835464 0.0051 0.007 0.000 topasrec 2228292 0.0051 0.007 0.000 ---------------------------------------------------------- Total (all processes) 6.9672 10.011 0.003 Idle time 59.3796 85.319 ======================================================================== First Level Interrupt Handler CPU Usage Statistics: --------------------------------------------------- Network FLIH CPU Time CPU % CPU % ---------------------------------------------------------- data page fault 0.0495 0.071 0.000 UNKNOWN 0.0170 0.024 0.000 PPC decrementer 0.0024 0.003 0.000 external device 0.0000 0.000 0.000 queued interrupt 0.0000 0.000 0.000 ---------------------------------------------------------- Total (all FLIHs) 0.0689 0.099 0.000 ======================================================================== Network Device-Driver Statistics (by Device): --------------------------------------------- ----------- Xmit ----------- -------- Recv --------- Device Pkts/s Bytes/s Util QLen Pkts/s Bytes/s Demux ------------------------------------------------------------------------------ ethernet 0 0.69 74 0.1% 0.00 1.61 243 0.0000 ethernet 1 0.00 0 0.0% 0.00 0.23 136 0.0000 ========================================================================
Software
Software Stats
Listing Installed Software
Installing Filesets/Software
Installing PTFS/Patches
Updating the software to the latest level
Installing emergency fixes in AIX
Listing Installed Software
Installing Filesets/Software
Installing PTFS/Patches
Updating the software to the latest level
Installing emergency fixes in AIX
When a software or an update is first installed, it is in the APPLIED state. It can be later commited or rejectd.
APPLIED state
- Provide opportunity to test the software
- Enable to go back to the previous version in case of any problem
- Enable to commit software at a later stage
- Requires more disk
- Prevents future re-installation of product
COMMITED stage
- Requires less disk space
- Permits future upgrade
- Prevents from easily going back to previous version
Reject action removes the APPLIED software and go back to the previous commited version
To list all the installed software
# lslpp -l
To display the maintenance level and state of a fileset
# lslpp -l bos.net.nfs.client
Lists installed software using ':' as the delimeter
# lslpp -Lc
To display the names of all the files of fileset bos.perf
# lslpp -f bos.perf
To find out which fileset a file belongs to
# lslpp -w /usr/sbin/nfsd
To list installation history of filesets
# lslpp -ha
To the filesets that do not have the required prerequisites or are not completely installed
# lslpp -v
Install filesets / software
installp command is used to install the software. The options are
-a Install filesets in APPLIIED state -c Commit filesets -r Reject filesets which are in APPLIED state -u Uninstall filesets -C Cleanup failed installtion -g To Install or Uninstall dependencies -x To expand file systems if there is not enough space -d <device> Device or directory which contains the software -f <filename> User created file which has a list of software to be installed or deleted
Emaples:
To list all installable software in media /dev/cd0
installp [-L|-l] -d /dev/cd0
To cleanup all failed installtion
installp -C
To install bos.net software (apply and commit) package with all pre-requisites from directory /tmp/net
installp -acgx -d /tmp/net bos.net
To commit teh applied updates
installp -cgx all
To remove bos.net package
installp -ug bos.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.
To find out whether a Fix is installed or not
# instfix -i -k <APAR Number>
To list all the fixes that are installed on your system
# instfix -i -v
To list filesets which are lesser than the specified maintenance level
# instfix -ciqk 5100-04_AIX_ML | grep ":-:"
To install all filesets associated with fix Ix38794 from the tape
# instfix -k Ix38794 -d /dev/rmt0
To Display the entire list of fixes present on the media
# instfix -T -d /dev/cd0
To confirm the AIX preventive maintenance level on your system
# instfix -i | grep ML All filesets for 5.0.0.0_AIX_ML were found. All filesets for 5.1.0.0_AIX_ML were found. All filesets for 5.1.0.0_AIX_ML were found. All filesets for 5100-01_AIX_ML were found. All filesets for 5100-02_AIX_ML were found.
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
To see the current OS and Maintenance level
# oslevel
# oslevel
# oslevel -r - To see the current maintenance level # oslevel -s - To see the current service pack level # oslevel -l 4.1.2.0 - To determine the file sets that are below level 4.1.2. # oslevel -g - To determine the file sets that are later than the current maintenance level # oslevel -rq - To list all known recommended maintenance levels on the system
01. Using smit
# smit update_all
02. To update all filesets in a system using command line
a. Create the list of filesets installed # lslpp -Lc | awk -F: '{print $2}'| tail -n +2 > /tmp/lslpp b. Update the softwares using installp command # installp -agxYd /dev/cd0 -e /tmp/<exclude_list> -f /tmp/lslpp
Another way of updating all the filesets
# /usr/lib/instl/sm_inst installp_cmd -acgNXY -d <localtion_of_updates> -f '_update_all'
For not committing and saving all replaced files
# /usr/lib/instl/sm_inst installp_cmd -agX -d <localtion_of_updates> -f '_update_all'
To list all the installed efixes on a system
# emgr -l
To install a efix IY93496.070302.epkg.Z in /mnt directory
# emgr -e /mnt/IY93496.070302.epkg.Z
inutoc
The inutoc command creates the .toc file in Directory. If a .toc file already exists, it is recreated with new information. The inutoc command adds table of contents entries in the .toc file for every installation image in Directory.
The installp command and the bffcreate command call
this command automatically upon the creation or use of an installation
image in a directory without a .toc file
To create a .toc file for the /tmp/images directory, enter:
# inutoc /tmp/images
bffcreate
The bffcreate command creates an installation image file in backup file format (bff) to support software installation operations. It creates an installation image file from an installation image file on the specified installation media
To create an installation image file from the bos.net
software package on the tape in the /dev/rmt0 tape drive and use
/var/tmp as the working directory, type:
# bffcreate -d /dev/rmt0.1 -w /var/tmp bos.net
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:
chsec [ -fFile] [ -s Stanza] [ -a Attribute = Value ... ]
To change the CPU time limit of user joe to 1 hour (3600 seconds):
# chsec -f /etc/security/limits -s joe -a cpu=3600
"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
To enable user smith to access this system remotely, type:
# chuser rlogin=true smith
pwdadm
# pwdadm -c user1 # To reset the ADMCHG flag for the user user1.
The password on aix can be changed nom interactively using the setpwd command (Not an AIX command)
The source code can be downloaded from here
The Binary for 5.2 can be downloaded form here
the Binary for 5.3 can be downloaded form here
Failed logins
Failed login attempts are stored in /etc/security/failedlogin
To read failed login attempts
who -a /etc/security/failedlogin
To make the password hash to md5 from crypt:
chsec -f /etc/security/login.cfg -s usw -a pwd_algorithm=smd5To generate smd5 password hash compatible to standard salted MD5
Modify /etc/security/pwdalg.cfg for smd5 stanza as followssmd5: lpa_module = /usr/lib/security/smd5 lpa_options = std_hash=true
ldap authentication
The ldap client configuration files are stored in /etc/security/ldap/ldap.cnf file
Client setup can be done using the mksecldapcommand.
To have this client contact the LDAP security information server, the
server name must be supplied during setup. The server's bind DN and
password are also needed for client access to the AIX® tree on the
server. The mksecldap command saves the server bind DN, password, server
name, AIX tree DN on the server, the SSL key path and password, and
other configuration attributes to the /etc/security/ldap/ldap.cfg file.
Multiple servers can be supplied to the mksecldap
command during client setup. In this case, the client contacts the
servers in the supplied order and establishes connection to the first
server that the client can successfully bind to. If a connection error
occurs between the client and the server, a reconnection request is
tried using the same logic.
The client communicates to the LDAP security information server through a client side daemon (secldapclntd).
In the final steps of the client setup, the mksecldap
command starts the client-side daemon and adds an entry in the
/etc/inittab file so the daemon starts at every reboot. You can check
whether the setup is successful by checking the secldapclntd daemon
process through the ls-secldapclntd command.
To configure the LDAP client, run the following command:
# mksecldap -c -h ldap-master -a cn=admin,dc=sys-admin,dc=net -p adminpwd -d cn=ou=people,dc=sys-admin,dc=net
To Check if ldap client is running.
# ls-secldapclntd
ldapservers=ldap-master
ldapport=389
active connections=1
ldapversion=3
userbasedn=ou=people,dc=sys-admin,dc=net
groupbasedn=ou=group,dc=sys-admin,dc=net
idbasedn=
usercachesize=1000
usercacheused=2
groupcachesize=100
groupcacheused=1
usercachetimeout=300
groupcachetimeout=300
heartbeatT=300
numberofthread=10
connectionsperserver=10
alwaysmaster=no
authtype=LDAP_AUTH
searchmode=ALL
defaultentrylocation=LDAP
ldaptimeout=60
userobjectclass=posixaccount,account,shadowaccount
groupobjectclass=posixgroup
Add the following lines to /etc/security/user to enable LDAP authentication
ldap:
admin = false
all:
SYSTEM=LDAP
registry=LDAP
To start ldap client:
# start-secldapclntd
To stop ldap cleint
# stop-secldapclntd
To restart ldap client:
# restart-secldapclntd
sample ldap configuration file
grep -v '^#|^$' ldap.cfg
ldapservers:ldap-maser
binddn:cn=admin,dc=sys-admin,dc=net
bindpwd:<your password here>
authtype:ldap_auth
ldapsslkeyf:/usr/ldap/etc/key.kdb
/etc/security/ldap/krb5.keytab
userattrmappath:/etc/security/ldap/2307user.map
groupattrmappath:/etc/security/ldap/2307group.map
userbasedn:ou=people,dc=sys-admin,dc=net
groupbasedn:ou=group,dc=sys-admin,dc=net
userclasses:account,posixaccount,shadowaccount
groupclasses:posixgroup
ldapport:389
ldapsslport:636
searchmode:ALL
defaultentrylocation:LDAPLPAR
LPAR facts
- For initially configuring a P-Series system for installtion in LPAR mode, the system should be placed on Partion Stand-By mode
To list all the PCI slots allocated to an LPAR
# lsslot -c pci # lsslot -c pci -a
To dynamically reallocate an adapter
- Determine the PCI slot for the adapter using lsslot -c slot and get the "pciX' device name
- Remove the device from AIX using rmdev -l pciX -R (-R to remove all the child to parent)
- On HMC dynamically allocate the device to another
- 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
chsysstate -r lpar -m MACHINE_NAME -o shutdown --immed --restart --id LPARID (or -n LPARNAME)
To findout which HMC an LPAR is connected
# 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"}
To disable/enable processor simultaneous multi-threading mode
smtctl -m off
If dynamic LPAR is not working
- Start rsct daemons if not already started
- lssrc -a | grep rsct
- startsrc -g rsct
- Try re-booting HMC
Console Using HMC Command Line
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.
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.
Escape sequence to leave vtmenu terminal session is:
~.
mkvterm: mkvterm opens a virtual terminal session for an AIX, Linux, or virtual I/O server partition
To open a console terminal:
$ mkvterm -m <machine> -p <partition>
This can be exited with ~~.
To remove a terminal someone else is using:
$ rmvterm -m <machine> -p <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
To list the system connections
# lssysconff -r all
- lssysconn lists connection information for all of the systems and frames managed by this Hardware Management Console (HMC). Connection information for all systems and frames to which this HMC is connected or attempting to connect is listed.
- ssysconn also lists IP addresses that cannot be automatically discovered by this HMC when using DHCP. If this HMC is set up as a DHCP server on a private network, whenever the Remove Connection task or the rmsysconn command is run to remove a managed system or a managed frame from the HMC, the HMC places the IP address(es) of that system or frame in a list of removed IP addresses. Any IP address in that list will not be rediscovered when reattached to the HMC. The lssysconn -r nondiscover command can be used to display the contents of that list of removed IP addresses.
To list All the managed systems attached to the HMC
$ 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
To list only name, Serial number, IP address and state alone,
$ lssyscfg -r sys -F name,type_model,serial_num, ipaddr,state --header name,type_model,serial_num,ipaddr,state Server-9119-595-SN02898EB,9119-595,02898EB,10.128.253.255,Operating Server-9119-595-SN02898BB,9119-595,02898BB,10.128.255.250,OperatingTo list all the Lpar in the managed system
$ lssyscfg -r lpar -m Server-9119-595-SN02898EB lssyscfg -r lpar -m Server-9119-595-SN02898EB name=eraprci0,lpar_id=8,lpar_env=aixlinux,state=Running,resource_config=1,os_version=0. 0.0.0.0.0,logical_serial_num=02898EB8,default_profile=eraprci0,curr_profile=eraprci0, 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=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
$ lssyscfg -r lpar -m Server-9119-595-SN02898EB -Fname,curr_profile,state eraprci0,eraprci0,Running eraptci0,eraptci0,Running erep2ci0,erep2ci0,Running lshwres -r mem --level sys configurable_sys_mem=32768,curr_avail_sys_mem=30208,pend_avail_sys_mem=30208,installed_sys_mem=32768,deconfig_sys_mem=0,sys_firmware_mem=512, mem_region_size=128,pend_mem_region_size=128,"possible_mem_region_sizes=auto,16,32,64,128,256",auto_mem_region_size=128,max_mem_pools=0, max_paging_vios_per_mem_pool=1
Upgrading the machine code on HMC
01. Backup the managed system's profile data
Server and Partition --> Server Management --> Profile data --> Backup Type the filename and save the information. Do this for each Managed system.
02. 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
03. Record the current HMC configuration
04. 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
05. Upgrade HMC Software
HMC Management --> Shutdown or Restart HMC --> Restart HMCAfter HMC restarts, in the login screen, select
upgrade --> upgrade from Media -- Finish
P 5
Virtual IO Server
Virtual Ethernet and SEA
Virtual SCSI
The following command disables all remote WebSM connections to the HMC:
List of HACMP related documents can be found here
http://www-03.ibm.com/servers/eserver/pseries/library/hacmp_docs.html
01. clstrmgr
02. clinfo
03. clmuxpd
04. cllockd
02. Snapshot Migration
Virtual Ethernet and SEA
Virtual SCSI
HMC Version 6.1.1
VIO Server Version 1.3 FP 8.1
VIO Server Version 1.3 FP 8.1
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).
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:
$ chhmc -c websm -s disable
The following command disables the HTTP service on HMC:
$ chhmc -c http -s disable
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.
Installation
You have two options to install the AIX-based VIO Server:
You have two options to install the AIX-based VIO Server:
- Install from CD
- 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>
To become root user in VIO server, use
$ 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.
To Create the SEA between the real and Virtual Ethernets
01. List all the virtual devices
$ lsdev -virtual name status description ent2 Available Virtual I/O Ethernet Adapter (l-lan) vhost0 Available Virtual SCSI Server Adapter vhost1 Available Virtual SCSI Server Adapter vhost2 Available Virtual SCSI Server Adapter vhost3 Defined Virtual SCSI Server Adapter vsa0 Available LPAR Virtual Serial Adapter clientY Available Virtual Target Device - Logical Volume clientZ Available Virtual Target Device - Logical Volume
02. 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 ent3 Available en3 et3
03. Verify the newly created SEA
$ lsdev -dev en3 name status description ent3 Available Shared Ethernet Adapter
04. Assign IP to the SEA
$ mktcpip -hostname op34 <- use you own hostname -inetaddr 9.137.62.34 <- use your IP address -interface en3 <- from the mkvdev command -netmask 255.255.255.0 <- normal TCPIP meaning -gateway 9.137.62.1 <- normal TCPIP meanin
Now, the VIO server is ready with SEA configured.
05. Verify the creation of SEA
$ lsdev -dev ent3 -attr attribute value description pvid 3 PVID to use for the SEA device pvid_adapter ent2 Default virtual adapter to use for non-VLAN-tagged real_adapter ent0 Physical adapter associated with the SEA thread 0 Thread mode enabled (1) or disabled (0) virt_adapters ent2 List of virtual adapters associated with the SEA
Virtual SCSI
Preparing Virtual SCSI adapter and storage for the Clients
01. List all the virtual devices
$ lsdev -virtual name status description nt2 Available Virtual I/O Ethernet Adapter (l-lan) vhost0 Available Virtual SCSI Server Adapter vhost1 Available Virtual SCSI Server Adapter vhost2 Available Virtual SCSI Server Adapter vhost3 Defined Virtual SCSI Server Adapter vsa0 Available LPAR Virtual Serial Adapter clientY Available Virtual Target Device - Logical Volume clientZ Available Virtual Target Device - Logical Volume
02. Connect Logical Volume lv00 to VIO Client "clientX"
$ mkvdev -vdev lv00 -vadapter vhost0 -dev clientX clientX Available
03. 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
04. Check the configuration
$ lsdev -virtual name status description ent2 Available Virtual I/O Ethernet Adapter (l-lan) vhost0 Available Virtual SCSI Server Adapter vhost1 Available Virtual SCSI Server Adapter ... vsa0 Available LPAR Virtual Serial Adapter clientx Available Virtual Target Device - Logical Volume clienty Available Virtual Target Device - Logical Volume ent3 Available Shared Ethernet Adapter $ $ lsdev -dev clientx -attr attribute value description user_settable LogicalUnitAddr 0x8100000000000000 Logical Unit Address False aix_tdev lv00 Target Device Name False
To find out the ghost to lpar mapping
lsmap -all | grep ^vhost vhost0 U9117.570.10BEDDB-V2-C10 0x00000000 vhost1 U9117.570.10BEDDB-V2-C11 0x00000000 vhost2 U9117.570.10BEDDB-V2-C12 0x00000000 vhost3 U9117.570.10BEDDB-V2-C13 0x00000000 vhost4 U9117.570.10BEDDB-V2-C14 0x00000000 vhost5 U9117.570.10BEDDB-V2-C15 0x00000000 vhost6 U9117.570.10BEDDB-V2-C16 0x00000000 vhost7 U9117.570.10BEDDB-V2-C17 0x00000000 vhost8 U9117.570.10BEDDB-V2-C18 0x00000000 vhost9 U9117.570.10BEDDB-V2-C19 0x00000008 vhost10 U9117.570.10BEDDB-V2-C20 0x00000000
In the above example, C10 through C20 are
server vSCSI slot numbers. Check the client profile and find out which
server slot is assigned to that partition. This way we can find out
which ghost is attached to which lpar.
To find out which disks or lvs are connected to a vhost device
To find out which disks or lvs are connected to a vhost device
ioscli lsmap -vadapter vhost0 SVSA Physloc Client Partition ID --------------- -------------------------------------------- ------------------ vhost0 U9117.570.10BEDDB-V2-C10 0x00000000 VTD webqatools01v LUN 0x8100000000000000 Backing device webqatools01lv Physloc VTD wqatoolsdataav LUN 0x8300000000000000 Backing device wqatoolsdataalv
More tasks
To remove a virtual deviceioscli rmdev -dev <device_name>
HACMP
http://www-03.ibm.com/servers/eserver/pseries/library/hacmp_docs.html
HACMP Version 5.x
What is new in HACMP 5.x
Cluster Communication Daemon
Heart Beating
Forced Varyon of Volume Groups
Custom Resource Group
Application Monitoring
Resource Group Tasks
What is new in HACMP 5.x
Cluster Communication Daemon
Heart Beating
Forced Varyon of Volume Groups
Custom Resource Group
Application Monitoring
Resource Group Tasks
HACMP Daemon
01. clstrmgr
02. clinfo
03. clmuxpd
04. cllockd
HACMP Log files
/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
/usr/es/sbin/cluster/history/cluster.mmddyyyy:
It contains time-stamped, formatted messages generated by HACMP
scripts. The system creates a cluster history file whenever cluster
events occur, identifying each file by the file name extension mmddyyyy,
where mm indicates the month, dd indicates the day, and yyyy indicates
the year.
/tmp/cspoc.log: It contains
time-stamped, formatted messages generated by HACMP C-SPOC commands. The
/tmp/cspoc.log file resides on the node that invokes the C-SPOC
command.
/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.
execute. The /tmp/emuhacmp.out file resides on the node from which the event emulator is
invoked.
HACMP Startup and shutdown
HACMP startup option:
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.
HACMP Shutdown Modes:
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
New in AIX 5.1
- SMIT Standard and Extended configuration paths (procedures)
- Automated configuration discovery
- Custom resource groups
- Non IP networks based on heartbeating over disks
- Fast disk takeover
- Forced varyon of volume groups
- Heartbeating over IP aliases
- Heartbeating over disks
- Heartbeat monitoring of service IP addresses/labels on takeover node(
- Now there is only HACMP/ES,based on IBM Reliable Scalable Cluster Technology
- Improved security, by using cluster communication daemon
- Improved performance for cluster customization and synchronization
- Fast disk takeover
- GPFS integration
- Cluster verification enhancements
New In AIX 5.2
- Custom only resource groups
- Cluster configuration auto correction
- Cluster file collections
- Automatic cluster verification
- Application startup monitoring and multiple application monitors
- Cluster lock manager dropped
- Resource Monitoring and Control (RMC) subsystem replaces Event Management
HACMP 5.3 Limits
- 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
Cluster Communication Daemon
The Cluster Communication Daemon, clcomdES, provides secure remote command execution and HACMP ODM configuration file updates by using the principle of the "least privilege".
The cluster communication daemon (clcomdES) has the following characteristics:
- 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
Forced varyon of volume groups
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.
Custom Resource groups
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
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.
When application monitoring is active, HACMP behaves
- 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
Resource Group Tasks
To list the resource groups configured for a cluster
# cllsgrp
To list the details of of a resource group
# clshowres
To bring RG1 offline on Node3
# clRGmove -g RG1 -n node3 -d <--- -d for down)
To bring CrucialRG online on Node3
# clRGmove -g CrucialRG -n node3 -u
To check the current resource status
# clfindres or # clRGinfo
To find out the current cluster stat and obtain informatin about cluster
clstat and cmdump command can be used.
clstat and cmdump command can be used.
# cldump Obtaining information via SNMP from Node: err3qci0... _____________________________________________________________________________ Cluster Name: erpqa1 Cluster State: UP Cluster Substate: STABLE _____________________________________________________________________________ Node Name: err3qci0 State: UP Network Name: corp_ether_01 State: UP Address: 10.0.5.2 Label: r3qcibt1cp State: UP Address: 10.0.6.2 Label: r3qcibt2cp State: UP Address: 10.253.1.75 Label: sapr3qci State: UP Network Name: prvt_ether_01 State: UP Address: 10.0.7.2 Label: r3qcibt1pt State: UP Address: 10.0.8.2 Label: r3qcibt2pt State: UP Address: 192.168.200.79 Label: psapr3qci State: UP Network Name: ser_rs232_01 State: Node Name: err3qdb0 State: UP Network Name: corp_ether_01 State: UP Address: 10.0.5.1 Label: r3qdbbt1cp State: UP Address: 10.0.6.1 Label: r3qdbbt2cp State: UP Address: 10.253.1.55 Label: sapr3qdb State: UP Network Name: prvt_ether_01 State: UP Address: 10.0.7.1 Label: r3qdbbt1pt State: UP Address: 10.0.8.1 Label: r3qdbbt2pt State: UP Address: 192.168.200.8 Label: psapr3qdb State: UP Network Name: ser_rs232_01 State: UP Address: Label: r3qdb_ser State: UP Cluster Name: erpqa1 Resource Group Name: SapCI_RG Startup Policy: Online On Home Node Only Fallover Policy: Fallover To Next Priority Node In The List Fallback Policy: Never Fallback Site Policy: ignore Priority Override Information: Primary Instance POL: Node Group State ---------------------------- --------------- err3qci0 ONLINE err3qdb0 OFFLINE Resource Group Name: OraDB_RG Startup Policy: Online On Home Node Only Fallover Policy: Fallover To Next Priority Node In The List Fallback Policy: Never Fallback Site Policy: ignore Priority Override Information: Primary Instance POL: Node Group State ---------------------------- --------------- err3qdb0 ONLINE err3qci0 OFFLINE
Syncronizing the VG info in HACMP if cluster is already running:
01. In the system where the VG changes are made, break the reserve on disks using varyonvg command# varyonvg -b -u <vgname>
02. 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
# importvg -V <major #> -y <VG Name> -n -F <hdisk_name>
03. Varyon the VG without the SCSI reserves
# varyonvg -b -u <vgname>
04. Change the VG not to caryon automatically
# chvg -an -Qy <vgname>
05. Varyoff the VG
# varyoffvg <vgname>
06. Put the SCSI reserves back in the primary server
# varyonvg <vgname>
Some useful HACMP Commands
To list all the app servers configured including start and stop script# cllsserv OraDB_APP /usr/local/bin/dbstart /usr/local/bin/dbstop SapCI_APP /usr/local/bin/sapstart /usr/local/bin/sapstop
To list the application monitoring configured on a cluster
# 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
To clear a hacmp logs
# clclear
HACMP Upgrading options
01. Rolling Migration02. Snapshot Migration
To apply the online worksheet
/usr/es/sbin/cluster/utilities/cl_opsconfig <online worksheet file name>
HMC
To turn off Attention LEDs in p servers:
01. List the managed servers from HMC
lssyscfg -r sys -F name02.Check the LED status
lsled -r sa -t phys -m <managed_system>03. Change the LED status to off
chled -r sa -t phys -m <managed_system> -o off04. Check the status again
lsled -r sa -t phys -m <managed_system>Should see output, "state=off."
Console Using HMC Command Line
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.
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.
Escape sequence to leave vtmenu terminal session is:
~.
mkvterm: mkvterm opens a virtual terminal session for an AIX, Linux, or virtual I/O server partition
To open a console terminal:
$ mkvterm -m <machine> -p <partition>
This can be exited with ~~.
To remove a terminal someone else is using:
$ rmvterm -m <machine> -p <partition>
On integrated Virtual machine manager (blades)
$ mkvt -id <lpar_id> $ rmvt -id <lpar_id>
Manage LPARs
To list all the lparslssyscfg -r lpar -m <managed_system>To list only the lpar_name, state, lpar_id, update
lssyscfg -r lpar -m <managed_system> -F name,lpar_id,stateTo query the state of a particular LPAR
lssyscfg -r lpar -m <managed_system> --filter lpar_names=<lpar_name> -F stateNote:- valid filter names are: lpar_ids, lpar_names, profile_names, work_groups
To query the profile of an LPAR
lsyscfg -r prof -m <managed_system> --filter lpar_names=<lpar_name> name=testvio100,lpar_name=testvio100,lpar_id=2,os_type=aixlinux,all_resources=0,mem_mode=ded,min_mem=256,desired_mem=32768,max_mem=32768, proc_mode=shared,min_proc_units=0.10,desired_proc_units=0.40,max_proc_units=4.00,min_procs=1,desired_procs=4,max_procs=4,sharing_mode=uncap, uncap_weight=128,io_slots=none,lpar_io_pool_ids=none,max_virtual_slots=10,"virtual_serial_adapters=0/server/1/any//any/1,1/server/1/any//any/1", virtual_scsi_adapters=2/client/1/10-6656A/13/1,virtual_eth_adapters=4/0/64//0/0,boot_mode=norm,conn_monitoring=0,auto_start=1,power_ctrl_lpar_ids=none, lhea_logical_ports=none,lhea_capabilities=none,lpar_proc_compat_mode=default,virtual_fc_adapters=none
To create LPAR
"mksyscfg -r lpar -m $MANAGED_SYSTEM -i name=$LPARNAME,profile_name=default,lpar_env=aixlinux,shared_proc_pool_util_auth=1,min_mem=2048,desired_mem=4096,max_mem=8192,proc_mode=shared, min_proc_units=0.1,desired_proc_units=0.1,max_proc_units=4.0,min_procs=1,desired_procs=1,max_procs=4,sharing_mode=uncap,uncap_weight=128,boot_mode=norm,shared_proc_pool_util_auth=1"To remove an LPAR
rmsyscfg -r lpar -m $MANAGED_SYSTEM -n $LPARNAMETo shutdown an LPAR
lssyscfg -r sys -F name chsysstate -r lpar -m $MANAGED_SYSTEM -n $LPARNAME -o shutdown --immedTo power on
chsysstate -r lpar -m $managed_system -n lparname -o on
Upgrade HMC using Network Images
Pre steps: Login to HMC and take backup of Critical Console Data and upgrade data first. Taking backup critical console data may take few hours. Hence, prepare to wait.
Follow these basic steps.
01. Download the appropriate HMC V7 network images and put them on an FTP server.
02. Verify that the following files have been downloaded:
initrd.gz, bzImage, disk1.img, disk2.img, and disk3.img
03. On the HMC, you must first save upgrade data by running the following commands:
3a. To save data to both DVD and disk: mount /media/cdrom saveupgdata -r diskdvd 3b. To save to disk alone: saveupgdata -r disk
04. Next, copy the files over to the bootable disk partition on the HMC from FTP server
4a. getupgfiles -h remote_hostname -u <userid> --passwd <passwd> -d <remote directory> Note: use -s to use sftp instead of ftp. 4b. If you want to see the progress of copy process, run the following command while true; do ls -la /hmcdump; sleep 30; done
05. After the files are copied over, run the following command:
chhmc -c altdiskboot -s enable --mode upgrade Now the HMC is ready to be rebooted and automatically upgraded with the code copied to the bootable disk partition.
06. Finally, reboot the HMC and start the upgrade.
hmcshutdown -r -t now
Storage
IBM Sub System Device Driver (SDD)
To find out the fiber channel link status
# fcstat -D fcs0 | grep Attention
Attention Type: Link Up
To display the statistics of fiber channel device drivers
fcstat [ -z [ -D ] [ -d ] | -d | -e [ -d ] ]Device_Name
-z reset some of the statistics
-D Displays all the statistic, including the adapter and protocol driver queue statistics.
-d Displays the statistics by opening the adapter in diagnostic mode
-e Displays all the statistics, including the device-specific statistics
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 )
- datapath query device
- datapath query adapter
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
To remove the Symettrix hdisks
# lsdev -CtSYMM* -Fname | xargs -n1 rmdev -dl
To remove hdisks corresponding to CLARiiON devices
# lsdev -CtCLAR* -Fname | xargs -n1 rmdev -dl
To probe all emc disks
# inq
To set up multipathing to the root device
# pprootdev on
To Remove all hdiskpower devices
# lsdev -Ct power -c disk -F name | xargs -n1 rmdev -l
To find out which hdiskpower device contains hdsik132
# powermt display dev=hdisk132
Pseudo name=hdiskpower38
Symmetrix ID=000100006216
Logical device ID=006C
state=alive; policy=SymmOpt; priority=0; queued-IOs=0
------------ Host ---------- - Stor - -- I/O Path - -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
0 fscsi0 hdisk132 FA 14bA active alive 0 0
1 fscsi1 hdisk223 FA 14bB active alive 0 0
1 fscsi1 hdisk314 FA 14bA active alive 0 0
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 # chpath -s ena -l hdisk0 paths Enabled
To list all available disks and their paths
# lspath | sort +1
Enabled hdisk0 scsi0
Enabled hdisk1 scsi0
Enabled hdisk2 fscsi0
Enabled hdisk2 fscsi0
Enabled hdisk2 fscsi1
Enabled hdisk2 fscsi1
Enabled hdisk3 fscsi0
Enabled hdisk3 fscsi0
Enabled hdisk3 fscsi1
Enabled hdisk3 fscsi1
To list all disks which paths are in failed state
# lspath -s failed
To list all disks which paths are in Defined state
# lspath -s defined
To list all disks, it's parent device, path ID, connections and status
lspath -H -F "name parent path_id connection status"
name parent path_id connection status
hdisk2 fscsi0 0 5005076801105daf,0 Enabled
hdisk2 fscsi1 1 5005076801305de5,0 Enabled
hdisk2 fscsi0 2 5005076801105de5,0 Enabled
hdisk2 fscsi1 6 5005076801305daf,0 Enabled
hdisk3 fscsi0 0 5005076801105daf,1000000000000 Enabled
hdisk3 fscsi1 1 5005076801305de5,1000000000000 Enabled
hdisk3 fscsi0 2 5005076801105de5,1000000000000 Enabled
hdisk3 fscsi1 6 5005076801305daf,1000000000000 Enabled
To remove a path
rmpath -dl <disk_name> -p <parent> -w <connection>
rmpath -dl hdisk3 -p fscsi0 -w 5005076801105daf,1000000000000
To remove all the paths which are in failed state
lspath -s failed -H -F "name parent path_id connection status" | awk '{system ("rmpath -dl " $1 " -p " $2 " -w " $4)}' 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.
The password is 'guest'
2 to 3 3 to 2 4 to 5 5 to 4 7 to 7 6 & 8 to 20 ( important ) 20 to 6 & 8 ( important )
Solu: Check the permission for /opt/freeware. If others does not have read and execute permissoins, sftp may fail. Change the permissions.
chmod 755 /opt/freeware
history timestamp in AIX for ksh and bash:
For KSH, add the following line in /etc/environment
EXTENDED_HISTORY=ON Still, the history command does not show the time stamp. To get the timestamp fc -t 55 2013/08/08 23:07:57 :: bash 56 2013/08/08 23:10:19 :: history 57 2013/08/08 23:10:29 :: tail .sh_history 58 2013/08/08 23:11:02 :: fc -t
For BASH, add the following line to profile files.
HISTTIMEFORMAT="%h/H:S "
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.
Reboot the system in Single user mode using the installation CD
smit tty --> Change / Show Characteristics of a TTY 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 Run the following command # chdev -l 'tty0' -a runmodes='hupcl,cread,brkint,icrnl,opost,tab3,onlcr,isig,icanon,\n echo,echoe,echok,echoctl,echoke,imaxbel,iexten,clocal' \n -a logmodes='hupcl,cread,echoe,cs8,clocal' '-P'
Reboot the system.
To turn on extended history on AIX
cat /etc/environment # timestamp for history command # EXTENDED_HISTORY=ON HISTTIMEFORMAT="%h/H:S " NSORDER=local,bind
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.
Fileset devices.fcp.disk was not installed on the system. Fileset installed and system rebooted.
To kill all the process using filesystem /oracle
fuser -cuxk /oracle
New
Do you have some thing to share on AIX??
Please add your notes to this page by clicking on the Edit Page LinkThe password is 'guest'
AIX console cable detail
For a 25 pin to 25 pin cable2 to 3 3 to 2 4 to 5 5 to 4 7 to 7 6 & 8 to 20 ( important ) 20 to 6 & 8 ( important )
'For a 25 pin to 9 pin cable
2 to 2
3 to 3
4 to 8
5 to 7
7 to 5
6 & 8 to 4
20 to 6 & 1
For 9 pin to 9pin
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
Keine Kommentare:
Kommentar veröffentlichen