AIX COMMAND REFRENCES

download AIX COMMAND REFRENCES

of 25

Transcript of AIX COMMAND REFRENCES

  • 7/30/2019 AIX COMMAND REFRENCES

    1/25

    VG COMMANDS

    lsvg Display all VGslsvg -o Display all active VGslsvg rootvg Display info about rootvglsvg -l rootvg Display info about all LVs in rootvg

    lsvg -o |lsvg -il Display info about all LVs in all VGslsvg -p rootvg Display info about all PVs in rootvgmkvg -s 8 hdisk1 Create VG with name vgxx on hdisk1 with partition size 8MBmkvg -s 8 -y sivg hdisk1 Create VG with name sivg on hdisk1 with partition size 8MBmkvg -s 4 -t 2 -y sivg hdisk1 Create sivg on hdisk1 with PP size 4 and no of partions 2 * 1016chvg -a y newvg To cuase VG newvg automatically activated at startupchvg -a n newvg To deactivate the automatic activation at startupchvg -t 2 newvg To change maximum no. of PP to 2032 on vg newvgchvg -Q n newvg To disable quorum on VG newvgreorgvg newvg Reorganises PP allocation of VG newvgextendvg newvg hdisk3 hdisk4 Add PV hdisk3 and hdisk4 to VG newvgexportvg newvg Exports the VG newvgimportvg -V 44 -y newvg hdisk2 Import the hdisk2 with name newvg, and assign major number 44redcucevg newvg hdisk3 Remove PV hdisk3 from VG newvg

    varyoffvg newvg To deactviate VG newvgvaryonvg newvg To activate VG newvgsyncvg -v sivg To sync the mirrored LV in the VG sivgmirrorvg -S -m sivg hdisk2 To mirror LVs of sivg with hdisk2 (-m for exact mirror, -S

    forbackground mirror)unmirrorvg sivg hdisk2 To remove the mirrored PV from the set.

    FS COMMANDS

    lsfs Lists all filesystems in the /etc/filesystems entrylsfs -q List all filesystems with detailed infolsfs -a To list all filesystems (default)lsfs -l Specify the output in list format

    lsfs -c Specify the output in column formatlsfs -v jfs Lists all jfs filesystemschfs -a size=24576 /si Change size of FS /si to 24576 x 512 bytes blocks (12 MB)chfs -a size=+24576 /si Add 24576 x 512 byte blocks to FS /sichfs -asize=-500M /file/system you can also decrease sizechfs -m /si /bi Change the mount point from /si to /bichfs -A /si To auto mount the filesystem sichfs -d account /si Remove account attribute of /si. ( from /etc/filesystems file)chfs -a splitcopy=/backup -a copy=2 /oracle This will mount the 2nd copy of mirrored filesystem oracle to

    /backup in read-only modecrfs -v jfs -g testvg -a size=64465 -m /siju Creates FS /siju of type jfs in VG testvg of blocksize 64465crfs -v jfs -d /dev/lv00 -m /siju Create FS /siju of type jfs on device /dev/lv00rmfs /siju Deletes FS /siju and associated LVrmfs -r /siju Deletes FS /siju its mount point and associated LV

    defragfs /sifs To defragment the file system /sifsdefragfs -q /sifs Display the current defrag status of the file systemfsck -y n /dev/lv00 To fsck the filesystem associated to /dev/lv00 assuming response "yes"fsck -p /dev/lv00 To restore superblock from backup superblock

    PV COMMANDS

    lspv hdisk0 Display status and characteristics of the PVlspv -p hdisk0 Display PP usage of hdisk0

  • 7/30/2019 AIX COMMAND REFRENCES

    2/25

    lspv -l hdisk0 To list all logical volumes on PV hdisk0chpv -v r hdisk1 Close the PV (Used while removing PV without varyon)chpv -v a hdisk1 Open the PVchpv -c hdisk0 Clear the master boot record on PV hdisk0migratepv hdisk1 hdisk2 To move PPs from PV hdisk1 to hdisk2migratepv -l silv hdisk1 hdisk2 To migrate LV silv from PV hdisk1 to hdisk2

    LV COMMANDS

    lslv -l lv00 Display info about LV by PVlslv -p hdisk1 Display LV allocation map for hdisk1chlv -t copy lv00 To change the lv00 to copy typechlv n silv lv00 To rename lv00 to silvchlv -x 950 ora1data_lv To change the ora1data_lv to chlv -p r lv00 To change the lv00 to readonly modermlv silv To remove silvrmlv -f silv To remove silv without user intervention

    mklv -s n -c 3 silv hdisk1 To make LV silv with three copies on hdisk1extendlv silv 5 To extend the LV silv with 5 LPsmklvcopy -s n lvsi 2 hdisk1 To mirror LV lvsi on same PV with 2 copiesmklvcopy lvsi 3 hdisk1 hdisk2 To mirror LV lvsi on PV hdisk1 and hdisk2 with 3 copiesrmlvcopy lvsi 2 hdisk1 Will remove one copy of LV lsvi from hdisk1mklv -t jfslog -y log00 newvg 2 To create a jfslog with name log00 on VG newvg with 2LPslogform /dev/log00 To format jfslog volume log00mklv/extendlv -a = PP alocation policy-am = middle -ac = center -ae = edge-aie = inner edge -aim = inner middlemigratepv -l (lv) (old pv) (new pv)Move a logical volume between physical volumes. Both physical volumesmust be in the same volume group !mklv -y (lv) -t jfslog (vg) (No of PP's) (pv Name optional)Creates a JFSlog logical volume.logform (/dev/lv) Initialises an LV for use as an JFSloggetlvcb -AT (lv) Displays Logical Volume Control Block information

    BLV COMMANDS

    bootlist -m normal -o To see the boot sequence in normal modebootlist -m service -o To see the boot sequence in service modebootlist -m normal cd0 hdisk0 To change boot sequence to cd0,hdisk0 in normal modebootlist -m service cd0 rmt0 hdisk0 To change boot sequence to cd0,rmt0,hdisk0 in service modebosboot -ad /dev/hdisk1 To create boot image on PV hdisk1mkboot -cd /dev/hdisk1 To clear the boot imagebootinfo -b Specifies the bootable diskbootinfo - t Specifies the type of bootbootinfo -e Check the machine can boot from tapebootinfo -T To see the machine hardware typebootinfo -s hdisk0 To see the size of hdisk0bootinfo -r To see the size of memorybootinfo k To see the key positionbootinfo m To see the machine model codebootinfo o hdisk0 To list the location code of hdisk0bootinfo z To see the machine is multiprocessor capable

  • 7/30/2019 AIX COMMAND REFRENCES

    3/25

    bootinfo p To see the machinebosboot -a -d (/dev/pv) Creates a complete boot image on a physical volume.mkboot -c -d (/dev/pv) Zero's out the boot records on the physical volume.savebase -d (/dev/pv) Saves customised ODM info onto the boot device.

    PAGE SPACE COMMANDS

    lsps -a To list out all paging spaceslsps hd6 To display the details of the paging space hd6chps -a y paging00 To turn on the paging space paging00chps -a n paging00 To turn off the paging space paging00chps -s4 paging00 To increase the size of the paging space in 4 LP blocksmkps -a -n -s4 sivg To create a paging space on VG sivg of 4 LP size (-s4) and activate it

    immediately (-n) and activate it at every restartsrmps paging00 To remove the paging space paging00swapon -a To invoke all entries in /etc/swapspaces fileswapon /dev/paging00 To make available swap space paging00

    SYSTEM DUMP COMMANDSsysdumpdev -l To list the current dump destinationsysdumpdev -L List the details of the previous dumpsysdumpstart -p Starts dump in the primary dump devicesysdumpstart -s Starts dump in the secondary dump devicesysdumpdev -p /dev/lv00 To make lv00 as primary dump devicesysdumpdev -P -p /dev/lv00 To make lv00 as primary dump device permanentlysysdumpdev -s /dev/rmt0 To make rmt0 as secondary dump devicesysdumpdev -z To determine a new system dump occurred

    SYSTEM DUMP--------------------------------------------------------------------------------

    sysdumpdev -e Estimates dumpsize of the current system in bytes.(MCA machine can also dump if key is in service position and the resetbutton is pressed)sysdumpdev -p (dump device) -P Sets the default dump device, permanentlyAnalyse dump file :-echo "stat\n status\n t -m" | crash /var/adm/ras/vmcore.0

    Device related commands

    cfgmgr To configure devices and installs device software in system

    cfgmgr -l vscsi0 To configure the components connected to the vscsi0 interfacelscfg To display config, diagnostics and vital product definition infolscfg -l mem0 Display info about device mem0lscfg -l ent* Display info about all Ethernet cardslscfg -v Display vpdlscfg -v -l hdisk0 Display vpd of hdisk0mkdev -l rmt0 To change device rmt0 from defined state to available statelsdev -P To lists all supported deviceslsdev -P -c disk To list all supported diskslscfg -vp|grep -ip cabinet To list all cabinets

  • 7/30/2019 AIX COMMAND REFRENCES

    4/25

    lsdev -P -r class To display supported classlsdev -P -r subclass To display all sub classlsdev -C To lists all configured deviceslsdev -C -l mem0 To display the properties of mem0chdev -l sys0 -a maxproc=100 To change default maxproc value to 100chdev -l rmt0 -a blocksize=512 To change the block size to 512chdev -l rmt0 -a ret=no To avoid tape retension

    rmdev -l rmt0 To remove the device rmt0rmdev -d -l rmt0 To remove the device totally from databasermdev -l rmt0 -S To change the state of the device stoppedlsparent -C -k rs232 To display possible parent devices which accept rs232 deviceslsparent -C -l hdisk0 To display parent devices which accept child device hdisk0lsattr -Dl rmt0 To see the default values of the device rmt0lsattr -El rmt0 To see the current values of the device rmt0lsattr -El tty0 -a login -R To see all possible values of the login attribute of tty0

    lsattr -R -l ent0 -a media_speedlsconn -p scsi0 To list all possible connection scsi0 can acceptlvlstmajor To list the available major numbersmknod /dev/null c 2 2 Create null device with major (2) and minor (2) nos. (c - char device)lsattr -E -l sys0 -a maxuproc

    Console emulation commands

    lscons To list the current consolelscons -b To list the console at next bootchcons /dev/tty3 To change the console to tty3chcons -a login=enable /dev/tty3 Redirect console to tty3 and provide login promptswcons /dev/tty3 To change system console to tty3 temporarilyalog -L t console To see the current attributes of log type consolealog t console o To see the console messagesalog t boot o To see the boot time messages

    Installation specific commandslslpp -l To see the details of installed file setslslpp -ha bos.net.* To list the installation history of all file set in bos.net packageslslpp -f bos.rte To list the files in the bos.rte packagelslpp -w /etc/hosts To list the file set which contain /etc/hosts filelslpp -p bos.net.nfs.server To list the pre requisites for bos.net.nfs.server file setinstallp -L -d /dev/rmt0.1 To list the installable products on the device rmt0installp -aX -d /dev/rmt0.1 bos.net To install all filesets within bos.net and expands file system if itrequiresinstallp -u bos.net To remove bos.netinstallp -r To reject the applied softwareinstallp -c -f To commit the installp -C To cleanup an incomplete installationlppchk -c To check the instfix -k IX9999 -d /dev/rmt0.1 To install the file set associated with fix IX9999 from rmt0instfix -ik IX9999 To verify fix IX9999 installed

    Network related commands

    host 193.9.200.1 Resolves ip to host name (from /etc/hosts file)host ibm Resolve ibm to ip address (from /etc/hosts file)

  • 7/30/2019 AIX COMMAND REFRENCES

    5/25

    hostname ibm To change the host name to ibmentstat en0 To the status of ethernet device en0entstat -d en0 To list the detailed status of device en0no -a To list all net configurable attributes and their valuesno -d thewall To change thewall parameter to its default valueno -o ipforwarding=1 To make the machine as router in tcpip networkstraceroute ibm To trace the route to ibm

    ping ibm To tcp ping to the machine ibmifconfig -a To show the status of all network interfacesifconfig en0 To show the status of en0ifconfig en0 up Turns on network card en0ifconfig en0 down Turns off network card en0ifconfig en0 detach Removes en0 card from the network interface listifconfig en0 inet 194.35.52.1 netmask 255.255.255.0 up

    Configure en0 starts immediatelyifconfig en0 alias 195.60.60.1 Create alias ip address for en0route add 0 192.100.13.7 To make 192.100.13.7 as default gateway for entire networkroute add 192.100.12.0 192.100.13.7 To make 13.7 as gateway for 12.0 networkroute -f To clear the gateway tablechdev -l inet0 -a hostname=si To change the host name to si permanentlynetstat -a To show the state of all socketsnetstat -c To show the network buffers cachenetstat -D To show the net drops of packetsnetstat -i To display interface statisticsnetstat -r To show the routing tablenetstat -rn To show routing table (ip will be given instead of host names)netstat -s To show the statistics of the protocolsnetstat -s -p < tcp/udp/ipv6> To show the statistics of respective protocols

    Space usage commands

    du -k To list number of bytes in 1k blocksdu -l To list number of bytes in 512 bytes blocksdu -s To list only the total disk usage in the current directorydf -i To display no of free and used inodesdf -k To display diskspace in 1024 bytes formatpstat s Page space informationdumpfs shows superblock, i-node map and disk map information for the file

    system specified.Ex : dumpfs /dev/hd3|more/dev/hd3:

    magic 0x43218765 cpu type 0x0file system type 0 file system version 0file system size 196608 fragment size 4096block size 4096 allocation group size 2048 (frags)inodes/allocation grp 2048 compress 0file system name /tmp volume name /tmplog device 0xa0003 log serial number 0xb4file system state 1 read only 0last update Thu Sep 24 14:31:28 BST 1998

    lsfs Lists all filesystemslsfs -q (fs) Lists the file system detailsmount Lists all the mounted filesystemsmount (fs or lv) Mounts a named filesystem

  • 7/30/2019 AIX COMMAND REFRENCES

    6/25

    mount -a Mounts all filesystemsmount allmount -r -v cdrfs /dev/cd0 /cdrom mounts cd0 drive over /cdromcrfs -v jfs -d(lv) -m(mount point) -A yesWill create a file system on the whole of the logical volume, adds entry into/etc/filesystems and will create mount point directory if it does not exist.crfs -v jfs -g(vg) -m(mount point) -a size=(size of fs) -A yes

    Will create a logical volume on the volume group and create the file system onthe logical volume. All at the size stated. Will add entry into/etc/filesystems and will create the mount point directory if it does not exist.

    Backup commands

    mksysb -i -X /dev/rmt0 Creates image.data and system backup (-X expands /tmp if required)mksysb -m /dev/rmt0 Creates image.data file with map file and system backupmksysb -e /dev/rmt0 Creates system data but excludes the files listed in /etc/exclude.rootvgmkszfile Creates /image.data filemkcd -d /dev/cd1 Creates system boot backup to the CD-R device /dev/cd1mkcd -d /dev/cd1 -v vg00 Creates backup of vg vg00 to CD-R device /dev/cd1mkcd -d /dev/cd1 -G Creates generic boot backupsavevg -i -f /dev/rmt0 vg00 Creates vg00.data image file and backup vg vg00savevg -ef /dev/rmt0 vg00 Creates vg00 backup but excludes files listed in the/etc/exclude.vg00find / -print | backup -ivf /dev/rmt0 Backup entire system to rmt0backup -0vf /dev/rmt0 /home Backup /home directory to rmt0 with backup level 0restore -Tvf /dev/rmt0 List the archive in rmt0restore -xvf /dev/rmt0 /home Restore /home from archive in device rmt0find ./home -print |cpio -ocvumB > /dev/rmt0

    Archives /home directorycpio -icvdumB < /dev/rmt0 Restores cpio archive from rmt0cpio -ivt < /dev/rmt0 List the contents of cpio archive from rmt0

    cpio -icvd < /dev/rmt0 /home Restores /home directory from rmt0tar -cvf /dev/rmt0 /home Archives /home to rmt0 devicetar -tvf /dev/rmt0 List the archives in rmt0tar -xvf /dev/rmt0 /home Extract /home from rmt0dd if=si of=si1 conv=ebcdic Convert and copy ascii file si to ebcdic si1dd if=/dev/rmt0 ibs=512 obs=1024 of=/dev/rmt1

    To copy blocks from rmt0 with 512 blocks to rmt1 with 1024 blockstctl -f /dev/rmt0 rewind To rewind the tapetctl -f /dev/rmt0 offline To eject the tapetctl -f /dev/rmt0 status To show the status of tapechdev -l rmt0 -a block_size=512 To change the block size of the tape to 512

    Print commands

    qchk -q To display the default qqchk -P lp0 To display the status of the printer lp0qchk -# 123 To display the status of job number 123qchk -A To display the status of all queuesqcan -x 123 To cancel the print job 123qcan -X -P lp0 To cancel all jobs submitted to lp0qpri -#570 -a 25 To change the priority of the job to 25qhld # 569 To hold the job 569qhld -r -#569 To remove holding from 569

  • 7/30/2019 AIX COMMAND REFRENCES

    7/25

    qmov -m lpa -#11 To move the job 11 to queue lpaenable psq To enable queue psqdisable psq To disable queue psqcancel -#111 To cancel job 111lpstat To display the status all queueslpstat -p lp0 To display the status of print queue lp0lpstat -u root To display the jobs submitted by user root

    lpq -P lp0 To display the status of queue lp0

    last To list all the records in the /var/adm/wtmp filelast |grep shutdown To show the shutdown sessionsuptime (w -u ) To show how long the system has been up

    splp (device) Displays/changes printer driver settingssplp /dev/lp0export $LPDEST="pqname" Set default printer queue for login sessionlsvirprt Lists/changes virtual printer attributes.rmvirprt -q queuename -d queuedevice Removes a virtual printerqpri -#(job No) -a(new priority) Change a queue job priority.qhld -#(job No) Put a hold on holdqhld -r #(job No) Release a held job

    Licensing commands

    oslevel To list the operating system levellslicense To see the number of licensechlicense -u30 To change the fixed user license to 30chlicense -f on To enable floating user license

    User commands

    id To list all system identifications for current user id -gn To list the default group for current user id -Gn To list all system groups for current userlsuser root To list the attribute of user rootlsuser ALL To list the attributes of all userslsuser -a HOME ALL To list the home directory of all userslsuser -a ALL To list all usernameslsuser -a auth1 auth2 ALL To list the authentication method for all userslsuser -a expires ALL To list expiry datelsuser -a account_locked ALL To check account lock status of all userschsec -f /etc/security/user -a account_locked=false -s userchuser -a login=true san To enable the user sanchuser -a rlogin=true san Enable san to login remotelychuser maxexpired = -1 Passwor never expairs for user}

    mkuser si Creates user si with default values in/usr/lib/security/mkuser.defalaultmkuser su=false si Create user si without su facilityrmuser si To remove user sirmuser -p si To remove user si and his all attributeswho List users with tty nos and ip numberswho /var/adm/wtmp Lists history of login logout system startup and shutdownswho -r To list the run levelwho am i /who -m To list the current user mkgroup dcm To create the group dcm

  • 7/30/2019 AIX COMMAND REFRENCES

    8/25

    chgroup users=u1,u2,u3 dcm To add users u1 u2 and u3 to dcm grouprmgroup dcm To delete the group dcmchauthent To change the authentication methods

    Force a user to change their password on their next login:

    pwdadm -f ADMCHG username

    Note that this works with some sshd's and not others

    Subsystem Commandslssrc -a To list the status of all subsystemslssrc -h node1 -a To list the status of all subsystems on foreign host node1lssrc -s kadmind To list the status of the subsystem kadmindlssrc -g tcpip To get the status of the subsystem group tcpipmkssys To add a subsystemrmssys -s kerberos To remove the subsystem kerberoschssys -s kerb -s kad To rename the subsystem kerb to kadstartsrc -s kadmin To start the subsystem kadminstartsrc -g tcpip To start the subsystem group tcpipstopsrc -s kadmin To stop the subsystem kadmin

    stopsrc -g tcpip To stop the subsystem group tcpiprefresh -s nfsd To refresh nfsd subsystemrefresh -g tcpip To refresh tcpip subsystem group

    Scheduling commandscrontab -l To list the crontab entriescrontab -e To edit the crontab entriescrontab -l > /si To copies the entries of crontab to /si filecrontab -r To remove all crontab entriescrontab -v To list the submission time/var/adm/cron/cron.allow File containing users who allowed cron service

    /var/adm/cron/cron.deny File containing users denied cron serviceat -l To list the jobs scheduled via at commandat -r root.dfjdhjdh.21 To remove the scheduled job root.dfjdhjdh.21/var/adm/cron/at.allow File containing users who allowed at service/var/adm/cron/at.deny File containing users denied at servicebatch To run the command when the system load permitsatq joe To list all the jobs submitted by user joe

    ODM Commands

    odmget sm_menu_optTo get the objects from class sm_menu_opt

    odmget -q "id=licenses" sm_menu_optTo list objects that matches query id=licenses from object sm_menu_opt

    odmdelete -o sm_menu_opt -q "id=licenses"To delete the entries from class sm_menu_opt which agrees the query id=licenses

    odmshow sm_menu_optTo show the object class definition

    odmdrop -o sm_menu_optTo drop sm_menu_opt object class

    odmchange -o sm_menu_opt -q "id=licenses" file1To change the attributes from file1

  • 7/30/2019 AIX COMMAND REFRENCES

    9/25

    errpt To display complete summary of reporterrpt -a To list complete detailed reporterrpt -d H To list all hardware related errorserrpt -d S To list all software related errors

    errpt -a -j 34564423 To list detailed error report of error id 34564423chitab tty002:23:respawn:/usr/sbin/getty /dev/tty

    To enter the entry tty002:23:respawn:/usr/sbin/getty /dev/tty in inittablssrc -g portmap To start tcpip

    Daemons of NIS

    Server Slave Server Client

    ypserv ypserv ypbindyppasswdypupdated

    NIS maps created by default (if file available on master server)MAP FILE NICK NAMEpasswd.bynamepasswd.byaddr

    /etc/passwd Passwd

    group.bynamegroup.byaddr

    /etc/group Group

    hosts.bynamehosts.byaddr

    /etc/hosts Hosts

    ethers.bynameethers.byaddr

    /etc/ethers Ethers

    networks.bynamenetworks.byaddr

    /etc/networks Networks

    rpc.bynumber /etc/rpc

    services.byname /etc/servicesprotocols.bynameprotocols.bynumber

    /etc/protocols Protocols

    netgroup.byhostnetgroup.byuser

    /etc/netgroup

    bootparams /etc/bootparamsmail.aliasesmail.byaddr

    /etc/aliases Aliases

    publickey.byname /etc/publickeynetid.byname /etc/passwd

    /etc/group/etc/hosts/etc/netid

    netmasks.byaddr /etc/netmasks

    chypdom I mca Modifies nis domain name entry in /etc/rc.nfschypdom B mca Changes nis domain and modifies /etc/rc.nfs filechypdom N mca Changes nis domain name to mcadomainname mca Changes nis domain name to mca until next rebootmkmaster To make the machine NIS master

    (Options-O Overwrites existing maps-o prevents overwriting existing maps

  • 7/30/2019 AIX COMMAND REFRENCES

    10/25

    -E Exit on errors-e No exit on errors-P Starts yppasswdd daemon-p Dont start yppasswdd daemon-U Starts ypupdated daemon-u Dont start ypupdated daemon-C Starts ypbind daemon

    -c Dont start ypbind daemon-B Executes ypinit command and modifies rc.nfs

    mkclient B S mca Makes the machine as a client of mca server and starts ypbind daemonypcat passwd To cat the password map file passwd.bynameypcat x To display map nickname translation tableypcat d pci passwd To display the passwd file in the domain pciyppasswd To change the password of nis user lsmaster Display characteristics for the configuration of NIS master mrgpwd >/var/yp/passwd To merge /etc/passwd and /etc/security/passwd file to /var/yp/passwdypxfr -h mca passwd.byname To transfer password map file from host mca

    Procedure for NISMaster ServerChange the nis domain name in the master server

    chypdom B mcaor

    smit chypdomVerify tcpip is running by executing lssrc s inetdVerify portmap is running by executing lssrc s portmap(For security reason it is better to locate all nis files to /var/yp directory and change the DIR=/etcentry to DIR=/var/yp in the /var/yp/MakeFile. For merging the existing passwords executemrgpwd > /var/yp/passwd)Execute mkmaster O E P U C B

    -O Overwrites existing maps for this domain-E Exist on errors when creating master server

    -P Starts yppasswdd daemon-U Starts ypupdated daemon-C Starts ypbind daemon-B Executes ypinit command, uncomment entries in rc.nfs and starts daemons

    Check the yp daemons with lssrc g yp

    Slave ServerChange the nis domain name

    chypdom B mcaEdit hosts file, keep entries for loopback, this machine and of serverExecute mkslave O B C mca

    Client machineChange the nis domain name

    chypdom B mcaEdit hosts file, and keep entries for loopback , this machine and of serverExecute mkclient B mcaCheck for ypbind with lssrc s ypbind

    HACMP Commands

    logs

  • 7/30/2019 AIX COMMAND REFRENCES

    11/25

    /tmp/hacmp.out Detailed event script output logged in 7 day rolling history/var/adm/cluster.log High level view of cluster events (No clean up on this file)/usr/sbin/cluster/history/cluster.mmdd Day by day view of cluster events. (one file / day of month)/tmp/cm.log Clstrmgr messages/tmp/cspoc.log Output from C-SPOC commands (similar to smit.log)/tmp/emuhacmp.out Output from event emulation

    rdist -b -f /etc/disfile1 To distribute the files in disfile1 to all nodes in disfile1 in binary mode

    Sample entry for disfile1HOSTS = ( root@node1root@node3 )FILES = ( /etc/passwd /etc/security/passwd)${FILES} -> ${HOSTS}

    clstart -m -s -b -i -l To start cluster daemons (m-clstrmgr, s-clsmuxpd,b-broadcast message, -i-clinfo, -l cllockd)

    clstop -f -N To force shutdown cluster immediately without releasing resourcesclstop -g -N To do graceful shutdown immediately with no takeover clstop -gr -N To do graceful shutdown immediately with takeover

    cldare -t To sync the cluster toplogycldare -t -f To do the mock sync of topologycldare -r To sync the cluster resourcescldare -r -f To do the mock sync of resources

    clverify cluster verification utility

    cllscf To list clustur topology informationcllsclstr To list the name and security level of the cluster cllsnode To list the info about the cluster nodescllsnode -i node1 To list info about node1

    cllsdisk -g shrg To list the PVID of the shared hard disk for resource group shrgcllsnw To list all cluster networkscllsnw -n ether1 To list the details of network ether1cllsif To list the details by network adapter cllsif -n node1_service To list the details of network adapter node1_servicecllsvg To list the shared vgs which can be accessed by all nodescllsvg -g sh1 To list the shared vgs in resource group sh1cllslv To list the shared lvscllslv -g sh1 To list the shared lvs in the resource group sh1cllsdisk -g sh1 To list the PVID of disks in the resource group sh1cllsfs To list the shared file systemscllsfs -g sh1 To list the shared file systems in the resource group sh1cllsnim Show info about all network modulescllsnim -n ether Show info about ether network module

    cllsparam -n node1 To list the runtime parameters for the node node1cllsserv To list all the application servers

    claddclstr -i 3 -n dcm To add a cluster definition with name dcm and id 3claddnode To add an adaptercladdnim To add network interface modulecladdgrp -g sh1 -r cascading -n n1 n2 To create resource group sh1 with nodes n1,n2 in cascadecladdserv -s ser1 -b /usr/start -e /usr/stop Creates an application server ser1 with startscript as /usr/start

    and stop script as /usr/stop

  • 7/30/2019 AIX COMMAND REFRENCES

    12/25

    clchclstr -i 2 -n dcmds To change cluster definitions name to dcmds and id to 2clchclstr -s enhanced To change the clustur security to enhancedclchnode To change the adapter parametersclchgrp To change the resource group name or node relationship

    clchparam To change the run time parameters (like verbose logging)clchserv To change the name of app. server or change the start/end scripts

    clrmclstr To remove the cluster definitionclrmgrp -g sh1 To delete the resource group sh1 and related resourcesclrmnim ether To remove the network interface module ether clrmnode -n node1 To remove the node node1clrmnode -a node1_svc To remove the adapter named node1_svcclrmres -g sh1 To remove all resources from resource group sh1clrmserv app1 To remove the application server app1clrmserv ALL To remove all applicaion servers

    clgetactivenodes -n node1 To list the nodes with active cluster manager processes from clustermanager on node node1

    clgetaddr node1 returns a pingable address from node node1clgetgrp -g sh1 To list the info about resource group sh1clgetgrp -g sh1 -f nodes To list the participating nodes in the resource group sh1clgetif To list interface name/interface device name/netmask associated with

    a specified ip label / ip address of a specific nodeclgetip sh1 To get the ip label associated to the resource groupclgetnet 193.9.200.2 255.255.255.0 To list the network for ip 193.9.200.2, netmask255.255.255.0clgetvg -l nodelv To list the VG of LV nodelv

    cllistlogs To list the logs

    clnodename -a node5 To add node5 to the cluster

    clnodename -o node5 -n node3 To change the cluster node name node5 to node3

    clshowres Lists resources defined for all resource groupclfindres To find the resource group within a cluster

    xclconfig X utility for cluster configurationxhacmpm X utility for hacmp managementxclstat X utility for cluster status

    SP Commands

    Daemons

    hats Topology services hatsd ( /usr/sbin/rsct/bin/hatsctrl script)hags Group services hagsd (/usr/sbin/rsct/bin/hagsctrl script)haem Event management haemd (/usr/sbin/rsct/bin/haemctrl script)hr Host responds hrd (/usr/sbin/rsct/bin/hrctrl script)pman Problem management pmand,pmanrmd (/usr/sbin/rsct/bin/pmanctrl script)

    fault_service_Worm_RTG_SP (WORM) Switch daemon on nodes (/usr/lpp/ssp/rc.switch called bycss_restart_node)

  • 7/30/2019 AIX COMMAND REFRENCES

    13/25

    kadmind The authentication database daemon for password changing and administration toolsListens port 751. It checks acl files admin.acl.(get,mod,add) in /var/kerberos/database/.k file for master key and /var/kerberos/databse/pricipal.pag, pricipal.dir for

    authenticationdatabase.

    kerberos Daemon that provides authentication services & ticket granting ticket for clients.kpropd Daemon to receive update for a secondary database server

    hardmon Daemon that monitors and controls the state of SP hardwareIt checks acl file /spdata/sys1/spmon/hmacls

    install_cw To complete PSSP installation on cws(Installs PSSP programs for SMIT panelsStarts and configures SDRSets node number 0 for cws in ODMCreates hmacls file with rood.admin entry inStarts and configure PSSP daemonsConfigures default partition)

    setup_authent To setup workstation as SP authentication server (Creates /etc/krb.conf, /etc/krb.realms filesCreates authentication database using kdb_edit commandCreate master key file /.k using kstash commandAdds kadmin and kerberos to inittab file and starts themDefine initial auth. admin (eg:- root.admin) using kdb_edit commandCreates Kerberos ACLS (admin_acl.get,mod,add files)Execute kinit for root.admin and creates local service principals(hardmon.cws, rcmd.cws)Creates /.klogin file and add admin principal to itCreates /etc/krb-srvtab file using ext_srvtab command)

    setup_server To setup CWS as BIS

    splst_versions -G -t To check the PSSP versions in all nodesspmon_ctest To verify system monitor configured properlyspmon_itest To verify system monitor installed properly & operationalSYSMAN_test To verify the system management componentCSS_test To verify communication subsystem

    SDR_test -l si To verify SDR and logs the errors in file siSDRListClasses To list the class name in the SDR SDRArchive si To backup SDR in the directory /spdata/sys1/sdr/archives with name

    backup...sisprestore_config backup...si

    To restore SDR and partion sensitive subsystemsSDRGetObjects Syspar To get the system partition info

    SDRGetObjects syspar_map To get the system partition map (with node info)SDRGetObjects Adapter node_number netaddrTo get the node number and net address in the Adapter class

    SDRDeleteObjects Adapter netaddr==193.9.200.227To delete class Adapter with netaddr value 193.9.200.227

    SDRChangeAttrValues Node node_number==9 bootp_response==installTo change the boot response as install on node with node number 9

    SDRWhoHasLock Returns the transaction ID of a lock on a specified classSDRClearLock To unlock an SDR class

  • 7/30/2019 AIX COMMAND REFRENCES

    14/25

    syspar_ctrl -G -A To add and restart all system partition sub systemssyspar_ctrl -G -D To stop and delete all system partition sub systemssyspar_ctrl -R To restore all system partition sub systems in current partitionsyspar_ctrl -E To list all system partition sub systemssyspar_ctrl -s To start all system partition sub systems in current partitionsyspar_ctrl -k To stop all system partition sub systems in current partitionsyspar_ctrl -r To refresh all system partition sub systems in current partition

    ngcreate -s 1:1 si To create node group si with 1st node in 1st framengcreate -n 1 2 3 si To create node group si with 1st 2nd and 3rd nodesngcreate -N ng1,ng2 si To create node group si with node groups ng1 and ng2ngcreate -w n1,n2 si To create node group si with host name n1 and n2ngcreate -ae n1,n2 si To create node group si with all nodes in the current parti tion

    excluding hosts n1 and n2

    nglist To list node groups in current partitionnglist -G To list node groups globallyngfind si To find all node groups which contain node group singnew si1 si2 si3 To create 3 node groups with names si1 si2 and si3ngnew -G si1 si2 si3 To create 3 node groups globally with names si1 si2 and si3ngresolve -G -n si To resolve the nodes in the node group si as node numbers

    with global optionngresolve -w si To resolve the nodes in the node group si as fully qualified

    host namengresolve -d si To resolve the nodes in the node group si as fully qualified

    ip addressngdelete si si1 To remove node groups si and si1ngdelete -u si To remove node group si but leave entries in other node groups

    which is having the entries in itngclean -Ga To clean up all node groupsngaddto si 1 2 To add nodes 1 and 2 to the existing node group singaddto si 1 2 ng1 To add nodes 1,2 and node group ng1 to node group singdelfrom si 1 2 To remove nodes 1 and 2 from node group si

    ngdelfrom si 1 2 ng1 To remove nodes 1, 2 and node group ng1 from node group si

    spled -G To display leds of nodes in a multi partition systemspled or spmon -L To display leds of nodes in the current partion

    spmon -p off frame2/node3 To power off node3 in frame 2spmon -p on frame2/node3 To power on node 3 in frame 2spmon -G -p on frame2/node3 To power on node3/frame 2 if it is outside current partitionspmon -k service /frame2/node3 To change the key settings to servicespmon -p off frame1 To power off frame1spmon -K frame1/node1 To see the key settings of frame1/node1spmon -reset frame1/node1 To resetspmon -open frame1/node1 To open a tty on frame1/node1==(s1term -w 1 1)

    spmon -d To run the diag in the current partitionspmon -G -d To run the diag globally

    hmmon -V 1:1 Displays a descriptive list of symbolic variable nameshmmon -Q -s 1:1 Displays the state of node1 in frame 1 and existshmmon -q -s 1:1 Displays and monitors continuously

    hmreinit To stop and restart hardmon

    hmcmds -G off all To power off all hardware

  • 7/30/2019 AIX COMMAND REFRENCES

    15/25

  • 7/30/2019 AIX COMMAND REFRENCES

    16/25

    Eunpartition To prepare a system partition for repartitioning

    delnimclient -l 1 2 3 To delete nim client definition for nodes 1 2 and 3 from NIM master mknimclient -l 1 2 3 To make node 1 2 and 3 as NIM clientsdelnimmast -l 1 17 33 To unconfigure nodes 1 17 and 33 as NIM masters and remove filesetsmknimmast -l 1 17 33 To make nodes 1 17 and 33 as NIM masters

    lshacws To list the status of the CWS

    ntpdate 90.1.2.1 Sets date and time by enquiring ntp server 90.1.2.1

    spbootlist -l 1 2 To set the bootlist on nodes 1 and 2

    nodecond 1 4 To network boot the node 4 in frame 1nodecond -n 1 4 To fetch the ethernet address of node 4 in frame 1sphrdwrad 1 3 2 To fetch mac address for node 3 and 4 in frame 1

    setup_authent To setup a cws to use kerberos authenticationkdb_destroy To destroy the kerberos databasecreate_krb_files Searches for nodes in install/Customise mode and create krb-srvtabfile

    for those nodes. (Creates in tftpboot directory of CWS.)ext_srvtab -n node1 To extract service key files from the database for instance node1ext_srvtab -n SPbgAdm To extract service key files from the database for instance SPbgAdm

    (Creates in the present directory with name -new-srvtab)spsetauth -d k4 std To set the authentication methods as k4 and standardchauthpar k4 std To change the authentication methods as k4 and std

    kpasswd To change the kerberos principals password

    lsauthent To list the authentication table

    k4init siju To get the kerberos ticket for principal sijuk4init -v siju To get the same as above but give verbose outputk4init -i siju To get the same but the machine will ask for the instancek4init -r siju To get the same for a different realm (U can specify realm)k4init -l siju To get the same for the life time in minutes which u specify

    rcmdtgt To obtain a maximum life time ticket for rcmd services on local node

    k4list To list the ticket cache and principals namek4list -srvtab To list the contents of the server key file

    chkp -l 6 siju To change the life time of the principal siju to 30 minutes (6 x 5)

    chkp -e 2001-5-23 siju To change the expiry date of principal siju to 2001 may 23

    lskp -p To list the predefined kerberos principalslskp -s To list the kerberos service principalslskp -c To list the kerberos client principalslskp siju abc To list the principals of siju and abc

    rmkp siju To remove the principal sijurmkp -n siju To remove the principal siju without prompting for confirmationrmkp -v siju To remove the principal with verbose output

  • 7/30/2019 AIX COMMAND REFRENCES

    17/25

    kdb_edit To change the attributes of the kerberos principalskdb_edit -n To avoid asking master key and get it from .k file

    kdb_util dump /si.bak To backup the kerberos database to si.bak filekdb_util load /si .bak To restore the kerberos database from file si.bak.kdb_util new_master_key To change the master key

    kadmin To add,delete,see,change password,change admin passwd of kerberosekadmin ank To add a new kerberos principalkadmin cpw To change the password of a principalkadmin cap To change admin passwordkadmin get To get the details of a principalkadmin dest To destroy admin ticket

    kstash To save the master key in the .k file

    kdb_init To initialize the kerberos system

    ksrvutil list To list the principals and version number in the server key fileksrvutil -f /etc/srvtab.bak list To list the principals in the file /etc/srvtab.bakksrvutil change To change the key version in the default srvtab fileksrvutil delete To delete the keys in the /etc/krb-srvtab fileksrvutil -f /etc/srvtab.bak delete To delete the keys in the /etc/srvtab.bak filespacs_cntrl block user1 To block user1 on the nodespacs_cntrl unblock user1 To unblock user1spacs_cntrl deny user1 To deny user1spacs_cntrl allow user1 To allow user1spacs_cntrl -f /tmp/si deny To deny the list of the users in the file /tmp/sicw_allowed List of users to be allowed to login to CWScw_restrict_login Script which will deny user to login to cws and allow them to change

    the passwd (files are /usr/lpp/ssp/config/admin directory and entry forsecond file will be in /etc/profile file)

    spmkuser id=1234 pgrp=system groups=system,bin home=node1:/home/siju sijuTo create SP user siju with id 1234, primary groups system, secondarygroups system,bin and home directory home/siju of node1

    sprmuser -ipr siju To remove the SP user siju (I for interactive, p for removing info frompasswd file and r for removing the home directory)

    splsuser -c siju To list the attributes of sp user siju in column formatsplsuser -f siju To list the attributes of sp user siju in stanza format

    spchuser groups=dev,system sh=/bin/ksh sijuTo change the shell to ksh and secondary groups to dev,system of SP user siju

    supper -v To go to the supper prompt in verbose modesupper update To update all file collectionssupper status To see the status of the file collectionssupper when To list when last updation occuredsupper where To show current servers for updationsupper log To show summary of last or current updationsupper rlog To show the details of last of current updationsupper file user.admin To list the files in the file collection user.adminsupper install siju To install the file collection sijusupper remove siju To remove file collection siju

  • 7/30/2019 AIX COMMAND REFRENCES

    18/25

    supper update user.admin To update file collection user.adminsupper diskinfo To show the diskspace and current VG

    Procedure to Build a file collection with name siju for files in /home/siju

    1) go to /var/sysman/sup2) create dir siju3) change ownership and group of siju to bin4) copy contents of /var/sysman/sup/user.admin to siju5) edit list file for including and omitting files in /home/siju directory

    It should contains entry like the following

    symlinkallupgrade ./home/sijuomit ./home/siju/abcomitany ./home/siju/s*

    6) Add a symbolic link to siju file in lists directory to list in siju directoryie ln -s /var/sysman/sup/siju/list /var/sysman/sup/lists/siju

    7) Update /var/sysman/file.collections file with following entryprimary siju - / - / EDO power no

    8) Update sup.admin file collection to reflect the changes made to file.collectionsdsh -av supper update sup.admin

    9) Install file collection siju in the nodesdsh -av supper install siju

    sysctld Sysctl server daemon/etc/sysctl.conf Sysctl configuration file

    setauth -cmd svcconnect NONE To allow non kerberos users to execute sysctl commands(Entry in sysctl.conf file)

    setauth -cmd pdf {ACL /etc/si.acl}To change the acl file for pdf command to /etc/si.acl(Entry in sysctl.conf file)

    /etc/sysctl.acl Default acl file for sysctl

    sysctl -h node1 Opens a sysctl command interface for node node1sysctl -h node1 aclcheck siju To check entry for siju in the default acl file (sysctl.acl)sysctl -h node1 -f /etc/si.acl siju To check entry for siju in the acl file /etc/si.aclsysctl -h node1 info commands To list the authorized commands for the current principalsysctl -h node1 acladd -p siju To add the principal siju to the default ACL filesysctl -h node1 -f /etc/si.acl acladd -p siju

    To add the principal siju to /etc/si.acl ACL filesysctl -h node1 acldelete -p siju To delete the principal siju to the default ACL file

    sysctl -h node1 -f /etc/si.acl acldelete -p sijuTo delete the principal siju to /etc/si.acl ACL file

    sysctl -h node1 acllist To list the entries in the default acl filesysctl -h node1 -f /etc/si.acl acllist To list the entries in /etc/si.acl filesysctl -h node1 aclcreate -p root.admin -p siju -f /etc/si.acl

    To create acl file /etc/si.acl with the entries root.admin and sijusysctl -h node1 checkauth -cmd pdf

    To check authorization for command pdf for the current usersysctl -h node1 confadd include /etc/si.acl

    To include the acl file si.acl in the sysctl.conf file

  • 7/30/2019 AIX COMMAND REFRENCES

    19/25

    sysctl -h node1 confdelete include /etc/si.aclTo remove the acl file si.acl from sysctl.conf file

    sysctl -h node1 svcrestart To restart the sysctld daemon on node node1

    Steps to create a Syctl application

    Task :- User siju (kerberos principal siju.adm) should get the permission to start a subsystem by executingthe command substart. Permission should not be given to other users.

    1) Create the client application substart in /usr/bin directory of cws with following contents

    if [ $# -gt 2 ]then echo "Arguments exceed the limit"exit 1

    fi/usr/lpp/ssp/bin/hostlist -n $1 | /usr/bin/sysctl -c - substart_proc $2

    In the above script if condition will check for the number of arguments and execute procedure oncorresponding host

    2) Change the mode to executable

    chmod 755 /usr/bin/substart

    3) Create server application substart.tcl with a procedure substart_proc with following contents

    create proc substart_proc {SubSystem} AUTH {global SCUSERif [ aclcheck -f /etc/substart.acl $SCUSER ] {

    exec /etc/substart.srv $SubSystemreturn}

    }

    if condition in the above example checks for kerberos user in the acl file /etc/substart.aclIf the condition is true it execute the command /etc/substart.srv with arguments passed bysubstart command

    4) Create the script substart.srv with following contents

    startsrc -s $2

    This script execute the command startsrc with the argument passed by the substart command

    5) Change the mode to executable

    chmod 755 /etc/substart.srv

    6) Create acl file substart.acl with the entry for user siju

    #acl#

  • 7/30/2019 AIX COMMAND REFRENCES

    20/25

    _PRINCIPAL siju.adm@CWS

    7) Add the application to the sysctl by adding following line to sysctl.conf file

    include /etc/substart.tcl

    8) Distribute the files to all nodes

    pcp -av /usr/bin/substartpcp -av /etc/substart.tclpcp -av /etc/substart.srvpcp -av /etc/substart.aclpcp -av /etc/sysctl.conf

    9) Restart the sysctld daemon to get the new information on cws and on all nodes

    10) Get the kerberos ticket for user siju and execute following command

    substart 3 lpd

    This should start the lpd daemon on node 3

    11) Try the above command with any other kerberos ticket. Result should be negative

    NIM Commands

    nimconfig -a pif_name=en0 -a netname=net1To initialise the NIM master with network name net1

    nimconfig -r To rebuild /etc/niminfo file which contains the variables for NIM

    nim -o define -t lpp_source -a source=/dev/cd0 -a server=master -alocation=/export/lpp_source/lpp_source1 lpp_source1

    To define lpp_source1 image in /export/lpp_source/lpp_source directory from sourcecd0

    nim -o define -t mksysb -a server=master -a location=/resources/mksysb.image mksysb1To define mksysb resource mksysb1, from source /resources/mksysb.image on master

    nim -o remove inst_resourceTo remove the resource inst_resource

    nim -o check lpp_source1To check the status of lpp_source lpp_source1

    nim -o allocate -a spot=spot1 -a lpp_source=lpp_source1 node1To allocate the resources spot1 and lpp_source1 to the the client node1

    nim -o bos_inst node1To initialise NIM for the BOS installation on node1 with the allocated resources

    nim -o dkls_init dcmdsTo initialize the machine dcmds as diskless operation

    nim -o dtls_init dcmdsTo initialize the machine dcmds for dataless operation

    nim -o cust dcmdsTo initialize the machine dcmds for customize operation

    nim -o diag dcmdsTo initialize the machine dcmds for diag operation

    nim -o maint dcmdsTo initialize the machine dcmds for maintenance operation

    nim -o define -t standalone -a platform=rspc -a if1="net1 dcmds xxxxx" -a cable_type1=bnc dcmds

  • 7/30/2019 AIX COMMAND REFRENCES

    21/25

    To define the machine dcmds as standalone with platform as rspc and network as net1 with cabletype bnc and mac address xxxxx

    nim -o unconfig masterTo unconfigure nim master master

    nim -o allocate -a spot=spot1 dcmdsTo allocate the resource spot1 from machine dcmds

    nim -o deallocate -a spot=spot1 dcmds

    To de allocate the resource spot1 from machine dcmdsnim -o remove dcmds

    To remove machine dcmds after removing all resources associated to itnim -o reboot dcmds

    To reboot ther client dcmdsnim -o define -t lpp_source -a location=/software/lpp1 -a server=master -a source=/dev/cd0 lpp1

    To define lppsource lpp1 on master at /software/lpp1 directory from source device /dev/cd0lsnim To list the nim resourceslsnim -l dcmds To list the detailed info about the object dcmdslsnim -O dcmds To list the operation dcmds object can supportlsnim -c resources dcmds To list the resources allocated to the machine dcmds

    nimclientThe client version of nim command (User can obtain same results of nim in server )

    Tape Drive Tasks

    Web-based System Manager: wsm devices fast path(Devices application)

    -OR-

    Task SMIT Fast Path

    Command or File

    List All Defined Tape Drives smit lsdtpe lsdev -C -c tape -H

    List All Supported Tape Drives smit lsstpe lsdev -P -c tape -F "type subclass description" -H

    Add New Tape DrivesAutomatically

    smit cfgmgr cfgmgr

    Add a User-Specified Tape Drive smit addtpe mkdev -c tape -t '8mm' -s 'scsi' -p 'scsi0' -w '4,0' -aextfm=yes

    Show Characteristics of a TapeDrive

    smit chgtpe lsdev -C -l rmt0lsattr -D -l rmt0

    Change Attributes of a TapeDrive

    smit chgtpe chdev -l rmt0 -a block_size='512' -a mode=no1

    Remove a Tape Drive smit rmvtpe rmdev -l 'rmt0'1

    dosrd: copy DOS file to AIX file# dosrd: reads DOS file from floppy and converts to AIX format with

    # specified directory/filename $1dosread -a $1 $1

    doswr: copy AIX file to DOS file# doswr: writes AIX file to floppy and converts to DOS format with# specified directory/filename $1doswrite -a $1 $1

    Clusters

  • 7/30/2019 AIX COMMAND REFRENCES

    22/25

    cath_node11:root:/# lssrc -g clusterSubsystem Group PID StatusclstrmgrES cluster 19770 activeclsmuxpdES cluster 22190 activeclinfoES cluster 21940 active

    tail -f /tmp/hacmp.out|more

    cath_node11:root:/# tail -30 /tmp/hacmp.out|moreEXPORTLIST=network_down_complete[91] [ -n ]network_down_complete[90] network_down_complete[90] odmget -q group=workflow_server1_int ANDname=EXPORT_FILESYSTEM HACMPresourcenetwork_down_complete[90] grep valuenetwork_down_complete[90] awk {print $3}network_down_complete[90] sed s/"//gEXPORTLIST=/osmlocal_anetwork_down_complete[91] [ -n /osmlocal_a ]network_down_complete[93] [ REAL = EMUL ]network_down_complete[98] cl_update_statdcl_update_statd[91] [[ high = high ]]cl_update_statd[91] version=1.7cl_update_statd[92] cl_update_statd[92] cl_get_path

    Cluster stateCheck the status of the cluster daemons by issuing lssrc -g cluster and lssrc -g lock.

    Run /usr/sbin/cluster/clstat to check the status of the cluster and the status of the network interfaces.Check the cluster log files with tail -f /tmp/hacmp.out, more/usr/sbin/cluster/history/cluster.mmdd (mmdd = current date), tail -f/var/adm/cluster.log, and more /tmp/cm.log.

    Check that the nodename is correct (use odmget HACMPcluster).

    Verify that all the HACMP Configuration is synchronized. To check the state of the HACMP clusternodes, you have to test the topology and configuration of your HACMP cluster. This is done by using theclverify command.

    The state of cluster can be found by using the /usr/sbin/cluster/clstat

    clstat - HACMP Cluster Status Monitor---------------------------------------------Cluster: cl_hacmp441 (1) Fri Oct 12 15:23:42 CDT 2001State: UP Nodes: 2SubState: STABLENode: austin State: DOWN

    Interface: boot1 (0) Address: 192.168.1.11State: DOWNInterface: austin_tty0 (1) Address: 0.0.0.0State: DOWNInterface: austin_tmssa1 (2) Address: 0.0.0.0State: DOWNNode: boston State: UPInterface: boston (0) Address: 192.168.1.20State: UP

  • 7/30/2019 AIX COMMAND REFRENCES

    23/25

    Interface: boston_tty0 (1) Address: 0.0.0.0State: UPInterface: boston_tmssa1 (2) Address: 0.0.0.0

    find /proc/*/fd -type f -links 0 -exec ls -lh {} \; invalid pointing links

    rmfs (fs) Removes the file system and will also remove theLV if there are no onther file systems on it.

    defrag -q (fs) Reports the fragment status of the file system.defragfs -r (fs) Runs in report only defrag mode (no action).defragfs (fs) Defragments a file system.

    fsck (fs) Verify a file system, the file system must be unmounted!fsck (-y or -n) (fs) Pre-answer questions either yes or no !fsck -p (fs) Will restore primary superblock from backup copy if the

    superblock is corrupt.

    Useful HACMP commands

    clstat - show cluster state and substate; needs clinfo.cldump - SNMP-based tool to show cluster statecldisp - 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.

    LPARuname L

    Use the uname command to obtain information about the system in relation to the LPAR.

    > uname -L-1 NULLThe "-1" indicates that the system is not running with any logical partitions, but is running in full systempartition mode.

  • 7/30/2019 AIX COMMAND REFRENCES

    24/25

    The following example demonstrates how the uname command provides the partition number and thepartition name as managed by the HMC:

    > uname -L3 Web ServerKnowing that the application is running in an LPAR can be helpful when you are assessing slightperformance differences.

    CHFS EXAMPLES

    1. To change the file system size of the /test Journaled File System, enter:

    chfs -a size=24576 /test

    This command changes the size of the /test Journaled File System to 24576 512-byte blocks, or12MB (provided it was previously no larger than this).

    2. To increase the size of the /test Journaled File System, enter:

    chfs -a size=+8192 /test

    This command increases the size of the /test Journaled File System by 8192 512-byte blocks, or 4MB.

    3. To convert a JFS2 file system to a version which can support NFS4 ACLs, type:chfs -a ea=v2 /test

    4. To change the mount point of a file system, enter:

    chfs -m /test2 /test

    This command changes the mount point of a file system from /test to /test2.

    5. To delete the accounting attribute from a file system, enter:

    chfs -d account /home

    This command removes the accounting attribute from the /home file system. The accountingattribute is deleted from the /home: stanza of the /etc/filesystems file.

    6. To split off a copy of a mirrored file system and mount it read-only for use as an online backup,enter:

    chfs -a splitcopy=/backup -a copy=2 /testfs

    This mount a read-only copy of /testfs at /backup.

    7. To change the file system size of the /test Journaled File System, enter:

    chfs -a size=64M /test

    This command changes the size of the /test Journaled File System to 64MB (provided it waspreviously no larger than this).

    8. To reduce the size of the /test JFS2 file system, enter:

    chfs -a size=-16M /test

    This command reduces the size of the /test JFS2 file system by 16MB.

    9. To freeze a file system, enter:

    chfs -a freeze=60 /adl

    This command freezes the /adl file system for a maximum of 60 seconds.

    10. To thaw a file system, enter:

    chfs -a freeze=off /zml

    http://publib.boulder.ibm.com/infocenter/systems/topic/com.ibm.aix.cmds/doc/aixcmds1/chfs.htm#chfs_flags_ahttp://publib.boulder.ibm.com/infocenter/systems/topic/com.ibm.aix.cmds/doc/aixcmds1/chfs.htm#chfs_flags_ahttp://publib.boulder.ibm.com/infocenter/systems/topic/com.ibm.aix.cmds/doc/aixcmds1/chfs.htm#chfs_flags_mhttp://publib.boulder.ibm.com/infocenter/systems/topic/com.ibm.aix.cmds/doc/aixcmds1/chfs.htm#chfs_flags_ahttp://publib.boulder.ibm.com/infocenter/systems/topic/com.ibm.aix.cmds/doc/aixcmds1/chfs.htm#chfs_flags_ahttp://publib.boulder.ibm.com/infocenter/systems/topic/com.ibm.aix.cmds/doc/aixcmds1/chfs.htm#chfs_flags_m
  • 7/30/2019 AIX COMMAND REFRENCES

    25/25

    This command thaws the /zml file system.