AIX Generalities
id : xvrxcaxu5p
category : computer
blog : unixlinux
created : 07/30/10 - 09:06:34

Change AIX hostname
# chdev -l inet0 -a hostname=<new_hostname>

TCP/IP configuration
# smit tcpip

or
# smit mktcpip

or
# mktcpip -h <hostname> -a <address> -i <interface> -m <subnet_mask> -g <gateway> -s 

Fibre Channel
  • Get WWN :
# lscfg -vpl <fcs_device> | grep 'Network Address'

  • Get fibre channe device attribute :
# lsattr -El <fcs_device>

  • Change init_link to point to point :
# chdev -l fcs<X> -a init_link=pt2pt -P
# cfgmgr -vl fcs<X>


Know if network cable is plugged
# entstat <device>

Get Mac Adress
  • If interface is not configured and you wanty to get mac adress use entstat command :
# entstat -d <interface>

mksysb
  • Create a local mksysb
# mksysb -i <path_to_save_mksysb>

  • Edit /etc/exclude.rootvg to exclude files or directories from mksysb.
vi /etc/exclude.rootvg
/tempo
/test
/tools/list/toto
...

Remove device and its children
# rmdev -dl <device> -R

Get Mac address
# netstat -ia
# netstat -i

Route table
# netstat -r

dlnkmgr
  • On hitachi san use this command to view paths :
# /usr/DynamicLinkManager/bin/dlnkmgr view -path

CPUID
  • Use uname command to get CPUID
# uname -m 
XXYYYYMMSS

    • XX : Feature of operation system. Always 00
    • YYYYYY : CPU ID. Value stored in ROM on processor board
    • MM : Model number. Set to 7th & 8th digits returned by lscfg -v command.
    • SS : Submodel number. Always 00.
List all adapters
# lsdev -Cc adapter

Set dyntrk and fc_err_recov to an fscsi
# chdev -l fscsi<X> -a dyntrk=yes -a fc_err_recov=fast_fail

  • Add -P for permanent
# chdev -l fscsi<X> -a dyntrk=yes -a fc_err_recov=fast_fail -P

HDLM setup for hitachi
# dlnkmgr set -lb on -lbtype exrr
# dlnkmgr set -pchk on -intvl 10
# dlnkmgr set -afb on -intvl 10

List file descriptors use by a process
# procfiles <pid>

Paths
  • List paths :
# lspath

  • Disable a path :
# chpath -s disable -l  hdisk<X>  -p fscsi<Y>

  • Enable a path :
# chpath -s enable -l  hdisk<X>  -p fscsi<Y>

Paging space
  • List paging space :
# lsps -a

  • Extend paging space :
# chps -s '<number_of_pp>' <paging_space_device>

64 or 32
  • Is your AIX 32 or 64 bits :
# bootinfo -K

Check duplicate route
  • Display routes :
# lsattr -El inet0 -a route
route net,-hopcount,0,,0,10.242.91.254 Route True
route net,,0,10.242.91.254             Route True

  • Delete route :
# chdev -l inet0 -a delroute="net,,0,10.242.91.254"

  • Delete default route :
# route delete default

  • Create default route :
route add default <gateway>

  • Create route to a specific network :
# route add -net <network> <gateway>

  • Delete route to a specific network :
# route delete <network> <gateway>

RAM
  • Total ram size :
#bootinfo -r