Contents
-
How to
- hardware info
- How do I get a detailed configuration of my system
- How to change the service IP in HACMP
- HMC
- Install the product from an InstallAnywhere package, in an interactive way
- software install&upgrade
- Which paths do I need to set to use a specific Java release on my system?
- How do I extract tar or tar.gz files?
- Show disk info
- Show devices
- AIX change timezone
- Set Asynchronous I/0
- Set Operating System
- Set network
- Set swap
- Mount cdrom
- System info
- System issues
- Networking
- Filesystem
- System monitoring
- Performance issues
- Browsing errlog with errpt
- Security issues
- Miscellaneous
- Useful HACMP commands
- Oracle install
- Software
- swap usage
- Steps To Create A File System
How to
http://www.unixmantra.com/2013/12/practical-guide-to-aix-volume-group-management.html#part1
hardware info
uname -M prtconf lspv lspv hdisk2
How do I get a detailed configuration of my system
lscfg
How to change the service IP in HACMP
https://aixtechblog.wordpress.com/2016/09/19/how-to-change-an-hacmp-service-ip-address/
http://www.tuxowy.com/aix/43-how-to-change-the-service-ip-in-hacmp
HMC
只要HMC服务器网卡IP段与HMC接口相同网段相同,能正常通信就可以管理服务器了。POWER5 的HMC接口默认的IP192.168.2.147和192.168.3.147;POWER6以上默认的IP地址是169.254.2.147和169.254.3.147.每台服务器都是这个默认地址肯定会冲突,我们可以通过网线连接到每个服务器手动更改自己需要的IP网段。HMC服务器两个业务IP不要设置同一个网段
Log in to the HMC using the following default user ID and password
ID: hscroot Password: abc123
Power on a system by using an HMC
To power on a managed system, complete the following steps: In the navigation area, expand the Systems Management icon. Expand the Servers icon. Select the check box next to the name of the desired server. The tasks available for that server will be enabled. From the Tasks menu, choose Operations -> Power on. Follow any additional on-screen instructions.
Power off a system by using an HMC
Attention If possible, shut down the running logical partitions on the managed system before powering off the managed system. Powering off the managed system without shutting down the logical partitions first causes the logical partitions to shut down abnormally and can cause data loss.
In the navigation area, expand the Systems Management icon. Expand the Servers icon. Select the check box next to the name of the desired server. A selection of tasks available for that server will be displayed. From the Tasks menu, select Operations > Power off. Follow any additional on-screen instructions. Continue with Remove the power cords.
P550 面板操作查看HMC 网口IP地址
默认为: 进入控制面板上的功能30, 就能读出HMC端口的IP地址。 具体步骤如下: a. 为服务器接通电源,直到控制面板上的显示不再变化,且电源指示灯缓慢闪烁。 b. 使用控制面板的 <↑> 或 <↓> 按钮选择功能2 . 按< → > 按钮 进入功能2,按<→> , 选中N(Normal), 使用<↑> 或 <↓> 按钮将 N 改成 M(Manual)按2次<→> 退出 功能2. b. 使用<↑> 或 <↓> 按钮选择功能30, 按 < → > 按钮进入。控制面板显示 30** c. 使用<↑> 或 <↓> 按钮,使面板显示3000 或 3001,然后按 < → > ,就能控制面板上读出所对应HMC端口的IP 地址了。 如: SP_A:_ETH0:_ _ _T5 9.5.105.243_ _ _ _ _ _ HMC0端口的IP地址是 9.5.105.243. d. 检查完成后,使用控制面板的 <↑> 或 <↓> 按钮选择功能2 . 按< → > 按钮 进入功能2,按<→> , 选中N, 使用<↑> 或 <↓> 按钮将 M 改成 N 然后按2次<→> 退出 功能2 e. 选择功能1 ,进入正常的操作模式。 二、P550 –HMC 网口 ip 设置 默认IP : eth0:169.254.2.147 eth1:169.254.3.147 通过 hmc eth0 口 https://169.254.2.147 登陆ASMI 默认用户名 admin 默认密码: admin network-configure 重新设置 eth0 的ip 三、把p550 的HMC eth0接上HMC交换机。 在 HMC 服务器中,server 列表任意一个 server 后面的点击,打开菜单选择添加 manage server。
Install the product from an InstallAnywhere package, in an interactive way
1. Download the installation package file to a temporary directory. 2. Change to the temporary directory. 3. Start the installation process by typing ./package.bin at a shell prompt, where package is the name of the package that you are installing. 4. To read the installation instructions in another language, select a language from the list that is shown in the installer window, then click Next. The list of available languages is based on the locale setting for your system. 5. Read the license agreement. To proceed with the installation, you must accept the terms of the license agreement. To accept the terms, read to the end of the license text by using the scroll bar. Select the radio button, then click OK. 6. You are asked to choose the target directory for the installation. If you do not want to install into the default directory, click Choose to select an alternative directory, by using the browser window. When you have chosen the installation directory, click Next to continue. 7. You are asked to review the choices that you made. To change your selection, click Previous. If your choices are correct, click Install to proceed with installation. 8. When the installation process is complete, click Done to finish.
software install&upgrade
lslpp -l | grep Java
java -fullversion
{{{
7 64-bit: /usr/java7_64
OR:
6 64-bit: /usr/java6_64
{{{
Run "smitty install"
Select "Install and Update Software"
Select "Install Software"
Specify directory containing the images
Which paths do I need to set to use a specific Java release on my system?
- 8 64-bit PATH=/usr/java8_64/jre/bin:/usr/java8_64/bin:$PATH
- 7 64-bit PATH=/usr/java7_64/jre/bin:/usr/java7_64/bin:$PATH
- 6 64-bit PATH=/usr/java6_64/jre/bin:/usr/java6_64/bin:$PATH
How do I extract tar or tar.gz files?
Base images are compressed as tar or tar.gz files and must be extracted before they are installed.
If you have the gunzip utility, download the tar.gz file and run the command gunzip -c packagename.tar.gz | tar -xvf.
For example: gunzip -c Java14.sdk.tar.gz | tar -xvf.
To extract the tar file, run the command tar -xvf packagename.tar.
For example: tar -xvf Java14.sdk.tar.
Show disk info
# chgmgr -v # lsdev -Cc disk synclvodm -vP svg3 synchronizes ODM and the disk VG info. redefinevg svg3 Redfined VG definition in ODM lqueryvg -p hdisk0 –Avt -reads logical volumes info from disk bootinfo -s hdiskx Shows Megabytes available even if no volume group is assigned. lspv -p hdiskx (PP's used, location on disk, mount point) lscfg -vp -l hdiskx (all information about a disk/raid)
Show devices
lsattr -El en0 displays en0 driver params lsattr -El ent0 displays ent0 HW params lsattr -El rmt0 displays tape params lscfg -vp -l rmt0 (all information about a tape drive) lsattr -El sys0 displays system type, firmware, etc driver params lscfg –v lists all system HW config (NVRAM) lsdev –Csscsi list all scsi devices lsdev –Cspci list all pci devices lsparent –Ck scsi list all scsi adapters lsdevfc list fiberchannel devices cfgmgr Configures devices lsdev -Ccdisk Shows all disks lsdev -Cctape Shows all tapes cfgmgr -v -l device –v Specifies verbose output. The cfgmgr command writes information about what it is doing to standard output. cfgmgr -v -l device Name Specifies the named device to configure along with its children. If you only turned on a disk tower at e.g. scsi2 cfgmgr -v -l scsi2 will only configure this with detailed output. lsdisp To check which graphic adapter is installed. lscfg -vp -l mga0 (all information about a adapter) lscfg -vp -l hdisk0 | grep Machine gives info about the disk manufacture type lsslot -c pci For 6F1 only !!!! Lists all slots ,voltage,boards,etc !!!! bootlist -m normal cd0 rmt0 hdisk0 Changes the default bootlist lsmcode -c display the system firmware level and service processor lsmcode -r -d scraid0 display the adapter microcode levels for a RAID adapter scraid0 lsmcode -A display the microcode level for all supported devices
AIX change timezone
# smit chtz
Set Asynchronous I/0
# smit chgaio maximum number of REQUESTS >= 8192
Set Operating System
- # smit chgsys
maximum number of PROCESSES allowed per user ...
Set network
- # smit mktcpip
Set swap
- # smit chps
Mount cdrom
# mount -v cdrfs -p -r /dev/cd0 /cdrom # cp /cdrom/ NAVIAGENT.lpp /usr/sys/inst.images # smitty install
System info
/usr/bin/uname -m Get machine ID /usr/bin/uname -M Get platform type oslevel Displays current AIX level oslevel -r Displays current AIX maintenance level oslevel -g List filesets at levels later than maintenance level !!! # oslevel -s 6100-06-05-1115 lsps -a Paging space settings. lscfg -vp -l proc0 (1,2,3) (all information about a processor[s]) lscfg -vp -l mem0 |pg (all information about memory modules installed) env ulimit Environment setings - show user ulimit bootinfo –s hdisk0 Displays disk size lsattr -El sys0 -a systemid Determines the system serial number lscfg –vp|grep ROM|grep -v CD Determines the system Firmware level
System issues
TERM=vt100 -If you execute a command/application and it responds with msg ‘ The type of your terminal is unknown to the system’,run those commands (In ‘ksh’) set term=vt100 -Same (In tcsh’) rcp -rp /dataVolumes/brisque1.1.0/jobs/flower.job sciroot@ripro3:/dataVolumes/ripro3.3.0/jobs/ -Copying a file from one Unix machine (Brisque) to another (Server) the assumption is that both machines know each other’s names (in hosts file) dd if=/dev/fd0 of=/temp/diskimage bs=4096 -Duplicate a diskette copy from diskette to hard drive dd if=/temp/diskimage of=/dev/fd0 bs=4096 -copy diskette image onto diskette /usr/lpp/X11/bin/xset -display unix 0 s off -Kill display timeout lsfs -v jfs -List of Filesystem items. lsfs -q -v jfs -you can see also the parameter of a filesystem and thus see if e.g. /backup was or is a big_filesystem_enabled one. Important for the 2GB File limit. lsuser –f root Shows all user parameters (max .file size,etc) sysdumpdev -L Check last system dump status sysdumpdev -l Check system dump device settings lslpp -f Upd_Timna_DTM.obj List contents of the package
Networking
ksh
for ENT in ` lsdev –Cs pci|grep ent | awk '{ print $1 }'|cut –c 1,2,4 `;do
mktcpip –S $ENT
done
exit -Shows all interfaces IP config+mask+router+DNS !
host timna1 displays station default IP address – works ONLY in DNS environment
ifconfig en0 displays en0 driver params
netstat -i displays network interfaces setting
mktcpip -S en0 #host:addr:mask:_rawname:nameserv:domain:gateway:type:start
syslab18:192.9.100.1:255.255.255.0:en0:10.4.2.12:csil.creoscitex.com:10.4.30.1:N/A:no
GREAT TCPIP info in one command !!!
showmount –e displays all exported volumes
showmount -a show who's got my filesystemsses mounted over IP !
lssrc –g tcpip displays all IP oriented processes status
entstat -drt ent0 |grep –i error display any communication errors on etn0
entstat -r Resets all the statistics back to their initial values.
arp -a shows a local arp cache
cd /usr/local/es/;res restarts appletalk
netstat -ptcp shows IP statistics
netstat -pudp shows UDP statistics
netstat -c
-s
-m client only;
server only
NFS mount
netstat -I en0 10 Trace en0 every 10 seconds
netstat -rn Display routing info with IP address (10.4.27.182)
netstat -in Shows the state of all configured interfaces
netstat -r Display routing info with full hostnames (timna2.csil.creoscitex)
nfsstat –z ;to reset NFS stats without reboot
cat /etc/resolv.conf Check DNS settings
stopsrc –g NFS To stop NFS services on a client
startsrc –g NFS To start NFS services on a client
traceroute 149.115.39.1 Trace all hobs (interconnections=routers) to the destination IP
netpmon -o netpmon.out
trcstop Traces all network processes activity into a logfile. Must be preceede by a trcstop command !
nslookup hostname Shows the DNS server name and address
ping -R -c 1 bnc2 Ping with displaying the routing info
namerslv -s | grep domain | awk '{ print $2 }' Displays a fully qualified domain name of a host
rup Shows the status of a remote host on the local network
nmonnfs Traces all NFS processes activity
mount hostname:/filesystem /mount-point Mount an NFS filesystem
mknfsexp -d /directory Creates an NFS export directory
mknfsmnt Creates an NFS mount directory
rmnfs Stops and un-configures NFS services
mknfs Configures and starts NFS services
exportfs -u (filesystem) Un-exports a filesystem
exportfs Lists all exported filesystems
exportfs -a Exports all fs's in /etc/exports file
Filesystem
chfs -a size=+200000 /var increases /var FS by 100MB du -sk /john shows directory used space in kb !!!! mount all mounts all FS umount /dataVolumes/rtest9.1.0 unmounts a FS fuser -k /dev/cd0 Releases a CD that will not unmount ! fuser -c /dataVolumes/rtest9.1.0 -Find out which process_id lock the FS istat <filename> Shows when the file was last created/modified/accessed !!!!
System monitoring
istat <filename> Shows create/modify/access file info alog -o -t boot | more displays system boot log w Lists login users and their programs. who Identifies the users currently logged in /usr/local/es/swho Identifies the Ethershare users currently logged in last |more shows last logins last –20 Shows recent 20 lines last root Shows username ‘root’ login/logout record last ftp Shows all FTP session in the record mount shows all mounted filesystems (nfs+local) ps -ef show all running processes ps -ef |grep Scitex show all scitex running processes du -ak /scitex|sort -n -r|head –10 -Display 10 biggest directories on the volume by size find /scitex -xdev -size +2048 -ls|sort -rn +6|head –10 -to find 10 top files in the root (/) directory larger than 1 MB.”-xdev” helps searching ONLY in “/” !!!!!!!!! history Last commands run on the system by this user alog -ot boot Lists a log of all boot operations grep TX /etc/environment Verify daylight settings
Performance issues
nmon a nice monitor - runs only on AIX5 and up topas a nice monitor - runs only on AIX 4.3.3 and up monitor -top 10 -s 2 monitors system 10 top processes with 2 seconds iostat 2 displays disks activity every 2 seconds refresh interval iostat –a 2 AIX5 ONLY !!!! displays disks and ADAPTER !!!! activity every 2 seconds refresh interval vmstat 2 ;monitors virtual memory statistics every 2 seconds (see appendix A) sar –P ALL 2 2 Show all CPU’s activity on an SMP machine svmon –i 2 Monitors real and virtual memory svmon -G Monitors real and virtual memory ps auxw | sort –r +3 |head –10 -Shows top 10 memory usage by process ps auxw | sort –r +2 |head –10 -Shows top 10 CPU usage by process ps –auw | grep defunct Shows zombies processes (to kill – reboot or kill the parent) filemon –O all –o filemon.out ; find / -name core ; trcstop Traces FS,LV,disks,files activityof a “find” command into a logfile (filemon.out). Must be preceded by a trcstop command. tprof –x find / -name core ; trcstop Traces CPU activityof a “find” command Severall logfile are created. Must be preceded by a trcstop command. tprof -ske -x "sleep 30" -Trace CPU activity for next 30 seconds.Results in file sleep.tprof lvmstat –ev svg1 lvmstat –v svg1 2 AIX5 ONLY !!!! enable gathering the VG statistics Display VG logical volumes statistics every 2 seconds
Browsing errlog with errpt
errpt -a -s 0604090601 -e 0605090901 browse the errlog in detail for all errors within a timeframe errpt -a -N SYSPROC |more errpt -a -N SYSPROC > /tmp/err.log Browse the errlog for the SYSPROC resource, can be into the file errpt -j 5DFED6F1 -Browse the errlog by the identifier errpt –A -AIX5 ONLY !!!! Shows less detailes then errpt -a errpt –D -AIX5 ONLY !!!! eliminates double entries
Security issues
chmod -s Filename Remove Sticky Bit to a file or directory chmod +r+w+x+t Filename Add Read+Write+Execute+Temp mode to a file or directory. This is a ‘blanket’ change for all owner, user & group. Numeric Access Modes 0 (---) - no access 1 (--x) - execute permissions; search permissions for directories 2 (-w-) - write access 3 (-wx) - execute/search permission and write access 4 (r--) - read access 5 (r-x) - execute/search permission and read access 6 (rw-) - read and write access 7 (rwx) - execute/search permission and read and write access mkpasswd -f rebuild the /etc/passwd indexes in case of suspected corruption
Miscellaneous
ksh find / -type f|xargs grep "10.4.27.181" 2> /dev/null -Find all files containing my IP address compress -c file > file.Z Compresses the files while keeps the original whereis <command-ame> Returms full path of program
Useful HACMP commands
clstat - show cluster state and substate; needs clinfo.
cldump - SNMP-based tool to show cluster state.
cldisp - similar to cldump, perl script to show cluster state.
cltopinfo - list the local view of the cluster topology.
clshowsrv -a - list the local view of the cluster subsystems.
clfindres (-s) - locate the resource groups and display status.
clRGinfo -v - locate the resource groups and display status.
clcycle - rotate some of the log files.
cl_ping - a cluster ping program with more arguments.
clrsh - cluster rsh program that take cluster node names as argument.
clgetactivenodes - which nodes are active?
get_local_nodename - what is the name of the local node?
clconfig - check the HACMP ODM.
clRGmove - online/offline or move resource groups.
cldare - sync/fix the cluster.
cllsgrp - list the resource groups.
clsnapshotinfo - create a large snapshot of the HACMP configuration.
cllscf - list the network configuration of an HACMP cluster.
clshowres - show the resource group configuration.
cllsif - show network interface information.
cllsres - show short resource group information.
lssrc -ls clstrmgrES - list the cluster manager state.
lssrc -ls topsvcs - show heartbeat information.
cllsnode - list a node centric overview of the hacmp configuration.http://www.aixhealthcheck.com/blog?topic=17
http://www.unixwerk.eu/aix/cluster-cmd.html
Oracle install
export DISPLAY="localhost:0"
Software
To see the details of installed file sets:
#lslpp -l
To list the installation history of all file set in bos.net packages:
#lslpp -ha bos.net.*
To list the files in the bos.rte package:
#lslpp -f bos.rte
To list the file set which contain /etc/hosts file:
#lslpp -w /etc/hosts
To list the pre requisites for bos.net.nfs.server file set:
#lslpp -p bos.net.nfs.server
To list the installable products on the device rmt0:
#installp -L -d /dev/rmt0.1
To install all filesets within bos.net and expands file system if it requires:
#installp -aX -d /dev/rmt0.1 bos.net
To remove bos.net:
#installp -u bos.net
To reject the applied software:
#installp -r
To commit the <package>:
#installp -c -f <package>
To cleanup an incomplete installation:
#installp -C
To check the <package>:
#lppchk -c <package> Verifies that the / (root), /usr and /usr/share parts of the system are valid with each other: #lppchk -v
To install the file set associated with fix IX9999 from rmt0:
#instfix -k IX9999 -d /dev/rmt0.1
To verify fix IY6969 installed:
#instfix -ik IY6969
How to display missing filesets from service pack:
#instfix -icqv | grep ':-:'
To verify if you have all packages installed for the current ML and why after upgrade you cannot see the newer version:
# instfix -i |grep ML
All filesets for 6100-00_AIX_ML were found.
All filesets for 6100-01_AIX_ML were found.
swap usage
svmon -Pt10 | perl -e 'while(<>){print if($.==2||$&&&!$s++);$.=0 if(/^-+$/)}'
#I need to see the following output:
vmo -a
vmstat 1 10
lsps -a
lsps -s
svmon -G
Steps To Create A File System
Once a PV is available in the system, admin can list down the PVs by running the following command
lspv
To Create a VG from a PV with Default Name, command used is:
smit mkvg
OR
mkvg -y backupvg -S hdisk5
Then create LV
smit mklv or Code: mklv -y backup_lv -t jfs2 backupvg number_of_pp_you_want_to_give_this_LV
Then create FS on already existing jfs2 LV
Code:
smit crfs or Code: crfs -v jfs2 -m /dev/your_mount_point -a logname=INLINE -d backup_lv
mount your newly created FS
mount your_mount_point
ncbackup
