AIX FAQ

Document Sample
AIX FAQ
Description

AIX FAQ

good

December 28, 2008 (3 years 1 ago)
great info....very informative

Shared by: hao nguyen
Stats
views:
16132
posted:
9/4/2008
language:
French
pages:
50
AIX FAQ



Page 1 of 50



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



Contents of Boot Logical Volume

    



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 bootlist -m normal cd0 hdisk0 bootlist -m service cd0 rmt0 # Lists the current bootlist # To set cd0 and hdisk0 as first and second boot devices # 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 # alog -L boot bosinst nim console cfg dumpsymp alog -o -t boot alog -o -t console # # View the boot log View the console log # List the defined log types



To find out the properties of boot log file

# alog -L -t boot file:size:verbosity /var/adm/ras/bootlog:131072:1



AIX FAQ



Page 2 of 50



To find out whether a Hard drive is bootable

# ipl_varyon -i

PVNAME hdisk0 hdisk1 hdisk2 BOOT DEVICE YES YES NO PVID VOLUME GROUP ID 00c898eb372ea9410000000000000000 00c898eb00004c00 00c898eb38483a300000000000000000 00c898eb00004c00 00c898bbdd86318c0000000000000000 00c898bb00004c00



Devices

Device configuration Database Listing the installed and supported devices (lsdev) Listing the system configuraion and Vital product data of devices (lscfg) Listing the device attributes (lsattr) Change the attributres of devices (chdev) Configuring new devices (cfgmgr) Make device files (mkdev) Removing devices from system (rmdev) To manually add a device to the system (mkdev) To Find the boot informations, Disk Size, Kernel bits etc.. (getconf) To display sytem configuration information (prtconf)



Device 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. 02. 03. 04. Available Defined Unknown Stopped Device is ready and can be used Device is unavailable Undefined 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



AIX FAQ

# lsdev -C



Page 3 of 50



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 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



To list all installed devices in detail

# lscfg -v



To find out the WWN, FRU #, firmware level of fibre adapter fcs0

# lscfg -vpl fcs0



To display attributes and possible values of attributes for devices lsattr

-E -D -R -a -l Displays the effective value Displays the Default Value Displays the range of legal values



Examples: To find out the possible media_speed values for ethernet card ent0



AIX FAQ

# lsattr -El ent0 -a media_speed -R 10_Half_Duplex 10_Full_Duplex 100_Half_Duplex 100_Full_Duplex Auto_Negotiation



Page 4 of 50



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 deviceschdev

-l -a -T -P to change the value temporarily 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 -El 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 -l -R -S removes the device from Customized DB Unconfigure device and its chidren Makes deviec un-availabel by using stop method



AIX FAQ To change device state from available to defined

# rmdev -l (device)



Page 5 of 50



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 -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 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 To configure the device and all it's chidren -i Location of installation medium



To search for new devices and configure them

#cfgmgr



AIX FAQ To configure detected devices attached to the fcs0 adapter

# cfgmgr -l fcs0



Page 6 of 50



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

# bootinfo -K # bootinfo -y ---- > for Kernel ---- > 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.



AIX FAQ 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 hdisk0 hdisk1 PV STATE active active TOTAL PPs 546 546 FREE PPs 1 1



Page 7 of 50



FREE DISTRIBUTION 00..00..00..00..01 00..00..00..00..01



....................... ....................... ......................



Backup and Recovery

Backup rootvg using mksysb Backup and restore volume groups using savevg and restvg restvg



AIX FAQ backup Restore files backed-up using mksysb/backup commands



Page 8 of 50



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 -i -v -X /excludes files in /etc/exclude.rootvg to create image.data file verbose mode 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 1. 2. 3. 4. 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



AIX FAQ



Page 9 of 50



Backup or restore VGs using savevg and restvg

savevg command is used to backup volume groups other than rootvg restvg command is used to restore volume groups other than rootvg savevg

-e -i -f -v -X excludes files/directories being backed in /etc/exclude. file creates /tmp/vgdata//.data file device or filename on which the image to be stored verbose mode automatically expand /tmp filesystem if required



-i option calls mkvgdata command which inturn creates /tmp/vgdata//.data file restvg



Backing up a filesytem or files

Restore 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 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"



AIX FAQ

# restore -xvqdf mksysb.host1 ./etc/passwd



Page 10 of 50



System Dump

What is dump? Configuring dump devices in AIX How to start the system dump manually? Copying system dump to other directory or media Examining system dump using kdb Important LED codes related to dump



If a kernel panic occures, a dump will be invoked automatically. The followings are dumped during the dump process. 1. 2. 3. 4. 5. 6. 7. 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 -L -e -d -p -s -P list the current dump destination view satistical information about previus dump estimate the dump size directory to copy the dump during boot time to set the device as primary dump device to set the device as secondary dump device 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



AIX FAQ To estimate the dump size

#susdumpdev -e



Page 11 of 50



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 optional snap commnad output directory default directory is /tmp/ibmsupt -D gathers dump and /unix -o 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 activates all paging devices specified on /etc/swapspaces swapon --> Activates the specified paging space



mkps: This command is used to add an additional paging space. 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:

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



To remove an active paging space "paging00" 1. Deactivate the paging space using swapoff commnad

# swapoff paging00



2. remove the paging space using rmps command

# rmps paging00



AIX FAQ



Page 13 of 50



LVM

synclvodm -Pv imfs -x -l imfs -l getlvcb -AT To sync the stale partitions on VG

# varyonvg vgname



Cook-book for creating a Volume Group and file systems using LVM

lspv hdisk0 hdisk1 hdisk36 hdisk37 00c33e2e8347acfd 00c33e2e8c8a25e3 none none rootvg rootvg None None active active



erpsb4ci0:/ # mkvg -s 512 -y saplocvg hdisk36 0516-1254 mkvg: Changing the PVID in the ODM. saplocvg erpsb4ci0:/ # lsvg saplocvg VOLUME GROUP: saplocvg 00c33e2e00004c0000000111a483c8ab VG STATE: active VG PERMISSION: read/write MAX LVs: 256 LVs: 0 OPEN LVs: 0 TOTAL PVs: 1 STALE PVs: 0 ACTIVE PVs: 1 MAX PPs per VG: 32512 MAX PPs per PV: 1016 LTG size (Dynamic): 256 kilobyte(s) HOT SPARE: no VG IDENTIFIER: PP SIZE: 512 megabyte(s) TOTAL PPs: 999 (511488 megabytes) FREE PPs: 999 (511488 megabytes) USED PPs: 0 (0 megabytes) QUORUM: 2 VG DESCRIPTORS: 2 STALE PPs: 0 AUTO ON: yes MAX PVs: AUTO SYNC: BB POLICY: 32 no 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 sapmntlv saplocvg_log



TYPE jfs2 jfs2log



LPs 64 1



PPs 64 1



PVs 1 1



LV STATE closed/syncd closed/syncd



MOUNT POINT N/A N/A



crfs -v jfs2 -d /dev/sapmntlv -m /sapmnt -A yes -p rw File system created successfully.



AIX FAQ

33553204 kilobytes total disk space. New File System size is 67108864



Page 14 of 50



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.

# 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



NIM

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= -a name=



To remove a machine from the NIM environment

# nim -o remove



AIX FAQ To define a mksysb resource



Page 15 of 50



# nim -o define -t mksysb -a server=master -a location=



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=



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 -s -d -u -B



Some useful NIM SMIT Fast paths

smit nim_mkmac smit nim_bosinst # Adding new machines # 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 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. 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.



Networking



AIX FAQ To find out the link speed and mac address of an Ethernet adapter ent0

# entstat -d ent0



Page 16 of 50



Setting multiple IP address for a single network card

# ifconfig lo0 alias 195.60.60.1 # ifconfig en0 alias netmask



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=,



To delete a static route manually Syntax:- chdev -l inet0 -a delroute=,,,

# 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 -a -m -i -n -d -g -A no



Smit fast paths

# smit chinet or smit inet



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"



AIX FAQ To make ipforwarding=1 permanent now and after reboot

# no -p -o ipforwarding=1



Page 17 of 50



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



AIX FAQ



Page 18 of 50



can be aggregated into an EtherChannel adapter called ent3; interface en3 would then be configured with an IP address. The system considers these aggregated adapters as one adapter. In addition, all adapters in the EtherChannel or Link Aggregation are given the same hardware (MAC) address, so they are treated by remote systems as if they were one adapter. Both EtherChannel and IEEE 802.3ad Link Aggregation require support in the switch so it is aware which switch ports should be treated as one. The adapters that belong to an EtherChannel must be connected to the same EtherChannel-enabled switch. You must manually configure this switch to treat the ports that belong to the EtherChannel as an aggregated link If an adapter fails, network traffic is automatically sent on the next available adapter without disruption to existing user connections. The adapter is automatically returned to service on the EtherChannel or Link Aggregation when it recovers. Because the EtherChannel cannot be spread across two switches, the entire EtherChannel is lost if the switch is unplugged or fails. To solve this problem, a new backup option available in AIX 5.2 and later keeps the service running when the main EtherChannel fails. The backup and EtherChannel adapters should be attached to different network switches, which must be inter-connected for this setup to work properly. In the event that all of the adapters in the EtherChannel fail, the backup adapter will be used to send and receive all traffic. When any link in the EtherChannel is restored, the service is moved back to the EtherChannel. 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. 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



ODM Object Data Manager (ODM)

What is ODM? Location of ODM Repositories Some ODM Database files Some Useful ODM commands ODM commands - examples



AIX FAQ



Page 19 of 50



What is ODM?

ODM

  



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 1. /etc/objrepos 2. /usr/lib/objrepos 3. /usr/share/lib/objrepos



Some important ODM Database files

Supported devices and attributes and connection information are stored in

PdDv, 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



AIX FAQ NIM Resource and configuraion informations

nim_object, nim_pdattr, nim_altr



Page 20 of 50



Errorlog, alog and dump file info

SWservAt



Useful ODM Commands

odmget odmdelete odmadd odmchange odmshow odmcreate odmdrop - To retrives objects from an Object Class in stanza format - To delete objects what meet a specifig criteria. If no criteria specified, all objects are deleted - To add a new object to an object class - To change all objects with in an Object Class that meet a specifig criteria - To display object class definition - To create Object Class for application that will use ODM DB - To remove an Oobject Class



Some 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



Monitoring Commands

nmon vmstat iostat



AIX FAQ

sar topas nmon svmon filemon mpstat rmss netpmon



Page 21 of 50



nmon

http://www-128.ibm.com/developerworks/eserver/articles/analyze_aix/index.html vmstat The vmstat command is useful for obtaining an overall picture of CPU, paging, and memory usage. The following is a sample report produced by the vmstat command: 1. vmstat 5 2

kthr memory ----- ----------r b avm fre 1 1 197167 477552 0 0 197178 477541 page faults cpu ------------------------ ------------ ----------re pi po fr sr cy in sy cs us sy id wa 0 0 0 7 21 0 106 1114 451 0 0 99 0 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 -d -m -t -z Specifies adapter throughput report. Specifies drive report only. Specifies statistics for paths. Specifies tty/cpu report only. Resets the disk input/output statistics 2 2 tin 0.0 0.0 % tm_act 0.0 0.1 tout 0.8 80.2 Kbps 0.3 1.1 avg-cpu: % user 8.4 4.5 Kb_read 258032 258088 % sys 2.6 3.0 % idle 88.5 92.1 Kb_wrtn 224266 1658678 % iowait 0.5 0.5



# iostat tty:



Disks: hdisk3 hdisk2



tps 0.0 0.0



svmon



AIX FAQ



Page 22 of 50



The svmon command provides a more in-depth analysis of memory usage. It is more informative, but also more intrusive, than the vmstat and ps commands. The svmon command captures a snapshot of the current state of memory. The memory consumption is reported using the inuse, free, pin, virtual and paging space counters.

    



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 -U -P -i Global report User report Process report 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

memory pg space pin in use PageSize s 4 KB m 64 KB # pagesize 4096 size 3932160 1048576 work 444363 1609451 PoolSize inuse 3914793 6622 pers 0 0 inuse 3787625 7948 free 17367 clnt 0 2305342 pgsp 6622 0 pin 370027 4646 virtual 1482283 7948 pin 444363 virtual 1609451



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 13548 Vsid Esid 0 0 48412 2 6c01b d 4c413 f 3040c 1 ginger :svmon Pid 13548 Command pacman Inuse 8535 Inuse 4375 2357 1790 11 2 Pin 2178 Pin 2176 2 0 0 0 Pin 2178 Pgsp 847 Pgsp 847 0 0 0 Virtual 64-bit Mthrd LPage 8533 N N N



Type Description LPage work kernel seg work process private work shared library text work shared library data pers code,/dev/prodlv:4097 -P 13548 -i 1 3 Command pacman Inuse 8589



Virtual 4375 2357 1790 11 -



Pgsp Virtual 64-bit Mthrd LPage 847 8587 N N N



AIX FAQ

Vsid 0 48412 6c01b 4c413 3040c Esid 0 2 d f 1 Type work work work work pers Description LPage kernel seg process private shared library text shared library data code,/dev/prodlv:4097 Inuse 4375 2411 1790 11 2 Pin 2176 2 0 0 0 Pgsp 847 0 0 0 Virtual 4375 2411 1790 11 -



Page 23 of 50



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



AIX FAQ



Page 24 of 50



The rmss command provides you with a means to simulate different sizes of real memory that are smaller than your actual machine, without having to extract and replace memory boards or reconfigure memory using logical partitions. 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: tuncheck: This command validates a file either to be applied immediately or at reboot time (-r flag). It checks the ranges, dependencies, and prompts to run bosboot if required. Run this command if you copy a file to a new system, or edit it with an editor such as vi. tunsave: This command saves all current values to a file, including optionally the nextboot file. tunrestore: This command applies values from a file, either immediately, or at the next reboot (-r flag). With the -r flag, it validates and copies the file over the current nextboot file. tundefault: This command resets all parameters to their default value. It can be applied at the next reboot with the -r flag.



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).



AIX FAQ The following flags are common for ioo, vmo and no commands.



Page 25 of 50



-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= - 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.



AIX FAQ



Page 26 of 50



Tuning Asynchronous IO parameters

# smit aio or # chdev -l aio0 -P -a minservers=100 -a maxservers=100 -a maxreqs=9152 -a autoconfig=available



minserver: 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"



Disk IO pacing (High water-mark and Low Water-mark)

Disk-I/O pacing is intended to prevent programs that generate very large amounts of output from saturating the system’s I/O facilities and causing the response times of less-demanding programs to deteriorate. When a process tries to write to a file that already has high-water mark pending writes, the process is put to sleep until enough I/Os have completed to make the number of pending writes less than or equal to the lowwater 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 / To change the high water-mark level

# chdev -a maxpout=20 -l sys0



netpmon Monitors activity and reports statistics on network I/O and network-related CPU usage



Software



AIX FAQ Software Stats Listing Installed Software Installing Filesets/Software Installing PTFS/Patches Updating the software to the latest level Installing emergency fixes in AIX



Page 27 of 50



Software States: When a software or an update is first installed, it is in the APPLIED state. It can be later commited or rejectd. APPLIED state

    



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



List the installed filesets/fileset updates 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



AIX FAQ

# lslpp -w /usr/sbin/nfsd



Page 28 of 50



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 or directory which contains the software -f 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



AIX FAQ



Page 29 of 50



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



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 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 -r # oslevel -s - To see the current maintenance level - To see the current service pack level



To list all known recommended maintenance levels on the system # oslevel -rq



Updating the software to the latest level 01. Using smit

# smit update_all



02. To update all filesets in a system using command line



AIX FAQ

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/ -f /tmp/lslpp



Page 30 of 50



Another way of updating all the filesets

# /usr/lib/instl/sm_inst installp_cmd '_update_all' -acgNXY -d -f



For not committing and saving all replaced files

# /usr/lib/instl/sm_inst installp_cmd -agX -d -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



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):



AIX FAQ

# chsec -f /etc/security/limits -s joe -a cpu=3600



Page 31 of 50



"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



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 http://www.tivoli-ug.org/downloads/setpwd.aix.c



LPAR

LPAR facts





For initially configuring a P-Series system for installtion in LPAR mode, the system should be placed on Partion Stand-By mode



To list all the PCI slots allocated to an LPAR

# lsslot -c pci # lsslot -c pci -a



To dynamically reallocate an adapter 1. 2. 3. 4. 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



AIX FAQ



Page 32 of 50



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 o lssrc -a | grep rsct o 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. 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



AIX FAQ To open a console terminal:

$ mkvterm -m -p



Page 33 of 50



This can be exited with ~~. To remove a terminal someone else is using:

$ rmvterm -m -p # lsslot -c phb PHB Name Description PHB 1 Logical PCI Host Bridge U7879.001.DQDGTGK-P1-T14 U7879.001.DQDGTGK-P1-T4 U7879.001.DQDGTGK-P1-T6 PHB 2 Logical PCI Host Bridge U7879.001.DQDGTGK-P1-C3 U7879.001.DQDGTGK-P1-C4 U7879.001.DQDGTGK-P1-C5 PHB 3 Logical PCI Host Bridge U7879.001.DQDGTGK-P1-T12 U7879.001.DQDGTGK-P1-T15 U7879.001.DQDGTGK-P1-C1



Device(s) pci0 pci3 sisscsia0 pci4 usbhc0 usbhc1 pci5 ent0 ent1 pci1 pci6 ent2 ent3 pci7 ent4 ent5 pci8 fcs0 pci2 pci10 sisscsia1 pci11 ide0 pci12 fcs1



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,Operating To 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



AIX FAQ

$ lssyscfg -r lpar -m Server-9119-595-SN02898EB eraprci0,eraprci0,Running eraptci0,eraptci0,Running erep2ci0,erep2ci0,Running -Fname,curr_profile,state



Page 34 of 50



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 HMC After HMC restarts, in the login screen, select

upgrade --> upgrade from Media -- Finish



P5

Virtual IO Server Virtual Ethernet and SEA Virtual SCSI HMC Version 6.1.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).



AIX FAQ



Page 35 of 50



Uncapped mode: The processing capacity given to the partition at a time may exceed the guaranteed processing capacity when resources are available in the shared processing pool. You must specify the uncapped weight of that partition. If multiple uncapped logical partitions require idle processing units, the managed system distributes idle processing units to the logical partitions in proportion to each logical partition's uncapped weight. The higher the uncapped weight of a logical partition, the more processing units the logical partition gets

# lparstat -i Node Name : applsrv Partition Name : Apps_Server Partition Number : 4 Type : Shared-SMT Mode : Uncapped Entitled Capacity : 0.30 Partition Group-ID : 32772 Shared Pool ID : 0 Online Virtual CPUs : 2 Maximum Virtual CPUs : 10 Minimum Virtual CPUs : 1 Online Memory : 512 MB Maximum Memory : 1024 MB Minimum Memory : 128 MB Variable Capacity Weight : 128 Minimum Capacity : 0.20 Maximum Capacity : 1.00 Capacity Increment : 0.01 Maximum Dispatch Latency : 16999999 Maximum Physical CPUs in system : 2 Active Physical CPUs in system : 2 Active CPUs in Pool : Unallocated Capacity : 0.00 Physical CPU Percentage : 15.00% Unallocated Weight : 0



The following command disables all remote WebSM connections to the HMC:

$ 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.



AIX FAQ Installation You have two options to install the AIX-based VIO Server: 1. Install from CD 2. Install from network via an AIX NIM-Server



Page 36 of 50



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 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 ent2 Available vhost0 Available vhost1 Available vhost2 Available vhost3 Defined vsa0 Available clientY Available clientZ Available description Virtual I/O Ethernet Adapter (l-lan) Virtual SCSI Server Adapter Virtual SCSI Server Adapter Virtual SCSI Server Adapter Virtual SCSI Server Adapter LPAR Virtual Serial Adapter Virtual Target Device - Logical Volume Virtual Target Device - Logical Volume



02. Create the shared ethernet adapter using real and virtual adapters

$ mkvdev -sea ent0 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 -y -n -F 03. Varyon the VG without the SCSI reserves # varyonvg -b -u 04. Change the VG not to caryon automatically # chvg -an -Qy



05. Varyoff the VG # varyoffvg 06. Put the SCSI reserves back in the primary server # varyonvg



Some useful HACMP Commands

To list all the app servers configured including start and stop script

# cllsserv OraDB_APP /usr/local/bin/dbstart SapCI_APP /usr/local/bin/sapstart /usr/local/bin/dbstop /usr/local/bin/sapstop



To list the application monitoring configured on a cluster

# cllsappmon OraDB_Mon SapCI_Mon user user



To get the detailed information about application monitoring

# cllsappmon # 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



AIX FAQ



Page 46 of 50



HACMP Upgrading options

01. Rolling Migration 02. Snapshot Migration To apply the online worksheet

/usr/es/sbin/cluster/utilities/cl_opsconfig



Storage

IBM Sub System Device Driver (SDD)

List all Vpath devices and their states

# lsvpcfg vpath0 (Avail pv lotus02) 50014562 = hdisk2 (Avail ) hdisk19 (Avail ) vpath1 (Avail pv lotus02) 50114562 = hdisk3 (Avail ) hdisk20 (Avail )



#datapath query device

Total Devices : 17 DEV#: 0 DEVICE NAME: vpath0 Path# 0 1 TYPE: 2105F20 State OPEN OPEN SERIAL: 50014562 Select 2634286 2639371 Errors 0 0



Adapter/Hard Disk fscsi1/hdisk2 fscsi0/hdisk19



Mode NORMAL NORMAL



1. datapath query adapter

Active Adpt# 0 1 2 Adapters :8 Name State fscsi2 NORMAL fscsi0 NORMAL fscsi1 NORMAL Mode ACTIVE ACTIVE ACTIVE Select 799440626 797798530 785716308 Errors 0 0 0 Paths 44 44 44 Active 44 44 44



To fixe a DPO Vpath Volume group that has mixed vpath and hdisk volumes.

# dpovgfix vg00



EMC Powerpath

To configure all the emc hdisks, run emc_cfgmgr script. This script invokes the AIX cfgmgr tool to probe each adapter bus separately 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



AIX FAQ

# pprootdev on



Page 47 of 50



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 1 1 fscsi0 fscsi1 fscsi1 hdisk132 hdisk223 hdisk314 FA 14bA active alive FA 14bB active alive FA 14bA active alive 0 0 0 0 0 0



HP Autopath

# dlnkmgr view -drv PathID HDevName Device 000000 dlmfdrv0 hdisk2 000001 dlmfdrv0 hdisk30 000002 dlmfdrv1 hdisk3 000003 dlmfdrv1 hdisk31 LDEV XP1024.40318.04DB XP1024.40318.04DB XP1024.40318.0522 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



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. chmod 755 /opt/freeware After AIX fresh installation, not able to login into the system or no login prompt



AIX FAQ



Page 48 of 50



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. 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. 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 Link The password is 'guest'



AIX console cable detail

For a 25 pin to 25 pin cable

2 3 4 5 7 6 & 20 to to to to to 8 to 3 2 5 4 7 to 20 ( important ) 6 & 8 ( important )



AIX FAQ 'For a 25 pin to 9 pin cable



Page 49 of 50



2 3 4 5 7 6 & 20



to to to to to 8 to to



2 3 8 7 5 4 6 & 1



For 9 pin to 9pin



TxD RxD RTS CTS DTR DSR,CD GND RI



3 2 7 8 4 6&1 5 9



to to to to to to to to



2 3 8 7 6&1 4 5 9



RxD TxD CTS RTS DSR, CD DTR GND RI



AIX FAQ



Page 50 of 50




Share This Document


Related docs
Other docs by hao nguyen
by registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!