AIX - Fix Maintenance
In this fix update we can do following things
1. Fix installation
2. To verify the installed fix
3. To list the fixes from the CD
1. Fix Installation
Fix is a just like patch, if any issues on server, we should install or update that fix level then only problem will solved,
Problems like, slow performance, particular application is not working properly. This case of problems we should update the fix.
Suppose we want to install fix, Using
#instfix –k Fixname –d device
#instfix – k IK00891 –d /dev/cd0
-k - Keyword to mention the fix name
-d - Device to mention device name
The above command is used to install the given fix IK00891 from cdrom drive.
2. To verify the installed fix
Suppose we want to verify installed fix,
Using #instfix –ki fixname
#instfix –ki IK00891
Option –i for information
The above command is used to display the given fix details. If fix is not available some error message will come.
3. To list the fix from the CD
Suppose we have fix update CD, we want to install particular two fix in server, this first we should find that 2 fixes are available in CD or not available.
Using
#instfix –T fixname –d /dev/cd0
#instfix –T IK00891 –d /dev/cd0
T - Displays the entire list of fixes present on the media.
If fix is available in CD, then it will display the given fix name otherwise it wont display anything or some error message will come.
NOTE:
Whenever we installing the fileset or fix, in that current path should have the .toc (table of content) file. If this files not available we cannot install any fileset or fix from that current path
If file is not available, we can create the .toc file using command
#inutoc .
The above command is used to create the .toc file
Sunday, April 19, 2009
AIX - Software Maintenance
AIX - Software Maintenance
In this software Installation we can do following things
1. Fileset installation
2. Applying the Fileset
3. Reject the Installed Fileset
4. Commit the applied Fileset
5. Remove the Committed Fileset
6. Verify the Installed Fileset ( whether properly installed or not)
7. Clear the braked Fileset installation
8. List the Installed Fileset
9. List the Installed Fileset contents ( What are the files available in File Set)
10. To finding the file, Extracted from which Fileset.
11. To find the command file path
12. To view the fileset history
1. Fileset Installation
The Filesets has additional support files for AIX. Suppose we need additional files, we can install it from Base operating system (bos) CD, Bonus software CD, Expansion Software CD, LPP’s (Licensed program product) CD.
NOTE:
If we want to check the AIX Server performance, we need topas command, this topas command is not by default come under AIX OS installation, So that topas file we have to install from some other CD’s.
First we should mount the CDROM drive in server.
When we mount the CDROM, we required mount point like one directory.
So we should create the directory. Eg. /cdmnt (Directory name will be whatever may be)
#mkdir mount point
#mkdir cdmnt
Then u can mount the CDROM drive in cdmnt directory
#mount –v cdrfs –o ro /dev/cd0 /mount point
#mount –v cdrfs –o ro /dev/cd0 /cdmnt
Verify the Cdrom drive mount process.
#mount
The above command will show the cdrom drive mount point i.e. /cdmnt and cdrfs file system.
Then u go to /cdmnt folder
#cd cdmnt
#pwd
cdmnt
#
Now topas file will be under bos.permaget.tool file set. Now we should find the file set in software cd.
To find the file set using command #installp –Ld /dev/cd0 | grep bos.perf*
If the above bos.permaget.tool file set is available in cd, it will show otherwise it won’t show.
If file set is found then we have to install the fileset.
To install the file set using #installp –agxpd /dev/cd0 file set (for preview installation)
i.e. #installp –agxd /dev/cd0 bos.permaget.tool (for installation)
see difference
Options –agxpd for preview
-agxd for installation
When we type the above command, fileset installation will start and topas file extracted from the fileset and it will store to /usr/sbin/topas (super user or administrator commands stored in /usr/sbin)
After that we can use topas performance monitor utility.
#topas
The above command will display the system performance status, like cpu usage, memory usage, io usage (hdisk’s) network usage, paging space usage .
2. Applying Fileset (It is not permanent installation)
This applying Fileset is just file set installation, i.e. When we updating the old fileset to new fileset, by default installation has done in apply state and old fileset configuration is moved to /usr/lpp/package(fileset) path, After commit the fileset this /usr/lpp/package(fileset) will updated . Because if any problems in updated fileset, we can easily reject(remove) the updated fileset, If updated fileset is working properly we can commit the updated fileset, i.e. permanent installation, this case we cannot reject the fileset, but we can uninstall the fileset.
NOTE:
Suppose we are installing fileset for the first time, this first time installation done in commit state, and When we updating the fileset, installation has done in apply state, suppose that updated fileset giving some problem, we can easily reject the updated fileset.
For fileset installation using command installp
Suppose u want to install one fileset bos.rte
Preview (It will show the installation preview – This preview is not required our testing purpose we are using)
#installp –agxpd /dev/cd0 fileset name
#installp –agxpd /dev/cd0 bos.rte (for preview)
Flags:
a - Apply
g – Perquisites (supporting file)
x – Expand the space
p – Preview
d – Specify the device
After preview we can install the Fileset
#installp –agxd /dev/cd0 bos.rte
After Installation, old installed fileset configuration is moved to /usr//lpp/package (fileset), and updated fileset also available in /usr/lpp/package.
3. Reject the Applied Fileset.
After updating the fileset that installed fileset is moved to applied state, suppose that updated filesets are not working properly then we have to remove the updated fileset and pervious filesets are to be configuring to current working condition.
Now we will reject the updated fileset using
#installp –rgp fileset name (For preview)
#installp –rg fileset name
#installp –rg bos.rte.command
The above command is used to remove the updated fileset and automatically previous fileset is moved to working condition.
4. Commit the Applied fileset (It is permanent installation)
After updating the fileset that installed fileset is moved to applied state, suppose applied filesets are working properly, then we have to commit the updated fileset for permanent installation. Otherwise we will remove the updated fileset using reject option.
Now we will commit the updated fileset using
#installp –cgx fileset name
#installp –cgx bos.rte.command
The above command is used to commit the updated fileset.
5. Remove the Committed fileset (It is complete fileset removal not reject)
After commit the fileset, that fileset is moved to permanent installation, we cannot reject, we have to uninstall the fileset only.
Now we will uninstall the committed fileset using:
#installp –ugp Fileset name
#installp –ugp bos.rte.command (For preview)
#installp –ug bos.rte.command (For un installation)
The above command is used to uninstall the committed fileset.
6. Verify the installed fileset (Whether properly installed or not)
After installation we want to verify whether filesets are properly installed are not, using following command
#lppchk –v fileset name
#lppchk –v bos.rte.command
If any problems it will show the error message otherwise no error message, then we will confirm fileset is installed properly.
7. Clear the braked fileset installation:
While installing the filesets, some problem has occurred, i.e. Cd is not reading or space is not available in volume group.
This time half of the fileset only installed in server, so before next installation, we should remove the half installed fileset using
#Installp –C
To clean the brokend fileset installation
8. List the installed fileset
Suppose we want to see what are the filesets available in Server, Using
#lslpp –l
The above command list the all installed fileset
Suppose you want to find particular fileset in server, Using
#lslpp –l | grep Fileset name
The above command is list the specified fileset only, if file set is not available or not installed, it won’t show anything.
9. List the installed fileset content (What are the files available in fileset)
Suppose we want to see bos.rte.command fileset content, using
#lslpp –f fileset name
#lslpp –f bos.rte.command
The above command is display the bos.rte.command file
Basically bos.rte.command fileset has user commands So it will show the /usr/bin/ls,
10. To find the file, which is installed from which fileset.
Using # lslpp –w /usr/bin/ls
The above command shows the bos.rte.command fileset name, because ls command file is extracted from bos.rte.command fileset
#lslpp –w /usr/sbin/savevg
The above shows some other fileset name.
11. To find the command file path:
Using #which ls
The above command is display the given file path i.e. the above command output will be
/usr/bin/ls
Suppose we want to savevg path, using
#which savevg
/usr/sbin/savevg
12. To view the fileset history:
Using #lslpp –h fileset name
#lslpp –h bos.rte.command
The above command output will be full details of fileset.
Fileset version, installed time, date
NOTE:
Whenever we installing the fileset or fix, in that current path should have the .toc (table of content) file. If this file is not available we cannot install any fileset or fix from that current path
If file is not available, we can create the .toc file using command
#inutoc .
The above command is used to create the .toc file
In this software Installation we can do following things
1. Fileset installation
2. Applying the Fileset
3. Reject the Installed Fileset
4. Commit the applied Fileset
5. Remove the Committed Fileset
6. Verify the Installed Fileset ( whether properly installed or not)
7. Clear the braked Fileset installation
8. List the Installed Fileset
9. List the Installed Fileset contents ( What are the files available in File Set)
10. To finding the file, Extracted from which Fileset.
11. To find the command file path
12. To view the fileset history
1. Fileset Installation
The Filesets has additional support files for AIX. Suppose we need additional files, we can install it from Base operating system (bos) CD, Bonus software CD, Expansion Software CD, LPP’s (Licensed program product) CD.
NOTE:
If we want to check the AIX Server performance, we need topas command, this topas command is not by default come under AIX OS installation, So that topas file we have to install from some other CD’s.
First we should mount the CDROM drive in server.
When we mount the CDROM, we required mount point like one directory.
So we should create the directory. Eg. /cdmnt (Directory name will be whatever may be)
#mkdir mount point
#mkdir cdmnt
Then u can mount the CDROM drive in cdmnt directory
#mount –v cdrfs –o ro /dev/cd0 /mount point
#mount –v cdrfs –o ro /dev/cd0 /cdmnt
Verify the Cdrom drive mount process.
#mount
The above command will show the cdrom drive mount point i.e. /cdmnt and cdrfs file system.
Then u go to /cdmnt folder
#cd cdmnt
#pwd
cdmnt
#
Now topas file will be under bos.permaget.tool file set. Now we should find the file set in software cd.
To find the file set using command #installp –Ld /dev/cd0 | grep bos.perf*
If the above bos.permaget.tool file set is available in cd, it will show otherwise it won’t show.
If file set is found then we have to install the fileset.
To install the file set using #installp –agxpd /dev/cd0 file set (for preview installation)
i.e. #installp –agxd /dev/cd0 bos.permaget.tool (for installation)
see difference
Options –agxpd for preview
-agxd for installation
When we type the above command, fileset installation will start and topas file extracted from the fileset and it will store to /usr/sbin/topas (super user or administrator commands stored in /usr/sbin)
After that we can use topas performance monitor utility.
#topas
The above command will display the system performance status, like cpu usage, memory usage, io usage (hdisk’s) network usage, paging space usage .
2. Applying Fileset (It is not permanent installation)
This applying Fileset is just file set installation, i.e. When we updating the old fileset to new fileset, by default installation has done in apply state and old fileset configuration is moved to /usr/lpp/package(fileset) path, After commit the fileset this /usr/lpp/package(fileset) will updated . Because if any problems in updated fileset, we can easily reject(remove) the updated fileset, If updated fileset is working properly we can commit the updated fileset, i.e. permanent installation, this case we cannot reject the fileset, but we can uninstall the fileset.
NOTE:
Suppose we are installing fileset for the first time, this first time installation done in commit state, and When we updating the fileset, installation has done in apply state, suppose that updated fileset giving some problem, we can easily reject the updated fileset.
For fileset installation using command installp
Suppose u want to install one fileset bos.rte
Preview (It will show the installation preview – This preview is not required our testing purpose we are using)
#installp –agxpd /dev/cd0 fileset name
#installp –agxpd /dev/cd0 bos.rte (for preview)
Flags:
a - Apply
g – Perquisites (supporting file)
x – Expand the space
p – Preview
d – Specify the device
After preview we can install the Fileset
#installp –agxd /dev/cd0 bos.rte
After Installation, old installed fileset configuration is moved to /usr//lpp/package (fileset), and updated fileset also available in /usr/lpp/package.
3. Reject the Applied Fileset.
After updating the fileset that installed fileset is moved to applied state, suppose that updated filesets are not working properly then we have to remove the updated fileset and pervious filesets are to be configuring to current working condition.
Now we will reject the updated fileset using
#installp –rgp fileset name (For preview)
#installp –rg fileset name
#installp –rg bos.rte.command
The above command is used to remove the updated fileset and automatically previous fileset is moved to working condition.
4. Commit the Applied fileset (It is permanent installation)
After updating the fileset that installed fileset is moved to applied state, suppose applied filesets are working properly, then we have to commit the updated fileset for permanent installation. Otherwise we will remove the updated fileset using reject option.
Now we will commit the updated fileset using
#installp –cgx fileset name
#installp –cgx bos.rte.command
The above command is used to commit the updated fileset.
5. Remove the Committed fileset (It is complete fileset removal not reject)
After commit the fileset, that fileset is moved to permanent installation, we cannot reject, we have to uninstall the fileset only.
Now we will uninstall the committed fileset using:
#installp –ugp Fileset name
#installp –ugp bos.rte.command (For preview)
#installp –ug bos.rte.command (For un installation)
The above command is used to uninstall the committed fileset.
6. Verify the installed fileset (Whether properly installed or not)
After installation we want to verify whether filesets are properly installed are not, using following command
#lppchk –v fileset name
#lppchk –v bos.rte.command
If any problems it will show the error message otherwise no error message, then we will confirm fileset is installed properly.
7. Clear the braked fileset installation:
While installing the filesets, some problem has occurred, i.e. Cd is not reading or space is not available in volume group.
This time half of the fileset only installed in server, so before next installation, we should remove the half installed fileset using
#Installp –C
To clean the brokend fileset installation
8. List the installed fileset
Suppose we want to see what are the filesets available in Server, Using
#lslpp –l
The above command list the all installed fileset
Suppose you want to find particular fileset in server, Using
#lslpp –l | grep Fileset name
The above command is list the specified fileset only, if file set is not available or not installed, it won’t show anything.
9. List the installed fileset content (What are the files available in fileset)
Suppose we want to see bos.rte.command fileset content, using
#lslpp –f fileset name
#lslpp –f bos.rte.command
The above command is display the bos.rte.command file
Basically bos.rte.command fileset has user commands So it will show the /usr/bin/ls,
10. To find the file, which is installed from which fileset.
Using # lslpp –w /usr/bin/ls
The above command shows the bos.rte.command fileset name, because ls command file is extracted from bos.rte.command fileset
#lslpp –w /usr/sbin/savevg
The above shows some other fileset name.
11. To find the command file path:
Using #which ls
The above command is display the given file path i.e. the above command output will be
/usr/bin/ls
Suppose we want to savevg path, using
#which savevg
/usr/sbin/savevg
12. To view the fileset history:
Using #lslpp –h fileset name
#lslpp –h bos.rte.command
The above command output will be full details of fileset.
Fileset version, installed time, date
NOTE:
Whenever we installing the fileset or fix, in that current path should have the .toc (table of content) file. If this file is not available we cannot install any fileset or fix from that current path
If file is not available, we can create the .toc file using command
#inutoc .
The above command is used to create the .toc file
AIX - Boot Process
AIX - Boot Process
Three phases available in BOOT Process
1. Ros kernel init phase
2. Base Device Configuration
3. System boot phase
1. Ros Kernel init phase (PHASE1)
A. Post (power on self test)
In this post it will do basic hardware checking
B. Then it will go to NVRAM and check the boot list for last boot device (hdisk0 or hdisk1).
C. Then it will check the BLV (hd5) in boot device.
D. Then it will check the boot image
E. Then boot image is moved to memory.
F. Then kernel will execute.
2. Base Device configuration (PHASE2)
A. Here cfgmgr will run for device configuration.
3. System Boot Phase (PHASE3)
A. Kernel will execute.
B. The paging space (hd6) will get start.
C. Then following file system will be mounted /, /var. /usr, /home. /tmp
D. Kernel start the init process, it will read the /etc/inittab file and execute the following process.
/etc/rc.boot,
srcmstr
/etc/rc.tcpip
/etc/rc.net
The above network related files /etc/rc.tcpip, /etc/rc.net, used to configure the ip address and routing.
E. Then it will start the system by default run level 2.
NOTE:
Run level 2: It contains all of the terminal process and daemons that are run in the multi user environment. This is default run level.
/etc/inittab file contains four fields, 1. Identifier, 2. Command, 3. Action, 4. Runlevel
Three phases available in BOOT Process
1. Ros kernel init phase
2. Base Device Configuration
3. System boot phase
1. Ros Kernel init phase (PHASE1)
A. Post (power on self test)
In this post it will do basic hardware checking
B. Then it will go to NVRAM and check the boot list for last boot device (hdisk0 or hdisk1).
C. Then it will check the BLV (hd5) in boot device.
D. Then it will check the boot image
E. Then boot image is moved to memory.
F. Then kernel will execute.
2. Base Device configuration (PHASE2)
A. Here cfgmgr will run for device configuration.
3. System Boot Phase (PHASE3)
A. Kernel will execute.
B. The paging space (hd6) will get start.
C. Then following file system will be mounted /, /var. /usr, /home. /tmp
D. Kernel start the init process, it will read the /etc/inittab file and execute the following process.
/etc/rc.boot,
srcmstr
/etc/rc.tcpip
/etc/rc.net
The above network related files /etc/rc.tcpip, /etc/rc.net, used to configure the ip address and routing.
E. Then it will start the system by default run level 2.
NOTE:
Run level 2: It contains all of the terminal process and daemons that are run in the multi user environment. This is default run level.
/etc/inittab file contains four fields, 1. Identifier, 2. Command, 3. Action, 4. Runlevel
AIX Installation Methods
OS INSTALLATION:
Three kinds of OS installations available in AIX
1. New and Complete Overwrite
2. Migration
3. Preservation
1. New and Complete Overwrite:
This is New installation; in this installation we have three options
A. Start installation with default settings
B. Change/show installation settings and install
C. Start maintenance mode for recovery
A. Start installation with default settings
This is normal installation
B. Change/show installation settings and install
In this installation we can change the installation disk (hdisk0, or hdisk1), Desktop options.
C. Start maintenance mode for recovery
This is used for recover the existing OS problems. (Boot image, Boot list, File systems problems).
2. Migration:
In this migration Installation, Operating system Updated from lower level to higher level i.e. Aix 5.1 To Aix 5.3 or Aix 5.2 To Aix 5.3 ,
NOTE:
In this installation System data will not be affected except the /tmp file system. i.e. /tmp file system will be deleted and newly created.
3. Preservation:
This installation is overwriting the existing OS and user data directory /home only persevered, rest of the directories /, /var, /tmp, /etc, /dev, /opt will be deleted and newly created.
NOTE:
In this installation we can preserve additional directories also, suppose if you want preserve /opt, this case u should put /opt file system entry in /etc/preserve.list file.
Three kinds of OS installations available in AIX
1. New and Complete Overwrite
2. Migration
3. Preservation
1. New and Complete Overwrite:
This is New installation; in this installation we have three options
A. Start installation with default settings
B. Change/show installation settings and install
C. Start maintenance mode for recovery
A. Start installation with default settings
This is normal installation
B. Change/show installation settings and install
In this installation we can change the installation disk (hdisk0, or hdisk1), Desktop options.
C. Start maintenance mode for recovery
This is used for recover the existing OS problems. (Boot image, Boot list, File systems problems).
2. Migration:
In this migration Installation, Operating system Updated from lower level to higher level i.e. Aix 5.1 To Aix 5.3 or Aix 5.2 To Aix 5.3 ,
NOTE:
In this installation System data will not be affected except the /tmp file system. i.e. /tmp file system will be deleted and newly created.
3. Preservation:
This installation is overwriting the existing OS and user data directory /home only persevered, rest of the directories /, /var, /tmp, /etc, /dev, /opt will be deleted and newly created.
NOTE:
In this installation we can preserve additional directories also, suppose if you want preserve /opt, this case u should put /opt file system entry in /etc/preserve.list file.
Basic Aix Hardware Information
The AIX Os is installed in IBM P Series or I Series Servers
P Series Servers (32bit and 64 bit Hardware Support)
1. RS6000 P1, P2, P3 ( Very old models)
2. P4 ( Regatta 680, 615, 630, 641, 690(LPAR / DLPAR)
3. P4 +( It will support many no of processors and memory compare than P4)
4. P5 (Squadron P550, P570, P575, P590, P595(Latest)
5. P5 + ( It will support many no of processors and memory compare than P5)
P Series Servers (32bit and 64 bit Hardware Support)
1. RS6000 P1, P2, P3 ( Very old models)
2. P4 ( Regatta 680, 615, 630, 641, 690(LPAR / DLPAR)
3. P4 +( It will support many no of processors and memory compare than P4)
4. P5 (Squadron P550, P570, P575, P590, P595(Latest)
5. P5 + ( It will support many no of processors and memory compare than P5)
Friday, April 17, 2009
System initialization and boot management
System initialization and boot management
The numeric 1 key (F1 on graphical display), when pressed during POST (double beep), starts the SMS interface.
The numeric 5 key (F5 on graphical display), when pressed during POST, initiates a system boot in service mode using the default service mode boot list. Sequence:
1. diskette (if installed)
2. CD-ROM (if installed)
3. hard disk
4. tape drive (if installed)
5. network (a. Token ring, b. Ethernet)
The numeric 6 key (F6 on graphical display) works like the numeric 5 key, but uses the customized service mode bootlist. This is the preferred method of loading AIX diagnostics from the boot hard disk.
ipl_varyon * Used to vary on the root volume group during system boot processing.
ipl_varyon -i : Inquiry mode - skips ipl device processing. Checks which disks are already bootable.
bosboot
Creates boot image. It does not update the bootlist in the NVRAM.
bosboot -a -d /dev/hdisk0 : Re-create boot image on hdisk0.
bosboot -a -d /dev/ipldevice -D : creates a boot image with the KDB debugger enabled.
mklv
Creates a logical volume.
mklv -y hd5 -t boot rootvg 1 : re-create boot LV (BLV) hd5.
lslv
Displays information about a logical volume.
lslv -l hd5 : determines the boot disk.
mkboot
Creates the boot image, the boot record, and the service record.
mkboot -c -d /dev/hdisk0 : clears the boot record of PV hdisk0.
chpv
Changes the characteristics of a physical volume in a volume group.
chpv -c hdisk1 : clears the boot record of PV hdisk1.
bootinfo Determines and displays various boot information, including boot device type and boot device name (NOT supported in AIX 4.2 or later).
bootinfo -b : returns the last boot device.
bootinfo -B hdisk0 : returns 1 if disk is bootable, 0 if not.
bootlist
Displays or alters the list or ordering of boot devices available to the system.
Normal boot list: possible boot devices for normal mode.
Service boot list: possible boot devices for service mode.
Previous boot device: last device from which the system booted.
Support of these boot lists is model dependent.
bootlist -m normal -o : displays the normal boot list.
bootlist -m service -o : displays the service boot list (if available).
bootlist -m normal cd0 hdisk0 hdisk1 : makes changes to the normal boot list.
bootlist -m prevboot : invalidates the last device from which the system booted.
halt or fasthalt
Writes data to disk (sync) and then stops the system. The system does not restart. Do not use this command if other users are logged into the system.
reboot or fastboot
Restarts the system. Can be used if no other users are logged into the system.
shutdown
Halts the operating system. Checks the existence of the executable /etc/rc.shutdown file (added by the administrator) that specifies all the applications and other user processes to close down.
By default the shutdown command powers down the system (if supported and issued).
shutdown -Fr : fast system shutdown and restart.
shutdown -m +1 : brings the system down to maintenance (single user) mode after waiting one minute.
shutdown -l : logs the output during the shutdown to /etc/shutdown.log.
last
Displays information about previous logins using the /var/adm/wtmp file.
last reboot : displays the time between reboots.
last shutdown : lists last shutdowns of the system.
uptime
Shows how long the system has been up.
uptime : displays the current time, the length of time the system has been up, the number of users online, and the load average.
sync
Updates the i-node table and writes buffered files to the hard disk.
sync;sync;sync;reboot : writes everything from the buffer to the hard disk and reboots the system.
lsfont
Lists the fonts available for use by the display.
chfont
Changes the default font selected at boot time.
mkfont
Adds the font code associated with a display to the system.
mkfontdir
Creates a fonts.dir file from a directory of font files.
chlang
Sets LANG environment variable in the /etc/environment file for next login.
chtz
Changes the system time zone information in the /etc/environment file.
chhwkbd
Changes the low-function terminal (LFT) keyboard attributes stored in the Object Data Manager (ODM) database.
lskbd
Lists the keyboard maps currently available to the low-function terminal (LFT) subsystem.
chkbd
Changes the default keyboard map used by the low-function terminal (LFT) at system startup.
chkey
Changes your encryption key.
lslicense
Displays the number of fixed licenses and the status of floating licensing. There are two types of user licensing, fixed and floating. Fixed licensing is always enabled. Floating licensing can be enabled or disabled.
lslicense -A : displays the number of available fixed licences on the system.
chlicense
Changes the number of fixed licenses and the status of the floating licensing (updates login.cfg).
chlicense -I -u 50I -u 50 : changes the fixed license number immediately to 50 (without rebooting).
chlicense -f on : enables the floating licensing.
lsitabLists records in the /etc/inittab file.
chitab
Changes records in the /etc/inittab file.
mkitab
Adds records to the /etc/inittab file.
rmitab
Removes records from the /etc/inittab file.
telinit or init
Initializes and controls processes.
0-9 Tells the init process to put the system in one of the run levels 0-9. S,s,M,m Tells the init process to enter the maintenance mode. a,b,c Tells the init process to examine only those records in the /etc/inittab file with a, b, or c in the run-level field. Q,q Tells the init process to re-examine the entire /etc/inittab file. N Sends a signal that stops processes from being respawned.
telinit q : requests the init command to re-examine the /etc/inittab file.
who
Identifies the users currently logged in.
Identify Runlevel
who -r : displays the runlevel.
who /var/adm/wtmp : displays a history of logins, logouts, system startups, and system shutdowns.
restbase
Restores customized information from the boot image. Attention: The command is executed only during system boot phase 1. Do not execute it in a run-time environment.
savebase
Saves base customized device data in the ODM onto the boot device.
savebase -d /dev/hdisk0 : save the ODM to the boot logical volume.
The numeric 1 key (F1 on graphical display), when pressed during POST (double beep), starts the SMS interface.
The numeric 5 key (F5 on graphical display), when pressed during POST, initiates a system boot in service mode using the default service mode boot list. Sequence:
1. diskette (if installed)
2. CD-ROM (if installed)
3. hard disk
4. tape drive (if installed)
5. network (a. Token ring, b. Ethernet)
The numeric 6 key (F6 on graphical display) works like the numeric 5 key, but uses the customized service mode bootlist. This is the preferred method of loading AIX diagnostics from the boot hard disk.
ipl_varyon * Used to vary on the root volume group during system boot processing.
ipl_varyon -i : Inquiry mode - skips ipl device processing. Checks which disks are already bootable.
bosboot
Creates boot image. It does not update the bootlist in the NVRAM.
bosboot -a -d /dev/hdisk0 : Re-create boot image on hdisk0.
bosboot -a -d /dev/ipldevice -D : creates a boot image with the KDB debugger enabled.
mklv
Creates a logical volume.
mklv -y hd5 -t boot rootvg 1 : re-create boot LV (BLV) hd5.
lslv
Displays information about a logical volume.
lslv -l hd5 : determines the boot disk.
mkboot
Creates the boot image, the boot record, and the service record.
mkboot -c -d /dev/hdisk0 : clears the boot record of PV hdisk0.
chpv
Changes the characteristics of a physical volume in a volume group.
chpv -c hdisk1 : clears the boot record of PV hdisk1.
bootinfo Determines and displays various boot information, including boot device type and boot device name (NOT supported in AIX 4.2 or later).
bootinfo -b : returns the last boot device.
bootinfo -B hdisk0 : returns 1 if disk is bootable, 0 if not.
bootlist
Displays or alters the list or ordering of boot devices available to the system.
Normal boot list: possible boot devices for normal mode.
Service boot list: possible boot devices for service mode.
Previous boot device: last device from which the system booted.
Support of these boot lists is model dependent.
bootlist -m normal -o : displays the normal boot list.
bootlist -m service -o : displays the service boot list (if available).
bootlist -m normal cd0 hdisk0 hdisk1 : makes changes to the normal boot list.
bootlist -m prevboot : invalidates the last device from which the system booted.
halt or fasthalt
Writes data to disk (sync) and then stops the system. The system does not restart. Do not use this command if other users are logged into the system.
reboot or fastboot
Restarts the system. Can be used if no other users are logged into the system.
shutdown
Halts the operating system. Checks the existence of the executable /etc/rc.shutdown file (added by the administrator) that specifies all the applications and other user processes to close down.
By default the shutdown command powers down the system (if supported and issued).
shutdown -Fr : fast system shutdown and restart.
shutdown -m +1 : brings the system down to maintenance (single user) mode after waiting one minute.
shutdown -l : logs the output during the shutdown to /etc/shutdown.log.
last
Displays information about previous logins using the /var/adm/wtmp file.
last reboot : displays the time between reboots.
last shutdown : lists last shutdowns of the system.
uptime
Shows how long the system has been up.
uptime : displays the current time, the length of time the system has been up, the number of users online, and the load average.
sync
Updates the i-node table and writes buffered files to the hard disk.
sync;sync;sync;reboot : writes everything from the buffer to the hard disk and reboots the system.
lsfont
Lists the fonts available for use by the display.
chfont
Changes the default font selected at boot time.
mkfont
Adds the font code associated with a display to the system.
mkfontdir
Creates a fonts.dir file from a directory of font files.
chlang
Sets LANG environment variable in the /etc/environment file for next login.
chtz
Changes the system time zone information in the /etc/environment file.
chhwkbd
Changes the low-function terminal (LFT) keyboard attributes stored in the Object Data Manager (ODM) database.
lskbd
Lists the keyboard maps currently available to the low-function terminal (LFT) subsystem.
chkbd
Changes the default keyboard map used by the low-function terminal (LFT) at system startup.
chkey
Changes your encryption key.
lslicense
Displays the number of fixed licenses and the status of floating licensing. There are two types of user licensing, fixed and floating. Fixed licensing is always enabled. Floating licensing can be enabled or disabled.
lslicense -A : displays the number of available fixed licences on the system.
chlicense
Changes the number of fixed licenses and the status of the floating licensing (updates login.cfg).
chlicense -I -u 50I -u 50 : changes the fixed license number immediately to 50 (without rebooting).
chlicense -f on : enables the floating licensing.
lsitabLists records in the /etc/inittab file.
chitab
Changes records in the /etc/inittab file.
mkitab
Adds records to the /etc/inittab file.
rmitab
Removes records from the /etc/inittab file.
telinit or init
Initializes and controls processes.
0-9 Tells the init process to put the system in one of the run levels 0-9. S,s,M,m Tells the init process to enter the maintenance mode. a,b,c Tells the init process to examine only those records in the /etc/inittab file with a, b, or c in the run-level field. Q,q Tells the init process to re-examine the entire /etc/inittab file. N Sends a signal that stops processes from being respawned.
telinit q : requests the init command to re-examine the /etc/inittab file.
who
Identifies the users currently logged in.
Identify Runlevel
who -r : displays the runlevel.
who /var/adm/wtmp : displays a history of logins, logouts, system startups, and system shutdowns.
restbase
Restores customized information from the boot image. Attention: The command is executed only during system boot phase 1. Do not execute it in a run-time environment.
savebase
Saves base customized device data in the ODM onto the boot device.
savebase -d /dev/hdisk0 : save the ODM to the boot logical volume.
IBM AIX - Red Books
Click the following link to access AIX Redbooks: IBM AIX - RedBooks
Wednesday, April 15, 2009
AIX - System installation and maintenance management
oslevel
Reports the latest installed maintenance level of the system.
oslevel -r : determines the highest recommended maintenance level reached for the current version of AIX.
oslevel -lr 5100-04: lists which fileset updates are missing if after installing ML 04 on 5100-03 the command oslevel -r still shows 5100-03.
alog
Creates and maintains fixed-size log files.
alog -o -t boot : view the boot log (the log that holds boot information).
alog -L : lists the logs defined in the alog database.
errpt
Generates a report of logged errors in the system error log.
errpt -a : displays a complete detailed report.
errpt -c > /dev/console : formats and displays each of the errors at logtime (concurrent error logging) on /dev/console.
errdemon
Starts the error logging daemon errdemon that reads error records from the /dev/error file and creates error log entries in the default system error log /var/adm/ras/errlog.
/usr/lib/errdemon : starts the error logging daemon.
/usr/lib/errdemon -l : displays the path to the system error log file and error log size.
/usr/lib/errdemon -s 2000000 : changes the maximum size of the error log file to 2 MB.
syslogd
The syslogd daemon logs messages from kernel, daemons and system applications using /etc/syslog.conf.
*.debug errlog (add this line to to syslog.conf to redirect all syslog messages to the system error log).
stopsrc -s syslogd : stops the syslogd daemon.
startsrc -s syslogd : starts the syslogd daemon.
refresh -s syslogd : refreshes the syslogd daemon.
errlogger
Logs an operator message.
errlogger new disk added on scsi1 adapter : logs "new disk added on scsi1 adapter" in the system error log.
errclear
Deletes entries from the system error log. Software and operator errors (older than 30 days) and hardware errors (older than 90 days) are removed using crontab.
errinstall
Installs or replaces messages in the error logging message sets of the error log message catalog.
errupdate
Updates the Error Record Template Repository (default file /var/adm/ras/errtmplt).
diag
Menu driven program to run a wide choice of tasks and service aids (diagnostics, hardware error report, format, microcode and bootlist management, ...).
Diagnostics modes:
Concurrent mode: diag is used during normal operation (only devices not in use can be tested).
Single-user mode: run diag after shutdown -m.
Stand-alone mode: boot from Diagnostics CD (press F5 when acoustic beep is heard)
or boot and press F6 when acoustic beep is heard to load diag from hard disk.
if diag returns "diag is not supported on this model" use:
SMS mode: boot and press F1 when acoustic beep is heard, select "test the computer". Some older models use a SMS diskette.
alt_disk_install
Installs an alternate disk with a mksysb install image or clones the currently running system to an alternate disk.
Note: install bos.alt_disk_install fileset to use alt_disk_install.
alt_disk_install -C hdisk2 : Clones the current rootvg to hdisk2.
alt_disk_install -C -b update_all -l /dev/cd0 hdisk4 : Creates clone of the current rootvg on hdisk4, installs a ML on the clone and changes the bootlist to hdisk4.
alt_disk_install -X old_rootvg : Removes the original rootvg from the ODM, after booting from the new alternate disk (you can still reboot from old_rootvg).
nimadm
Performs Alternate Disk Migration (to a new version or release) of AIX using NIM resources.
nimadm -c aix1 -s spot2 -l lpp2 -d "hdisk1 hdisk2" -Y : migrates totarget NIM client aix1, using NIM SPOT resource spot2, the NIM lpp_source lpp2, and hdisk1 and hdisk2 target disks, and agreeing to all required software license agreements for the software being installed (-Y).
nim -o alt_disk_install -a source=rootvg -a disk='hdisk2' -a phase=12 holland : clones a rootvg on client holland to hdisk1, but only run phase1 and phase2 (leaving the /alt_inst file systems mounted).
Reports the latest installed maintenance level of the system.
oslevel -r : determines the highest recommended maintenance level reached for the current version of AIX.
oslevel -lr 5100-04: lists which fileset updates are missing if after installing ML 04 on 5100-03 the command oslevel -r still shows 5100-03.
alog
Creates and maintains fixed-size log files.
alog -o -t boot : view the boot log (the log that holds boot information).
alog -L : lists the logs defined in the alog database.
errpt
Generates a report of logged errors in the system error log.
errpt -a : displays a complete detailed report.
errpt -c > /dev/console : formats and displays each of the errors at logtime (concurrent error logging) on /dev/console.
errdemon
Starts the error logging daemon errdemon that reads error records from the /dev/error file and creates error log entries in the default system error log /var/adm/ras/errlog.
/usr/lib/errdemon : starts the error logging daemon.
/usr/lib/errdemon -l : displays the path to the system error log file and error log size.
/usr/lib/errdemon -s 2000000 : changes the maximum size of the error log file to 2 MB.
syslogd
The syslogd daemon logs messages from kernel, daemons and system applications using /etc/syslog.conf.
*.debug errlog (add this line to to syslog.conf to redirect all syslog messages to the system error log).
stopsrc -s syslogd : stops the syslogd daemon.
startsrc -s syslogd : starts the syslogd daemon.
refresh -s syslogd : refreshes the syslogd daemon.
errlogger
Logs an operator message.
errlogger new disk added on scsi1 adapter : logs "new disk added on scsi1 adapter" in the system error log.
errclear
Deletes entries from the system error log. Software and operator errors (older than 30 days) and hardware errors (older than 90 days) are removed using crontab.
errinstall
Installs or replaces messages in the error logging message sets of the error log message catalog.
errupdate
Updates the Error Record Template Repository (default file /var/adm/ras/errtmplt).
diag
Menu driven program to run a wide choice of tasks and service aids (diagnostics, hardware error report, format, microcode and bootlist management, ...).
Diagnostics modes:
Concurrent mode: diag is used during normal operation (only devices not in use can be tested).
Single-user mode: run diag after shutdown -m.
Stand-alone mode: boot from Diagnostics CD (press F5 when acoustic beep is heard)
or boot and press F6 when acoustic beep is heard to load diag from hard disk.
if diag returns "diag is not supported on this model" use:
SMS mode: boot and press F1 when acoustic beep is heard, select "test the computer". Some older models use a SMS diskette.
alt_disk_install
Installs an alternate disk with a mksysb install image or clones the currently running system to an alternate disk.
Note: install bos.alt_disk_install fileset to use alt_disk_install.
alt_disk_install -C hdisk2 : Clones the current rootvg to hdisk2.
alt_disk_install -C -b update_all -l /dev/cd0 hdisk4 : Creates clone of the current rootvg on hdisk4, installs a ML on the clone and changes the bootlist to hdisk4.
alt_disk_install -X old_rootvg : Removes the original rootvg from the ODM, after booting from the new alternate disk (you can still reboot from old_rootvg).
nimadm
Performs Alternate Disk Migration (to a new version or release) of AIX using NIM resources.
nimadm -c aix1 -s spot2 -l lpp2 -d "hdisk1 hdisk2" -Y : migrates totarget NIM client aix1, using NIM SPOT resource spot2, the NIM lpp_source lpp2, and hdisk1 and hdisk2 target disks, and agreeing to all required software license agreements for the software being installed (-Y).
nim -o alt_disk_install -a source=rootvg -a disk='hdisk2' -a phase=12 holland : clones a rootvg on client holland to hdisk1, but only run phase1 and phase2 (leaving the /alt_inst file systems mounted).
AIX - Problem Determination
sysdumpdev
Changes the primary or secondary dump device designation in a running system. The default primary dump device is LV /dev/hd6 and the default secondary dump device is /dev/sysdumpnull. A dedicated primary dump device LV /dev/lg_dumplv is created (if sufficient disk space is available) in systems with at least 4 Gigabytes of real memory.
sysdumpdev -l : displays current dump device settings.
sysdumpdev -P -p /dev/hd7 : changes the primary dump device permanently from the default to LV /dev/hd7.
sysdumpdev -e : estimates the dump size (in bytes) for the current running system.
sysdumpdev -L : displays statistical information about the last dump.
chdev -l sys0 -a autostart=true : automatically reboot after a crash (default is false).
dumpcheck
Checks the disk resources used by the system dump and logs in the system error log. Run default by cron at 3:00 pm local time each day.
/usr/lib/ras/dumpcheck -p : requests a dumpcheck. The result is printed to stdout (-p).
/usr/lib/ras/dumpcheck -r : discontinues running dumpcheck (removes the crontab entry).
kdb
Displays system images for examining a dump.
kdb /var/adm/ras/vmcore.0 /unix : starts kdb using the uncompressed dump file /var/adm/ras/vmcore.0 and kernel file /unix.
snap
Gathers system configuration information and compresses the information into a pax file.
snap -a -o /dev/rmt0 : gathers all system configuration information (needs approximately 8 MB space in directory /tmp/ibmsupt) and creates a compressed pax image (snap.pax.Z) of directory /tmp/ibmsupt.
snapcore
Gathers the core file, program, and libraries used by a program to directory /tmp/snapcore (default) and compresses the information into a pax image. The collected information allows debugging and resolving problems within an application.
snapcore -d /tmp/snapcore2 core.xx : gathers all needed information for core dump file core.xx and writes it to directory /tmp/snapcore2/snapcore_32811.pax.Z, where 32811 is the process id ($pid) of the snapcore command.
uncompress -c snapcore_32811.pax.Z | pax : displays the contents of the pax archive.
check_core
Used by snapcore to gather all information about a core dump. The bos.rte.serv_aid fileset must be installed.
/usr/lib/ras/check_core core.xx : displays a list containing the program that caused core dump core.xx and the used libraries.
shconf
Manages the system hang detection parameters for the system hang daemon shdaemon.
shconf -d : displays if priority problem detection and lost I/O detection are enabled or not.
shconf -E -l prio -H : displays the current shdaemon settings.
Changes the primary or secondary dump device designation in a running system. The default primary dump device is LV /dev/hd6 and the default secondary dump device is /dev/sysdumpnull. A dedicated primary dump device LV /dev/lg_dumplv is created (if sufficient disk space is available) in systems with at least 4 Gigabytes of real memory.
sysdumpdev -l : displays current dump device settings.
sysdumpdev -P -p /dev/hd7 : changes the primary dump device permanently from the default to LV /dev/hd7.
sysdumpdev -e : estimates the dump size (in bytes) for the current running system.
sysdumpdev -L : displays statistical information about the last dump.
chdev -l sys0 -a autostart=true : automatically reboot after a crash (default is false).
dumpcheck
Checks the disk resources used by the system dump and logs in the system error log. Run default by cron at 3:00 pm local time each day.
/usr/lib/ras/dumpcheck -p : requests a dumpcheck. The result is printed to stdout (-p).
/usr/lib/ras/dumpcheck -r : discontinues running dumpcheck (removes the crontab entry).
kdb
Displays system images for examining a dump.
kdb /var/adm/ras/vmcore.0 /unix : starts kdb using the uncompressed dump file /var/adm/ras/vmcore.0 and kernel file /unix.
snap
Gathers system configuration information and compresses the information into a pax file.
snap -a -o /dev/rmt0 : gathers all system configuration information (needs approximately 8 MB space in directory /tmp/ibmsupt) and creates a compressed pax image (snap.pax.Z) of directory /tmp/ibmsupt.
snapcore
Gathers the core file, program, and libraries used by a program to directory /tmp/snapcore (default) and compresses the information into a pax image. The collected information allows debugging and resolving problems within an application.
snapcore -d /tmp/snapcore2 core.xx : gathers all needed information for core dump file core.xx and writes it to directory /tmp/snapcore2/snapcore_32811.pax.Z, where 32811 is the process id ($pid) of the snapcore command.
uncompress -c snapcore_32811.pax.Z | pax : displays the contents of the pax archive.
check_core
Used by snapcore to gather all information about a core dump. The bos.rte.serv_aid fileset must be installed.
/usr/lib/ras/check_core core.xx : displays a list containing the program that caused core dump core.xx and the used libraries.
shconf
Manages the system hang detection parameters for the system hang daemon shdaemon.
shconf -d : displays if priority problem detection and lost I/O detection are enabled or not.
shconf -E -l prio -H : displays the current shdaemon settings.
Subscribe to:
Posts (Atom)