AIX-Stuff
1.How would I know if I am running a 32-bit kernel or 64-bit kernel?
To display if the kernel is 32-bit enabled or 64-bit enabled, type:
bootinfo -K
2.How do I know if I am running a uniprocessor kernel or a multiprocessor kernel?
/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 it links to. The following are the three possible outputs from the ls -l /unix command and their corresponding kernels:
/unix -> /usr/lib/boot/unix_up # 32 bit uniprocessor kernel
/unix -> /usr/lib/boot/unix_mp # 32 bit multiprocessor kernel
/unix -> /usr/lib/boot/unix_64 # 64 bit multiprocessor kernel
Note:AIX 5L Version 5.3 does not support a uniprocessor kernel.
3.How can I change from one kernel mode to another?
During the installation process, one of the kernels, appropriate for the AIX version and the hardware in operation, is enabled by default. Let us use the method from the previous question and assume the 32-bit kernel is enabled. Let us also assume that you want to boot it up in the 64-bit kernel mode. This can be done by executing the following commands in sequence:
ln -sf /usr/lib/boot/unix_64 /unix
ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix
bosboot -ad /dev/hdiskxx
shutdown -r
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:
lslv -m hd5
Note:
In AIX 5.2, the 32-bit kernel is installed by default. In AIX 5.3, the 64-bit kernel is installed on 64-bit hardware and the 32-bit kernel is installed on 32-bit hardware by default.
4.How would I know if my machine is capable of running AIX 5L Version 5.3?
AIX 5L Version 5.3 runs on all currently supported CHRP (Common Hardware Reference Platform)-based POWER hardware.
5. How would I know if my machine is CHRP-based?
Run the prtconf command. If it's a CHRP machine, the string chrp appears on the Model Architecture line.
6.How would I know if my System p machine (hardware) is 32-bit or 64-bit?
To display if the hardware is 32-bit or 64-bit, type:
bootinfo -y
7.How much real memory does my machine have?
To display real memory in kilobytes (KB), type one of the following:
bootinfo -r (KB) prtconf -M(MB)
lsattr -El sys0 -a realmem
8.How big are my disks, even fibre channel LUNs?
# bootinfo -s hdisk7
102400
This means you have a 100G LUN.
9.Can my machine run the 64-bit kernel?
64-bit hardware is required to run the 64-bit kernel.
10.How many processors does my system have?
To display the number of processors on your system, type:
lscfg | grep proc
lsdev -Cc processor
11.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:
lspv
lsdev -Cc disk
12.How do I list information about a specific physical volume?
To find details about hdisk1, for example, run the following command:
lspv hdisk1
13.How do I get a detailed configuration of my system?
Type the following:
lscfg
You can obtain very similar information by running the prtconf command.
14.How do I find out the chip type, system name, node name, model number, and so forth?
uname with different options
15.What version, release, and maintenance level of AIX is running on my system?
Type one of the following:
oslevel -r
oslevel -s
lslpp -h bos.rte
16.How can I determine which fileset updates are missing from a particular AIX level?
To determine which fileset updates are missing from 5300-04, for example, run the following command:
oslevel -rl 5300-04
17.How do I create a file system?
The following command will create, within volume group testvg, a jfs file system of 10MB with mounting point /fs1:
crfs -v jfs -g testvg -a size=10M -m /fs1
The following command will create, within volume group testvg, a jfs2 file system of 10MB with mounting point /fs2 and having read only permissions:
crfs -v jfs2 -g testvg -a size=10M -p ro -m /fs2
18. How do I change the size of a file system?
To increase the /usr file system size by 1000000 512-byte blocks, type:
chfs -a size=+1000000 /usr
Note:
In AIX 5.3, the size of a JFS2 file system can be shrunk as well.
19.How do I mount a CD?
Type the following:
mount -V cdrfs -o ro /dev/cd0 /cdrom
20.How do I mount a file system?
The following command will mount file system /dev/fslv02 on the /test directory:
mount /dev/fslv02 /test
21.How do I mount all default file systems (all standard file systems in the /etc/filesystems file marked by the mount=true attribute)?
The following command will mount all such file systems:
mount {-a|all}
22.How do I unmount a file system?
Type the following command to unmount /test file system:
umount /test
23.How do I display mounted file systems?
Type the following command to display information about all currently mounted file systems:
mount
24.How do I remove a file system?
Type the following command to remove the /test file system:
rmfs /test
25.How can I defragment a file system?
The defragfs command can be used to improve or report the status of contiguous space within a file system. For example, to defragment the file system /home, use the following command:
defragfs /home
26.Which fileset contains a particular binary?
To show bos.acct contains /usr/bin/vmstat, type:
lslpp -w /usr/bin/vmstat
Or to show bos.perf.tools contains /usr/bin/svmon, type:
which_fileset svmon
27.How do I display information about installed filesets on my system?
Type the following:
lslpp -l
28.Type the following:
lslpp -l
29.How do I determine if all filesets of maintenance levels are installed on my system?
Type the following:
instfix -i | grep ML
30.How do I determine if a fix is installed on my system?
To determine if IY24043 is installed, type:
instfix -ik IY24043
31.How do I install an individual fix by APAR?
To install APAR IY73748 from /dev/cd0, for example, enter the command:
instfix -k IY73748 -d /dev/cd0
32.How do I verify if filesets have required prerequisites and are completely installed?
To show which filesets need to be installed or corrected, type:
lppchk -v
33.How do I determine the amount of paging space allocated and in use?
Type the following:
lsps -a
lsps -s
34.How do I increase a paging space?
You can use the chps -s command to dynamically increase the size of a paging space. For example, if you want to increase the size of hd6 with 3 logical partitions, you issue the following command:
chps -s 3 hd6
35.How do I reduce a paging space?
You can use the chps -d command to dynamically reduce the size of a paging space. For example, if you want to decrease the size of hd6 with four logical partitions, you issue the following command:
chps -d 4 hd6
36.How would I know if my system is capable of using Simultaneous Multi-threading (SMT)?
Your system is capable of SMT if it's a POWER5-based system running AIX 5L Version 5.3.
37.How would I know if SMT is enabled for my system?
If you run the smtctl command without any options, it tells you if it's enabled or not
38.Is SMT supported for the 32-bit kernel?
Yes, SMT is supported for both 32-bit and 64-bit kernel.
39.How do I enable or disable SMT?
You can enable or disable SMT by running the smtctl command. The following is the syntax:
smtctl [ -m off | on [ -w boot | now]]
40.How do I get partition-specific information and statistics?
The lparstat command provides a report of partition information and utilization statistics. This command also provides a display of Hypervisor information.
Volume groups and logical volumes
41.How do I know if my volume group is normal, big, or scalable?
Run the lsvg command on the volume group and look at the value for MAX PVs. The value is 32 for normal, 128 for big, and 1024 for scalable volume group.
42.How to create a volume group?
Use the following command, where spartition_size sets the number of megabytes (MB) in each physical partition where the partition_size is expressed in units of MB from 1 through 1024. (It's 1 through 131072 for AIX 5.3.) The partition_size variable must be equal to a power of 2 (for example: 1, 2, 4, 8). The default value for standard and big volume groups is the lowest value to remain within the limitation of 1016 physical partitions per physical volume. The default value for scalable volume groups is the lowest value to accommodate 2040 physical partitions per physical volume.
mkvg -y name_of_volume_group -s partition_size list_of_hard_disks
43.How can I change the characteristics of a volume group?
You use the following command to change the characteristics of a volume group:
chvg
44.How do I create a logical volume?
Type the following:
mklv -y name_of_logical_volume name_of_volume_group number_of_partition
45.How do I increase the size of a logical volume?
To increase the size of the logical volume represented by the lv05 directory by three logical partitions, for example, type:
extendlv lv05 3
46.How do I display all logical volumes that are part of a volume group (for example, rootvg)?
You can display all logical volumes that are part of rootvg by typing the following command:
lsvg -l rootvg
47.How do I list information about logical volumes?
Run the following command to display information about the logical volume lv1:
lslv lv1
48.How do I remove a logical volume?
You can remove the logical volume lv7 by running the following command:
rmlv lv7
49.How do I mirror a logical volume?
1. mklvcopy LogicalVolumeName Numberofcopies
2. syncvg VolumeGroupName
50.How do I remove a copy of a logical volume?
You can use the rmlvcopy command to remove copies of logical partitions of a logical volume. To reduce the number of copies of each logical partition belonging to logical volume testlv, enter:
rmlvcopy testlv 2
To display if the kernel is 32-bit enabled or 64-bit enabled, type:
bootinfo -K
2.How do I know if I am running a uniprocessor kernel or a multiprocessor kernel?
/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 it links to. The following are the three possible outputs from the ls -l /unix command and their corresponding kernels:
/unix -> /usr/lib/boot/unix_up # 32 bit uniprocessor kernel
/unix -> /usr/lib/boot/unix_mp # 32 bit multiprocessor kernel
/unix -> /usr/lib/boot/unix_64 # 64 bit multiprocessor kernel
Note:AIX 5L Version 5.3 does not support a uniprocessor kernel.
3.How can I change from one kernel mode to another?
During the installation process, one of the kernels, appropriate for the AIX version and the hardware in operation, is enabled by default. Let us use the method from the previous question and assume the 32-bit kernel is enabled. Let us also assume that you want to boot it up in the 64-bit kernel mode. This can be done by executing the following commands in sequence:
ln -sf /usr/lib/boot/unix_64 /unix
ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix
bosboot -ad /dev/hdiskxx
shutdown -r
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:
lslv -m hd5
Note:
In AIX 5.2, the 32-bit kernel is installed by default. In AIX 5.3, the 64-bit kernel is installed on 64-bit hardware and the 32-bit kernel is installed on 32-bit hardware by default.
4.How would I know if my machine is capable of running AIX 5L Version 5.3?
AIX 5L Version 5.3 runs on all currently supported CHRP (Common Hardware Reference Platform)-based POWER hardware.
5. How would I know if my machine is CHRP-based?
Run the prtconf command. If it's a CHRP machine, the string chrp appears on the Model Architecture line.
6.How would I know if my System p machine (hardware) is 32-bit or 64-bit?
To display if the hardware is 32-bit or 64-bit, type:
bootinfo -y
7.How much real memory does my machine have?
To display real memory in kilobytes (KB), type one of the following:
bootinfo -r (KB) prtconf -M(MB)
lsattr -El sys0 -a realmem
8.How big are my disks, even fibre channel LUNs?
# bootinfo -s hdisk7
102400
This means you have a 100G LUN.
9.Can my machine run the 64-bit kernel?
64-bit hardware is required to run the 64-bit kernel.
10.How many processors does my system have?
To display the number of processors on your system, type:
lscfg | grep proc
lsdev -Cc processor
11.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:
lspv
lsdev -Cc disk
12.How do I list information about a specific physical volume?
To find details about hdisk1, for example, run the following command:
lspv hdisk1
13.How do I get a detailed configuration of my system?
Type the following:
lscfg
You can obtain very similar information by running the prtconf command.
14.How do I find out the chip type, system name, node name, model number, and so forth?
uname with different options
15.What version, release, and maintenance level of AIX is running on my system?
Type one of the following:
oslevel -r
oslevel -s
lslpp -h bos.rte
16.How can I determine which fileset updates are missing from a particular AIX level?
To determine which fileset updates are missing from 5300-04, for example, run the following command:
oslevel -rl 5300-04
17.How do I create a file system?
The following command will create, within volume group testvg, a jfs file system of 10MB with mounting point /fs1:
crfs -v jfs -g testvg -a size=10M -m /fs1
The following command will create, within volume group testvg, a jfs2 file system of 10MB with mounting point /fs2 and having read only permissions:
crfs -v jfs2 -g testvg -a size=10M -p ro -m /fs2
18. How do I change the size of a file system?
To increase the /usr file system size by 1000000 512-byte blocks, type:
chfs -a size=+1000000 /usr
Note:
In AIX 5.3, the size of a JFS2 file system can be shrunk as well.
19.How do I mount a CD?
Type the following:
mount -V cdrfs -o ro /dev/cd0 /cdrom
20.How do I mount a file system?
The following command will mount file system /dev/fslv02 on the /test directory:
mount /dev/fslv02 /test
21.How do I mount all default file systems (all standard file systems in the /etc/filesystems file marked by the mount=true attribute)?
The following command will mount all such file systems:
mount {-a|all}
22.How do I unmount a file system?
Type the following command to unmount /test file system:
umount /test
23.How do I display mounted file systems?
Type the following command to display information about all currently mounted file systems:
mount
24.How do I remove a file system?
Type the following command to remove the /test file system:
rmfs /test
25.How can I defragment a file system?
The defragfs command can be used to improve or report the status of contiguous space within a file system. For example, to defragment the file system /home, use the following command:
defragfs /home
26.Which fileset contains a particular binary?
To show bos.acct contains /usr/bin/vmstat, type:
lslpp -w /usr/bin/vmstat
Or to show bos.perf.tools contains /usr/bin/svmon, type:
which_fileset svmon
27.How do I display information about installed filesets on my system?
Type the following:
lslpp -l
28.Type the following:
lslpp -l
29.How do I determine if all filesets of maintenance levels are installed on my system?
Type the following:
instfix -i | grep ML
30.How do I determine if a fix is installed on my system?
To determine if IY24043 is installed, type:
instfix -ik IY24043
31.How do I install an individual fix by APAR?
To install APAR IY73748 from /dev/cd0, for example, enter the command:
instfix -k IY73748 -d /dev/cd0
32.How do I verify if filesets have required prerequisites and are completely installed?
To show which filesets need to be installed or corrected, type:
lppchk -v
33.How do I determine the amount of paging space allocated and in use?
Type the following:
lsps -a
lsps -s
34.How do I increase a paging space?
You can use the chps -s command to dynamically increase the size of a paging space. For example, if you want to increase the size of hd6 with 3 logical partitions, you issue the following command:
chps -s 3 hd6
35.How do I reduce a paging space?
You can use the chps -d command to dynamically reduce the size of a paging space. For example, if you want to decrease the size of hd6 with four logical partitions, you issue the following command:
chps -d 4 hd6
36.How would I know if my system is capable of using Simultaneous Multi-threading (SMT)?
Your system is capable of SMT if it's a POWER5-based system running AIX 5L Version 5.3.
37.How would I know if SMT is enabled for my system?
If you run the smtctl command without any options, it tells you if it's enabled or not
38.Is SMT supported for the 32-bit kernel?
Yes, SMT is supported for both 32-bit and 64-bit kernel.
39.How do I enable or disable SMT?
You can enable or disable SMT by running the smtctl command. The following is the syntax:
smtctl [ -m off | on [ -w boot | now]]
40.How do I get partition-specific information and statistics?
The lparstat command provides a report of partition information and utilization statistics. This command also provides a display of Hypervisor information.
Volume groups and logical volumes
41.How do I know if my volume group is normal, big, or scalable?
Run the lsvg command on the volume group and look at the value for MAX PVs. The value is 32 for normal, 128 for big, and 1024 for scalable volume group.
42.How to create a volume group?
Use the following command, where spartition_size sets the number of megabytes (MB) in each physical partition where the partition_size is expressed in units of MB from 1 through 1024. (It's 1 through 131072 for AIX 5.3.) The partition_size variable must be equal to a power of 2 (for example: 1, 2, 4, 8). The default value for standard and big volume groups is the lowest value to remain within the limitation of 1016 physical partitions per physical volume. The default value for scalable volume groups is the lowest value to accommodate 2040 physical partitions per physical volume.
mkvg -y name_of_volume_group -s partition_size list_of_hard_disks
43.How can I change the characteristics of a volume group?
You use the following command to change the characteristics of a volume group:
chvg
44.How do I create a logical volume?
Type the following:
mklv -y name_of_logical_volume name_of_volume_group number_of_partition
45.How do I increase the size of a logical volume?
To increase the size of the logical volume represented by the lv05 directory by three logical partitions, for example, type:
extendlv lv05 3
46.How do I display all logical volumes that are part of a volume group (for example, rootvg)?
You can display all logical volumes that are part of rootvg by typing the following command:
lsvg -l rootvg
47.How do I list information about logical volumes?
Run the following command to display information about the logical volume lv1:
lslv lv1
48.How do I remove a logical volume?
You can remove the logical volume lv7 by running the following command:
rmlv lv7
49.How do I mirror a logical volume?
1. mklvcopy LogicalVolumeName Numberofcopies
2. syncvg VolumeGroupName
50.How do I remove a copy of a logical volume?
You can use the rmlvcopy command to remove copies of logical partitions of a logical volume. To reduce the number of copies of each logical partition belonging to logical volume testlv, enter:
rmlvcopy testlv 2
Comments