Friday, June 19, 2009

AIX Tips

1. Finding the type and serial no of the server

uname –Mu -------model and serial no

lsattr -El sys0 -a systemid -------- Serial no

2. Finding the filesets to be installed to reach an oslevel.

oslevel –rl 5300-08 – Lists the set of files/files to be installed to reach 5300-08

3. Finding the boot disk

ipl_varyon -i --------- show the boot disk.

4. Finding whether SMT is enabled.

smtctl --- shows the status of SMT

5. Finding the fileset which contains particular binary

lslpp -w /usr/bin/vmstat
o/p --> bos.acct

which_fileset svmon
o/p --> bos.perf.tools

lslpp –f bos.perf.tools

6. Working with vi and smit from maintanance mode

TERM=vt100
export TERM

7. Finding total no of users.

luser ALL |wc –l

Saturday, July 12, 2008

How to check AIX bootdisk

ipl_varyon -i will show the bootdisk

Friday, March 28, 2008

Using vi editor in AIX maintenance mode

Issue the command

#export TERM=aixterm and then use vi editor

Wednesday, January 16, 2008

Unlocking user accounts

3004-303 There have been too many unsuccessful login attempts; please see the system administrator.


you can check unsuccessful_login_count for a user:

# lsuser -f | grep unsuccessful_login_count

Then you need to reset the value to 0

# chsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s

oslevel command

oslevel -rl 5300-06 give you the required fileset to be installed for making the oslevel to 5300-06

Tuesday, May 08, 2007

Auto Completion in ksh

If you want to get auto filename completion in ksh set your editor as vi/emacs

#set -o vi
Press esc and \ to get auto filename completion

#set -o emacs

Press esc two times to get auto filename completion

Opening Web Based System Manager From telnet Session

Install any of the Xwindow utility in the client machine for eg: Xmanager

Set the DISPLAY variable

#DISPLAY=client_hostname:0.0

for eg: If the clent machine name is xyz.abc.com you have to set the DISPLAY as

#DISPLAY=xyz.abc.com:0.0

Then type the command

#xterm –ls –display $DISPLAY

Then you will get a graphical window with prompt issue the command

#wsm

You will get Web Based System Manager

Friday, April 13, 2007

Getting Command History from telnet Window

From ksh type th command:-
#set -o vi
Then you can use Esc and cursor movement characters (esc-k,esc-j)

Monday, July 17, 2006

Re-create a Corrupted Boot Image in AIX

Re-create a Corrupted Boot Image in AIX

The following procedure describes how to identify a corrupted boot image and re-create it. If your machine is currently running and you know the boot image has been corrupted or deleted, re-create the boot image by running the bosboot command with root authority.
Attention: Never reboot the system when you suspect the boot image is corrupted.
The following procedure assumes your system is not rebooting correctly because of a corrupted boot image. If possible, protect your system from a possible loss of data or functionality by scheduling your downtime when it least impacts your workload.
Insert the product media into the appropriate drive.
Power on the machine following the instructions provided with your system.
From the System Management Services menu, select Multiboot.
From the next screen, select Install From.
Select the device that holds the product media and then select Install.
Select the AIX version icon.
Follow the online instructions until you can select which mode you use for installation. At that point, select Start Maintenance Mode for System Recovery.
Select Access a Root Volume Group.
Follow the online instructions until you can select Access this Volume Group and start a shell.
Use the bosboot command to re-create the boot image. For example: bosboot -a -d /dev/hdisk0
If the command fails and you receive the following message: 0301-165 bosboot: WARNING! bosboot failed - do not attempt to boot device.
Try to resolve the problem using one of the following options, and then run the bosboot command again until you have successfully created a boot image:
Delete the default boot logical volume (hd5) and then create a new hd5.Or
Run diagnostics on the hard disk. Repair or replace, as necessary.
If the bosboot command continues to fail, contact your customer support representative.
Attention: If the bosboot command fails while creating a boot image, do not reboot your machine.
When the bosboot command is successful, use the reboot command to reboot your system.