Commonly used commands:
prtconf output AIX physical structure information
lsdev -C |grep mem View physical memory status
lsattr -EI mem0 View physical memory attributes
lsdev -C |grep proc View physical CPU status
lsattr -EI procX View physical CPU attributes
pmcycles -m View logical CPU attributes
lsdev -C |grep ent0 View network card hardware information
lsdev -C |grep en0 View standard Ethernet protocol interface information
lsdev -C |grep etO View IEEE802.3 Ethernet protocol interface information
netstat -in View network card traffic
ifconfig -a View the network card address and working status
lscfg -vl hdisk View hard disk information
lscfg -vpl fcs0 View FC card information
fcstat fcs0 View more detailed information about the FC card
lsdev -Cc adapter -S a | grep fcs View the valid fiber cards in the system
lsdev -C | grep fcs
fcstat -D fcs0 |grep Attention View FC card status
Check UUID:
lsattr -El hdisk9 -a unique_id
unique_id 332136005076802811350D00000000000000304214503IBMfcp Unique device identifier False
6005076802811350D000000000000003 is the UUID.
View multipath:
mpio_get_config -Av
lspath
View the VIOS mapped disk:
lsmap -all
The hard disk mapped by VIOS can be correspondingly viewed by PVID:
1.16:
ls pv
hdisk0 00f91504f9344452 rootvg active
hdisk1 00f91504211d9384 beijianvg active
hdisk4 00f91504ec7b5c61 new_databakvg active
hdisk5 00f9150462431deb beijianvg active
hdisk3 0007166d75a548bd beijianvg active
hdisk6 00f91504660f7518 rootvg active
hdisk7 00f91504210e8ebc rootvg active
# lsdev -Cc disk
hdisk0 Available Virtual SCSI Disk Drive
hdisk1 Available Virtual SCSI Disk Drive
hdisk2 Defined C6-T1-01 MPIO DS4700 Disk
hdisk3 Available Virtual SCSI Disk Drive
hdisk4 Available Virtual SCSI Disk Drive
hdisk5 Available Virtual SCSI Disk Drive
hdisk6 Available Virtual SCSI Disk Drive
hdisk7 Available Virtual SCSI Disk Drive
1.1:
lspv
hdisk0 00f91504f8d0e86f rootvg active
hdisk1 00f91504fcae16aa konkavg active
hdisk7 00f91504ec75d06e new_databakvg active
hdisk3 00f915046298db03 konkavg active
hdisk4 00f91504660e3185 rootvg active
hdisk5 00f915046299164d historyvg active
hdisk6 00f9150420c6f04d rootvg active
hdisk8 00f9150420c87f8e konkavg active
hdisk9 00f91504657bf3b4 backupvg active
# lsdev -Cc disk
hdisk0 Available Virtual SCSI Disk Drive
hdisk1 Available Virtual SCSI Disk Drive
hdisk2 Defined C6-T1-01 MPIO DS4700 Disk
hdisk3 Available Virtual SCSI Disk Drive
hdisk4 Available Virtual SCSI Disk Drive
hdisk5 Available Virtual SCSI Disk Drive
hdisk6 Available Virtual SCSI Disk Drive
hdisk7 Available Virtual SCSI Disk Drive
hdisk8 Available Virtual SCSI Disk Drive
hdisk9 Available C6-T1-01 MPIO DS4700 Disk
#
VIOS :
lspv
hdisk0 00f91504cf3f8dfb rootvg active
hdisk1 00f91504f8730a90 rootvg active
hdisk14 00f9150420c0eef1 None
hdisk2 00f91504f8b36057 P740_rootvg active
hdisk3 00f91504fcae16aa None
hdisk4 0007166d75a548bd None
hdisk12 00f91504ec7b5c61 None
hdisk13 00f91504ec75d06e None
hdisk5 00f9150462431deb None
hdisk6 00f915046299164d None
hdisk7 00f915046298db03 None
hdisk8 00f91504660e3185 None
hdisk9 00f91504660f7518 None
hdisk15 00f9150420c2903c None
hdisk16 00f9150420f4a183 None
hdisk17 00f915042112dc98 None
#
lsdev -Cc disk
hdisk0 Available 00-00-00 SAS Disk Drive
hdisk1 Available 00-00-00 SAS Disk Drive
hdisk2 Available 06-00-02 MPIO DS4700 Disk
hdisk3 Available 06-00-02 MPIO DS4700 Disk
hdisk4 Available 06-00-02 MPIO DS4700 Disk
hdisk5 Available 05-00-02 MPIO IBM 2076 FC Disk
hdisk6 Available 05-00-02 MPIO IBM 2076 FC Disk
hdisk7 Available 05-00-02 MPIO IBM 2076 FC Disk
hdisk8 Available 05-00-02 MPIO IBM 2076 FC Disk
hdisk9 Available 05-00-02 MPIO IBM 2076 FC Disk
hdisk10 Defined 05-00-02 MPIO DS4700 Disk
hdisk11 Defined 05-00-02 MPIO DS4700 Disk
hdisk12 Available 06-00-02 MPIO DS4700 Disk
hdisk13 Available 06-00-02 MPIO DS4700 Disk
hdisk14 Available 05-01-02 Other FC SCSI Disk Drive
hdisk15 Available 05-01-02 Other FC SCSI Disk Drive
hdisk16 Available 05-01-02 Other FC SCSI Disk Drive
hdisk17 Available 05-01-02 Other FC SCSI Disk Drive
errclear 0 Clear errpt log
Modifying the host name takes effect temporarily:
hostname NEW_HOSTNAME
Permanently effective smit hostname
或者 smit tcpip - futher configureation - hostname -set the hostname?
uname -S hostname
Or directly use the command chdev -l inet0 -a hostname=NEW_HOSTNAME
Query related commands:
hostname
date
uptime
errpt
lsvg -o
lsvg rootvg
lsvg -l rootvg
lsvg -p rootvg
lspv
lsdev -Cc disk
df -g
lsps -a
lspath
netstat -s
vmstat -s
vmstat -v
prtconf
netstat -i
vmo -a
lsattr -El sys0 view status
lscfg -vp |grep -i -p dimm View detailed memory information
lscfg -vp |grep -p PROC View detailed CPU information
lscfg -vp |grep -p -i'A IBM AC PS' View the detailed information of the power supply
lscfg -vp |grep -p -i'IBM Air Mover' View detailed fan information
diag
errpt -aj plus error code
errpt -dh only view hardware errors
errclear 0 Clear log
Check the HMC address on the small machine:
1. First adjust to 02 and change N to M
2. Adjust to 30 again, select 3000 to view the HMC1 address, 3001 to view the HMC2 address
3. After finishing, adjust to 02, change M to N, and restore to 01 mode
The middle is the selection key, and the right is the switch key
If the hard disk is recognized, if there is no PVID, execute the following command
chdev -l hdiskn -a pv=yes
Create VG -s PP size 1024MB -t can add 2 PVs -y vg name -f force add hdisk hard disk name
mkvg -s 1024 -t 2 -y datavg -f hdisk1
Then activate the volume group
Clear pvid
chdev -l hdisk7 -a pv=clear
#rmdev -dl hdisk(x) delete, -d means completely remove from ODM library
After the hard disk is deleted, if you want to use it again, you need to use cfgmgr to re-identify or restart it, such as using the cfgmgr command to identify
#cfgmgr -v
Create LV command:
mklv -y softlv -t jfs2 rootvg 15G
mklv -y datalv -t jfs2 datavg 5G
Create a mount point:
mkdir soft
mkdir data01
Create file system command:
crfs -v jfs2 -d /dev/softlv -m /soft -A yes
crfs -v jfs2 -d /dev/datalv -m /data01 -A yes
Mount the file system:
mount /soft
mount /data01
AIX network card binding and aggregation specific steps
The configuration method (link aggregation or link redundancy) in which two network cards en0 and en1 in aix system share one IP address.
What you want to achieve: Bind two network cards into a virtual network card, when one network card fails or a switch stops, it will not cause network interruption.
Methods as below:
If the existing network card already has an IP address, first delete the network card configuration information:
#ifconfig en0 down
#ifconfig en0 detach
#rmdev -dl en0
#rmdev -dl et0
#rmdev -dl ent0
Do the above five steps to 1 again (that is, replace 0 with 1)
2. Re-identify the two network cards:
#cfgmgr -v
3. Network card binding:
#smitty etherchannel ->Add An EtherChannel / Link Aggregation, select ent0, press enter, select ent1 in the "Backup Adapter" position, press enter to execute.
The system will generate ent4 (because your system already has four network cards ent0~ent3)
4. Configure ip address and subnet mask for en4:
#smitty chinet
(If en4 is not in the selection list, please execute smitty inet->Add a Network Interface->Add a Standard Ethernet Network Interface)
5. If necessary, you can also perform step 5 to add a default route:
#smitty route ->Add a Static Route -> "DESTINATION Address" write 0, "Default GATEWAY Address" write the default gateway address, press Enter to execute.
Query missing package on 7100-04-04-1717
instfix -ciqk "71-04-041717_SP"|grep ":-:"
Query installed packages:
lslpp -l | grep -i java6
Check the OS version, and patch information
oslevel can return the main version and ML patch information
#oslevel -r
Query the current latest package:
oslevel -s
5200-06
Where 5200 is the main version number, 06 is the ML minor version number, you can use instfix to view detailed information
#instfix -i|grep ML
All filesets for 5.2.0.0_AIX_ML were found.
All filesets for 5200-01_AIX_ML were found.
All filesets for 5200-02_AIX_ML were found.
All filesets for 5200-03_AIX_ML were found.
All filesets for 5200-04_AIX_ML were found.
All filesets for 5200-05_AIX_ML were found.
All filesets for 5200-06_AIX_ML were found.
Above Aix 5.3, through the -s parameter, you can also view the more detailed sp version, such as:
#oslevel -s
5300-05-04
If you want to check which detailed patch is installed, you need to use the following format
#/usr/sbin/instfix -a -ivk IY59082
IY59082 Abstract: system hang with jfs2 and heavy load
IY59082 Symptom Text:
Heavily loaded system running JFS2 filesystems may hang.
(Or a single thread may hang on stuck I/O)
-------------------------------------------
Fileset bos.mp:5.2.0.41 is applied on the system.
Fileset bos.mp64:5.2.0.41 is applied on the system.
Fileset bos.up:5.2.0.41 is applied on the system.
All filesets for IY59082 were found.
If you want to check whether filesets are installed, you need to use the following command
#lslpp -l bos.adt.libm
Fileset Level State Description
-----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.adt.libm 5.2.0.50 COMMITTED Base Application Development
Math Library
1. Installation file set
#smit install_latest
Select the installation path, such as /dev/cd0
INPUT device / directory for software [/dev/cd0]
Press F4 or Esc 4 on the installed software option to open the software list, you can use "/" to find the file set you need to install. If you find bos.adt, then press F7 or Esc 7 to select the software to be installed:
> bos.adt ALL
5.2.0.50 Base Application Development Debuggers
5.2.0.40 Base Application Development Graphics Include Files
5.2.0.50 Base Application Development Libraries
5.2.0.50 Base Application Development Math Library
5.2.0.50 Base Application Development Toolkit
5.2.0.0 Base Application Development Toolkit Data
5.2.0.50 Base Application Development Utilities - lex and yacc
5.2.0.50 Base Operating System Samples
5.2.0.0 Printer Support Development Toolkit
5.2.0.0 SCCS Application Development Toolkit
5.2.0.50 System Calls Application Development Toolkit
5.2.0.40 Tool to Create installp Packages
Press Enter to confirm installation options
PREVIEW only? (install operation will NOT occur) no
COMMIT software updates? yes
SAVE replaced files? no
AUTOMATICALLY install requisite software? yes
EXTEND file systems if space needed? yes
OVERWRITE same or newer versions? no
VERIFY install and check file sizes? no
Include corresponding LANGUAGE filesets? yes
DETAILED output? no
Process multiple volumes? yes
ACCEPT new license agreements? no
Preview new LICENSE agreements? no
among them
PREVIEW only means preview installation, if you choose yes, you can test the installation first
COMMIT software updates means submit immediately. If yes is selected, SAVE replaced files is no.
ACCEPT new license agreements is generally selected as yes, which means that the license agreement is accepted.
After confirming, press Enter to start the installation.
2. Install the patch
#smit update_by_fix
Select the installation directory, such as
INPUT device / directory for software [/dev/cd0]
Open the installation list and select the patch to be installed, such as
IY35795 smitty causes an error of invalid length of strings in JA_JP
> IY35810 Enhanced concurrent extendvg with 3 or more nodes may fail
IY35817 pthread debug resource owner broken for 64-bit mode
Determine the installation options, whether to submit, whether to save the past version, etc., and then submit to perform the installation.
3. Install the patch set
First copy the patch set to a certain directory,
Such as /u01/5206update, and then execute
#smit update_all
Select the installation directory/u01/5206update
default
SOFTWARE to update [_update_all]
Choose not to submit, save the overwritten file, roll back the operation, accept the license agreement
COMMIT software updates? no
SAVE replaced files? yes
ACCEPT new license agreements? Yes
Then press Enter to execute the installation.
Note: If one installation has just ended, another installation may be affected, you can delete the .toc file in the current installation directory
After determining the failure disk:
1. Solution mirror
#unmirrorvg rootvg hdiskX
2. Clear the boot of hdiskX
#chpv -c hdiskX
3. Remove the faulty disk from xxvg
#reducevg rootvg hdiskX
4. Replace the hard disk
diag》》Hot Plug Task》》SCSI and SCSI RAID hot plug manager》》replace/remove a device attached to an SCSI hot Swap Enclosure drivce》》选hdiskX
5. Scanning
#cfgmgr -v
6. View
#lspv
7. Add the hard disk to xxvg
#extendvg xxvg hdiskX
8, do mirror
#mirrorvg -S xxvg (mirrorvg -c 3 rootvg hdisk* means to do the third mirror)
9. Check
#lsvg -l xxvg
#lsvg xxvg (View the change of stale pp number)
10. After synchronization is completed (boot record is established)
bosboot -ad hdisk??(rootvg)
11. Add hdiskX to boot
#bootlist -m normal hdiskX hdiskX
12. Check whether the join is successful
#bootlist -m normal -o
13. Install the software
-d directory -Y is to accept the license -p pre-install
installp -d ./ -agY openssh.base
or
smitty installp
View the installed files:
lslpp -l | grep ssh
View service:
l***c -a | grep ssh
Start the ssh service:
startsrc -s sshd
Stop the ssh service:
stopsrc -s sshd