Introduction
We all know that AIX has a vast array of commands that enable us to do multitudes of tasks. Depending on what we need to accomplish we use only a certain subset of these commands. These subsets differ from user to user and from need to need. However, there are a few core commands that we all use. We need these commands either to answer our own questions or to provide answers to the support professionals' queries.
In this article we will discuss some of these core commands. The intent is to provide a list that can be used as a ready reference. While the behavior of these commands should be identical in all releases of AIX, they have been tested only under AIX 5.1.
Note that the bootinfo command discussed in the following paragraphs is NOT a user-level command and is NOT supported in AIX 4.2 or later.
Commands
Kernel
To display if the kernel is 32-bit enabled or 64-bit enabled, type:
|
How can I change from one kernel mode to another?
/unix is a symbolic link to the booted kernel. To find out what kernel mode is running, enter ls -l /unix and see what file /unix is linked to. Following are the three possible outputs from ls -l /unix command and their corresponding kernels:
|
During the installation process, one of the 32-bit kernels, appropriate to the hardware, is enabled by default. The system can be changed to boot up in 64-bit kernel mode by using the following commands:
|
The /dev/hdiskxx directory is where the boot logical volume /dev/hd5 is located. To find out what xx is in hdiskxx, run the following command:
|
Hardware
64-bit hardware is required to run the 64-bit kernel. All pSeries 64-bit hardware can run either the 64-bit kernel or the 32-bit kernel. If you don't know whether your hardware is 64-bit or not, type the following command:
|
How much real memory does my machine have?
To display real memory in kilobytes, type:
|
or
|
Can my machine run AIX 5.2?
AIX 5.2 runs only on what is called Common Hardware Reference Platform (CHRP). If you don't know whether your hardware belongs to this class, type the following command:
|
If it does not return the string chrp it is not capable of running AIX 5.2.
In AIX 5.2, the 32-bit kernel is installed by default. The 64-bit kernel, along with JFS2 (enhanced journaled file system), can be enabled at installation time.
What attribute values do the devices in my system have?
To list the current attribute values for the tape device rmt0, type:
|
To list the default attribute values for the tape device rmt0, type:
|
To list the possible values of the login attribute for the tty device tty0, type:
|
To display system level attributes, type:
|
How many processors does my system have?
To display the number of processors on your system, type:
|
How many hard disks does my system have and which ones are in use?
To display the number of hard disks on your system, type:
|
How do I get detailed configuration of my system?
You can get detailed configuration information for your system with the lscfg -pv command. The -p flag displays platform specific device information. This flag is applicable to AIX 4.2.1 or later. The -v flag displays Vital Product Data (VPD) found in the Customized VPD object class.
For example, to display details about the tape drive rmt0, type:
|
How do I find out the Chip type, System name, Node name, Model Number etc.?
The uname command provides details about your system.
| uname -p | Displays the chip type of the system. For example, powerpc. |
| uname -r | Displays the release number of the operating system. |
| uname -s | Displays the system name. For example, AIX. |
| uname -n | Displays the name of the node. |
| uname -a | Displays the system name, nodename,Version, Machine id. |
| uname -M | Displays the system model name. For example, IBM, 7046-B50. |
| uname -v | Displays the operating system version |
| uname -m | Displays the machine ID number of the hardware running the system. |
| uname -u | Displays the system ID number. |
AIX
What Version, Release and Maintenance Level of AIX is running on my system?
|
or
|
How do I change the size of a filesystem?
To increase /usr filesystem size by 1000000 512-byte blocks, type:
|
How do I mount a cd?
|
How do I get the IP address of my machine?
|
or
|
For example, host cyclop.austin.ibm.com.
Which fileset contains a particular binary?
To show the fileset that contains /usr/bin/vmstat, type:
|
To show the fileset that contains /usr/bin/svmon, type:
|
How to determine if all filesets of Maintenance Levels are installed on your system?
|
How to determine if a fix is installed on your system?
To determine if IY24043 is installed, type:
|
How to verify if filesets have required prerequisites and are completely installed?
To show which filesets need to be installed or corrected, type:
|
How to get a dump of the header of the loader section and the symbol entries in symbolic representation?
|
How to determine the amount of paging space allocated and in use?
|
Volume Groups and Logical Volumes
How to create a volume group?
Use the following command, where spartition_size sets the number of megabytes in each physical partition where the partition_size is expressed in units of megabytes from 1 through 1024. The size variable must be equal to a power of 2 (for example 1, 2, 4, 8). The default value is 4.
|
How to Create a Logical Volume?
|
Queries about Volume Groups
To show volume groups in the system, type:
|
To show all the characteristics of rootvg, type:
|
To show disks used by rootvg, type:
|
How to Add a Disk to a Volume Group?
|
How to Replace a Disk?
1. extendvg VolumeGroupNamehdisk_new
2. migratepv hdisk_bad hdisk_new
3. reducevg -d VolumeGroupNamehdisk_bad
How to Mirror a Logical Volume?
1. mklvcopy LogicalVolumeNameNumberofcopies
2. syncvg VolumeGroupName
Admittedly, a list such as this can be helpful in quickly answering some of your own questions. Obviously it does not cover everything that you might need. You can extend the usefulness of such a list by adding other commands that would answer questions which are not covered here.
No comments:
Post a Comment