Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Wednesday 27 November 2013

Below are the Important & Frequently used commands used by most of the AIX Administrators

ls                 Lists files in current directory

cd                change directory
mkdir          to make a directory
rmdir           to remove directory
cp                 to copy a file
rm                to remove a a file
mv                to rename a file
more            to check the file page wise
tail                 to check the bottom lines of a file
head             to check the top lines of a file
grep             to find particular format of words or format
chmod         to change the file permissions
kill                 to kill a process and to stop the process
who               to check who are logged in currently
finger            to show who all are logged in
history          to show you the commmands run previously
df -gt              to list  the disk free space in Gigs
exit                 to logout frm the aix or Unix machine
topas             to check the utilisation of CPU,process which is using most resources and also                         the I\O onDisk
ifconfig -a to show you all the ipaddressess of htat server
errpt               to check the errorlog of AIX for both software and hardware
nslookup      to find out server name frm ip address and vice versa


cfgmgr                                                To check n update the database and list the hardware
lsdev -cc tape                                    To check all the tapes drives
lslpp -L  all                                          List all the softwares that are installed
lslpp -L                 To Check if the software installed
lslpp -f                                                   Lists all the file sets and packages
lslpp -ha                                               To list the history of files that have been installed
hostname                                             to get the hostname of the host you hav logged in
ifconfig -device name                       to list the network card setting  for that particular card
ifconfig devicename UP/DOWN        To change the status of the Nic card v r refering
ifconfig devicename DETACH          To remove the Nic frm the list of Nic interfaces
route -ADD/DELETE -NET/HOST Destination Gateway  to add a route between the source and Destination.


lsattr -EHI inet0                          displays the route listed in odm database
odmget -q "name=inet0" xyz  Gives u the list of the details in the ODM database about the                                                                ROUTE  which is in ODM Database

uname -a                                    to show the flavour of unix,version and serial number of                                                                   themachine
lsattr -EHI inet0                         displays the route listed in odm database
lscfg -vl rmtname                      how to find the serial number of a drive
lscfg -vl fcs0 or 1 or 2              to get the wwpn name of the FC
lscfg                                             to list all the devices
lscfg -v                                         verbose for all the devices
rmdev -l devicename -d           to delete it
lsattr -l devicename -E             how to get the WWN number of a drive
mkdev -l devicename               to change the defined device to available
prtconf                                         to show all the info abt the hardware of the system
bootinfo -b                                  will tel u frm where the server has botted up
bootinfo -r                                   tell you the real memory
bootinfo -T                                  tell you the machine type
ping                                              to check the remote machine is alive or not

AIX Networking Commands

1) How can I display or set values for network parameters?

The no command sets or displays current or next boot values for network tuning parameters.

2) How do I get the IP address of my machine?
Type one of the following:
ifconfig -a

host Fully_Qualified_Host_Name

For example, type host cyclop.austin.ibm.com.


3) How do I identify the network interfaces on my server?
Either of the following two commands will display the network interfaces:
lsdev -Cc if

ifconfig -a

To get information about one specific network interface, for example, tr0, run the command:
ifconfig tr0

4) How do I activate a network interface?
To activate the network interface tr0, run the command:
ifconfig tr0 up

5) How do I deactivate a network interface?
For example, to deactivate the network interface tr0, run the command:
ifconfig tr0 down

6) How do I display routing table, interface, and protocol information?
To display routing table information for an Internet interface, type:
netstat -r -f inet

To display interface information for an Internet interface, type:
netstat -i -f inet

To display statistics for each protocol, type:
netstat -s -f inet
 

7) How do I record packets received or transmitted?
To record packets coming in and going out to any host on every interface, enter:
iptrace /tmp/nettrace

The trace information is placed into the /tmp/nettrace file.
To record packets received on an interface en0 from a remote host airmail over the telnet port, enter:
iptrace -i en0 -p telnet -s airmail /tmp/telnet.trace

The trace information is placed into the /tmp/telnet.trace file.

AIX Workload partitions commands

1) How do I create a workload partition?
To create a workload partition named temp with the IP Address xxx.yyy.zzz.nnn, type:
mkwpar -n temp -N address= xxx.yyy.zzz.nnn

To create a workload partition with the specification file wpar1.spec, type:
mkwpar -f /tmp/wpar1.spec

2) How do I create a new specification file for an existing workload partition wpar1?
To create a specification file wpar2.spec for an existing workload partition wpar1, type:
mkwpar -e wpar1 -o /tmp/wpar2.spec -w
    

3) How do I start a workload partition?
To start the workload partition called temp, type:
startwpar temp

4) How do I stop a workload partition?
To stop the workload partition called temp, type:
stopwpar temp

5) How do I view the characteristics of workload partitions?
To view the characteristics of all workload partitions, type:
lswpar

Name State Type Hostname  Directory     
---------------------------------------------------------------------------------
bar A S bar.austin.ibm.com /wpars/bar 
foo D S foo.austin.ibm.com /wpars/foo
trigger A A trigger   /


6) How do I log in to a workload partition?
To log in to the workload partition named wpar1 as user foo, type:
clogin wpar1 -l foo

7) How do I run a command in a workload partition?
To run the /usr/bin/ps command as user root in a workload partition named howdy, type:
clogin howdy -l root /usr/bin/ps 

8) How do I remove a workload partition?
To remove the workload partition called temp, type:
rmwpar temp

To stop and remove the workload partition called temp preserving data on its file system, type:
rmwpar -p -s temp

Note: Workload Partitions (WPARs), a set of completely new software-based system virtualization features, were introduced in IBM AIX Version 6.1.

AIX Performance monitoring tools

1) How do I display virtual memory statistics?
To display a summary of the virtual memory statistics since boot, type:
vmstat

To display five summaries at 2-second intervals, type:
vmstat 2 5

To display a summary of the statistics for all of the workload partitions after boot, type:
vmstat -@ ALL

To display all of the virtual memory statistics available for all of the workload partitions, type:
vmstat -vs -@ ALL
 

2) How do I display statistics for all TTY, CPU, and Disks?
To display a single set of statistics for all TTY, CPU, and Disks since boot, type:
iostat

To display a continuous disk report at 2-second intervals for the disk with the logical name disk1, type:
iostat -d disk1 2

To display 6 reports at 2-second intervals for the disk with the logical name disk1, type:
iostat disk1 2 6

To display 6 reports at 2-second intervals for all disks, type:
iostat -d 2 6

To display only file system statistics for all workload partitions, type:
iostat -F -@ ALL

To display system throughput of all workload partitions along with the system, type:
iostat -s -@ ALL


3) How do I display detailed local and remote system statistics?
Type the following command:
topas

To go directly to the process display, enter:
topas -P

To go directly to the logical partition display, enter:
topas -L

To go directly to the disk metric display, enter:
topas -D

To go directly to the file system display, enter:
topas -F
 

4) How do I report system unit activity?
Type the following command:
sar

To report processor activity for the first two processors, enter:
sar  -u  -P 0,1

This produces output similar to the following:
cpu  %usr  %sys  %wio  %idle
0      45    45     5      5
1      27    65     3      5

Virtual I/O Server (VIOS) Interview Questions :

Latest Interview Questions (Aug 2013) by IBM, India on AIX VIOS and some scenario & troubleshooting based questions.

Virtual I/O Server (VIOS) Interview Questions :

  1. How will you see the HMC version?
  2. I have HMC, how will I get the # prompt through HMC?
  3. What you are checking before doing LPM?
  4. From which Power VM onwards LPM will supports? Is it support for P7 core also?
  5. what is the purpose of share attributes in vio's?
  6. What is use of user limits file?
  7. How will you see the wwpn number for running lpar?
  8. How will you see the wwpn number of new lpar?
  9. For new lpar how many wwpn number you can find how many wwpn no.s? why they are used for it?
  10. What are the precautions for vios upgradation?
  11. While creating the virtual Ethernet adapter for SEA what we have to select for that adapter?
  12. In dual vio  which is primary? How to know?
  13. After up gradation of vios lpar showing some pv are in missing. To avoid that how will you configure it?
  14. If ha_mode is sharing what will happen?
  15. In dual vios for sea adapter ha_mode ? 
  16. what is control channel?
  17. if  vio server has 4 sea howmany control channels are required? 
  18. The adapters which are going into  participate sea have to select check box of one of the field, what is that? 
  19. why we have select access external network?
  20. how can you increase max processing units value in caped mode? 
  21. npiv configuration? 
  22. which wwpn will you share with storage team?
  23. what is the vlan id for the control channel? 
  24. how will you see wwpn numbers after npiv configuration? 
  25. how to move I/O adapter which is in desired mode from one lpar to another lpar
  26. what are the demons for DLPAR
  27. how to check the DLPAR is working or not
  28. what is capped
  29. what is uncapped
  30. What is virtual processor?
  31. how to create hmc user
  32. how to login into pesh shell in hmc
  33. what is hscpe in hmc
  34. What is virtual process?
  35. What is capped and uncapped? 
  36. What is a micro partition? 
  37. What is a virtual memory?

VIOS Scenario & Troubleshooting based Interview Questions :

  1. In one ASMI one lpar is there,  I want to move the same lpar but it has different ASMI, how will you do it? Down time is required ?
  2. In the above scenario I don’t want downtime then how will you do it?
  3. In one core my lpar is created with dedicated processor, then it is possible to move to other core by using LPM?
  4. By using command line in HMC console the lpar is able to open but through GUI  I cant able to open then how can you troubleshoot it?
  5. One lpar have 3.5 cpu limits as a desired value when iam going to do dlpar from 3.5 to 4 it showing error like u cannot increase this value whatis the reason?
  6. If one lpar has 3.5 cpu limits how many minimum and and maximum virtual processors required?