There are a lot of commands on the AIX operating system. Here you introduce some system-level commands, which will help answer some common problems. Let's make a reference and add another modification.
The following command is tested on AIX 5.1.
The following commands are tested on AIX 5.1.
· About the kernel
Show AIX system kernels 32 bits or 64-bit:
Bootinfo -k
How to change core mode (32-bit or 64-bit)
The / UNIX file is connected to a bootable image. View by command ls -l / unix:
/ 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
The kernel installed by the default installation is 32 digits when the AIX system is installed. You can change the kernel mode with the following command:
LN -SF / USR / LIB / BOOT / UNIX_64 / UNIXLN -SF / USR / LIB / BOOT / UNIX_64 / USR / LIB / BOOT / UNIXBOSBOOT -AD / DEV / HDiskxxshutdown -R
Note: / dev / hdiskxx refers to the hard drive where the boot logic volume / dev / hd5 is located. You can view the XX by the following command:
LSLV -M HD5
· About hardware
Show machine hardware is 32 bits or 64 bits:
Bootinfo -y
How much is the physical memory of the machine:
Bootinfo -r
or
Lsattr --l sys0 -a realmem
Check if the machine supports 64-bit kernel (64-bit hardware)
/ usr / sbin / bootinfo -p
If 32 is returned, the hardware is 32 bits; if the CHRP is returned, the hardware is a 64-bit machine.
Displays the properties of the current tape device RMT0:
LSATTR -L RMT0 -E
Display the attributes of the default tape device RMT0:
LSATTR -L RMT0 -D
Display the login properties of TTY0:
Lsattr -l Tty0 -a login -r
Display system level properties:
Lsattr-E -L SYS0
How many CPUs are available in the current system:
LSCFG | GREP PROC
Check out how many hard drives in the current system are used:
LSPV
View the current system detailed configuration:
LSCFG-PV
You can also display a configuration of a device:
LSCFG-VL RMT0
View the chip name, system name, node name, model, etc. of the current system:
UNAME -P # Displays the name of the chip, for example: PowerPC
Uname -r # Displays the issuing number of the operating system
Uname -s # Display system name, for example: AIX
UNAME-N # Displays the node name
UNAME -A # Display system name, node name, version, machine ID
UNAME -M # Display model, for example: IBM, 7046-B50
Uname -v # Display the operating system version
uname -m # Display Machine ID
· About AIX
View AIX version, issue number, ml (maintenance level) level:
Oslevel -R
or
LSLP-h bos.rte
How to change the file system size, for example: add / usr file system to 1000000 bytes:
CHFS -A SIZE = 1000000 / USR
How to use CD:
Mount -V CDRFS -O RO / DEV / CD0 / CDROM View this machine's IP address:
IFConfig -a
or
Host full_qualified_host_name
For example: host cyclop.Austin.ibm.com
Find which file set (Fileset) contains a specific file, for example: find / usr / bin / vmstat which fileset.
LSLPP -W / USR / BIN / VMSTAT
Show which file set contains / usr / bin / svmon:
Which_fileset svmon
Check if all files in a certain level have been installed:
Instfix -i | GREP ML
How to determine if a patch (FIX) is installed, for example: check if IY24043 is installed
Instfix -ik iy24043
Which file sets are displayed or modified:
LPPCHK -V
View the allocation and use of the Paging Space:
LSPS -A
· About volume group and logical volume
Create a volume group:
Mkvg -y name_of_volume_group -s partition_size list_of_hard_disks
The partition_size unit is MB, which is a number between 1 and 1024. (2 power, for example: 1, 2, 4, 8, 16, 32, etc., the default is 4MB.)
Create a logical volume:
MKLV -Y NAME_OF_LOGICAL_VOLUME NAME_OF_VOLUME_GROUP NUMBER_OF_PARTITION
Display all volume groups of the current system:
LSVG
Detailed information about the volume group rootvg:
LSVG rootvg
Display all hard drives belonging to rootvg:
LSVG -P rootvg
How to add a hard disk to the volume group:
Extendvg Volume_group_name hdisk0 hdisk1 ... hdiskn
How to replace a hard drive:
1. Extendvg Volume_group_name hdisk_new
2. Migratepv hdisk_bad hdisk_new
3. REDUCEVG -D VOLUME_GROUP_NAME HDISK_BAD
How to make a logical volume mirror:
1. Mklvcopy logical_volume_name number_of_copies
2. Syncvg Volume_Group_name
On AIX, there is a very convenient system management command SMIT. In the command mentioned above, if the logical volume operation section, you can easily complete SMIT.
The commands herein are just a small part of AIX. For more details, please refer to the AIX system manual and technology red book.