Pages

AIX CLI All In One

A Command Line Interface (CLI) is a text-based interface that lets users interact with the operating system or software by typing commands instead of using graphical menus or icons.

You type commands into a terminal (or console window), and the system executes them to perform specific tasks.
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX USER & GROUP MANAGEMENT COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
ID AND USER INFORMATION
# id                         --> List all IDs (UID, GID, groups) for current user
# id -gn                     --> Display default group of current user
# id -Gn                     --> Display all groups of current user
# who                        --> Show currently logged-in users with tty and IP
# who /var/adm/wtmp          --> Display history of logins, logouts, startup, shutdown
# who -r                     --> Display current run level
# who am i / who -m          --> Show current user
# last                       --> Show login history

LIST USERS
# lsuser root                --> Show attributes of user 'root'
# lsuser ALL                 --> Show attributes of all users
# lsuser -a HOME ALL         --> Show home directories of all users
# lsuser -a ALL              --> List all usernames
# lsuser -a auth1 auth2 ALL  --> Show authentication methods of all users
# lsuser -a expires ALL      --> Show account expiration dates
# lsuser -a account_locked ALL --> Check account lock status
# lsuser -a shell ALL        --> List login shells of all users
# lsuser -a groups ALL       --> List primary & secondary groups of all users

CREATE USER
# mkuser username            --> Create user with default attributes (/usr/lib/security/mkuser.default)
# mkuser home=/home/user username --> Create user with custom home directory
# mkuser shell=/usr/bin/ksh username --> Create user with custom login shell
# mkuser su=false username   --> Create user without 'su' privilege

MODIFY USER
# chuser -a login=true username       --> Enable user login
# chuser -a login=false username      --> Disable user login
# chuser -a rlogin=true username     --> Enable remote login (rlogin)
# chuser -a rlogin=false username    --> Disable remote login
# chuser -a account_locked=true username  --> Lock account
# chuser -a account_locked=false username --> Unlock account
# chuser -a expires=YYYY-MM-DD username   --> Set account expiry date
# chuser -a groups=group1,group2 username --> Add user to secondary groups

PASSWORD MANAGEMENT
# passwd username            --> Change password for user
# pwdadm -c username         --> Create password info for user
# pwdadm -f ADMCHG username  --> Force password change on next login
# chuser -a minage=0 maxage=90 username --> Set password aging

DELETE USER
# rmuser username            --> Remove user
# rmuser -p username         --> Remove user and all attributes

GROUP MANAGEMENT
# mkgroup groupname          --> Create a group
# chgroup users=u1,u2,u3 groupname --> Add users to group
# chgroup admin=true groupname      --> Assign group administrator
# rmgroup groupname          --> Remove group
# lsgroup groupname          --> Show attributes of group
# lsgroup ALL                --> List all groups
# groups username            --> List all groups of a user
# newgrp groupname           --> Change current primary group

SECURITY AND AUTHENTICATION
# chauthent                  --> Change authentication methods
# lssec -f /etc/security/user --> View user security configuration file
# lssec -f /etc/security/passwd --> View password security file
# chuser -a auth1=method username   --> Change authentication method for a user
# chuser -a loginretries=3 username --> Set maximum login retries

SESSION & SWITCHING
# su - username              --> Switch to another user
# su -                       --> Switch to root user
# exit                       --> Logout from current session

MISCELLANEOUS
# whoami                     --> Display current username
# tty                        --> Display current terminal
# finger username            --> Show user info (if finger installed)
# id -u username             --> Display UID of user
# id -g username             --> Display primary GID of user
# id -G username             --> Display all groups of user
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX SUBSYSTEM COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
# lssrc -a                     --> To list the status of all subsystems
# lssrc -h node1 -a             --> To list the status of all subsystems on a foreign host node1
# lssrc -s jenkins              --> To list the status of the subsystem jenkins
# lssrc -g tcpip                --> To get the status of the subsystem group tcpip
# lssrc -T                       --> To display timestamped subsystem status
# lssrc -t                       --> To display subsystem type (system/application)
# lssrc -c                       --> To display subsystem configuration details
# lssrc -d                       --> To display subsystem dependencies
# mkssys -s subsysname           --> To add a new subsystem
# mkssys -a '-p /usr/bin/app' -S subsysname  --> To create a subsystem with custom path
# rmssys -s kerberos            --> To remove the subsystem kerberos
# rmssys -S kad                 --> To remove subsystem by new name kad
# chssys -s kerb -S kad         --> To rename subsystem kerb to kad
# chssys -a '-p /usr/bin/newapp' -s kad --> To modify subsystem attributes
# startsrc -s jenkins           --> To start the subsystem jenkins
# startsrc -g tcpip             --> To start the subsystem group tcpip
# startsrc -a                    --> To start all subsystems
# startsrc -q                    --> To start subsystems quietly (no messages)
# stopsrc -s jenkins            --> To stop the subsystem jenkins
# stopsrc -g tcpip              --> To stop the subsystem group tcpip
# stopsrc -a                     --> To stop all subsystems
# stopsrc -q                     --> To stop subsystems quietly
# refresh -s nfsd               --> To refresh the nfsd subsystem
# refresh -g tcpip              --> To refresh the tcpip subsystem group
# refresh -a                     --> To refresh all subsystems
# refresh -q                     --> To refresh subsystems quietly
# refresh -t                     --> To refresh subsystems and display status
# lssrc -S subsysname            --> To display detailed info for a single subsystem
# lssrc -g groupname -v           --> Verbose info about a subsystem group
# startsrc -s subsysname -p       --> Start subsystem with process info
# stopsrc -s subsysname -p        --> Stop subsystem with process info
# refresh -s subsysname -p        --> Refresh subsystem with process info
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX JOB SCHEDULING COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
CRON COMMANDS
# crontab -l                     --> List the crontab entries for the current user
# crontab -e                     --> Edit the crontab entries for the current user
# crontab -l > /test             --> Copy crontab entries to file /test
# crontab -r                     --> Remove all crontab entries for the current user
# crontab -v                     --> Display last modification/submission time
# crontab -i                     --> Prompt before removing crontab entries
# crontab -u username -l         --> List crontab entries for specified user
# crontab -u username -r         --> Remove crontab for specified user
# crontab -u username -e         --> Edit crontab for specified user
# crontab -u username -l -v      --> List crontab for user with submission time
/var/adm/cron/cron.allow         --> File containing users allowed to use cron service
/var/adm/cron/cron.deny          --> File containing users denied cron service
/var/spool/cron/crontabs         --> Location of user crontab files
/usr/lib/cron/check              --> Verify cron job syntax and configuration
# cron_restart                     --> Restart the cron daemon

AT COMMANDS
# at -l                           --> List jobs scheduled via at command for current user
# atq                             --> List all at jobs for the current user
# atq username                    --> List all at jobs submitted by a specific user
# at -r <job_id>                  --> Remove a specific scheduled at job
# atrm <job_id>                   --> Remove a job from the at queue
# at -f /path/to/script now +5 minutes --> Schedule a script 5 minutes from now
# at -t YYYYMMDDHHMM              --> Schedule a job at a specific timestamp
# at -c <job_id>                   --> Display the contents of a specific at job
/var/adm/cron/at.allow            --> File containing users allowed to use at service
/var/adm/cron/at.deny             --> File containing users denied at service

BATCH JOB COMMANDS
# batch < /path/to/script         --> Schedule a job to run when system load permits
# jobstat                          --> Display status of batch jobs
# showstart <job_id>               --> Show scheduled start time of a batch job
# qsub <script>                     --> Submit a job to batch queue (if batch scheduler installed)
# qdel <job_id>                     --> Delete a job from batch queue
# qstat                             --> Show current batch queue jobs

MISCELLANEOUS JOB COMMANDS
# /usr/lib/cron/check              --> Verify cron jobs for syntax errors
# cronq                             --> List all cron jobs running in the system
# showq                             --> Display queued jobs (depends on batch system)
# crontab -s                         --> Display system crontab location
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX ODM & ERROR REPORTING COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
ODM COMMANDS
# odmget sm_menu_opt                                --> Retrieve all objects from class sm_menu_opt
# odmget -q "id=licenses" sm_menu_opt              --> Retrieve objects from sm_menu_opt that match query id=licenses
# odmdelete -o sm_menu_opt -q "id=licenses"        --> Delete entries in sm_menu_opt that match query id=licenses
# odmshow sm_menu_opt                               --> Display the definition of the object class sm_menu_opt
# odmdrop -o sm_menu_opt                            --> Drop the entire object class sm_menu_opt
# odmchange -o sm_menu_opt -q "id=licenses" file1  --> Modify attributes in sm_menu_opt using values from file1
# odmadd -o sm_menu_opt file1                        --> Add new entries to sm_menu_opt from file1
# odmget -p "attribute=value" -o classname          --> Retrieve objects with a specific attribute value

ERROR REPORTING (ERRPT)
# errpt                                            --> Display a summary of system error reports
# errpt -a                                         --> Display detailed error reports
# errpt -d H                                       --> List hardware-related errors only
# errpt -d S                                       --> List software-related errors only
# errpt -a -j 34564423                             --> Show detailed report for specific error ID
# errpt -s start_time -e end_time                  --> Show errors between specific times
# errpt -t "H"                                     --> Show only hardware errors
# errpt -N 10                                      --> Display the last 10 errors

SYSTEM & INIT COMMANDS
# chitab tty002:23:respawn:/usr/sbin/getty /dev/tty  --> Add entry to inittab for automatic respawn of getty
# mkitab tty002:23:respawn:/usr/sbin/getty /dev/tty  --> Create a new inittab entry
# rmitab tty002                                    --> Remove an entry from inittab
# lsitab                                           --> List all inittab entries
# inutoc                                           --> Rebuild inittab database after changes

SUBSYSTEM & SERVICE COMMANDS
# lssrc -g portmap                                  --> List status of the subsystem group portmap
# startsrc -g portmap                               --> Start portmap subsystem group
# stopsrc -g portmap                                --> Stop portmap subsystem group
# refresh -g portmap                                --> Refresh portmap subsystem group
# lssrc -a                                          --> Show status of all subsystems
# lssrc -s subsystem_name                           --> Show status of a specific subsystem
# startsrc -s subsystem_name                        --> Start a specific subsystem
# stopsrc -s subsystem_name                         --> Stop a specific subsystem
# refresh -s subsystem_name                         --> Refresh a specific subsystem
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX VG COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
# lsvg                          --> Display all volume groups (VGs)
# lsvg -o                       --> Display all active VGs
# lsvg rootvg                    --> Display information about rootvg
# lsvg -l rootvg                 --> Display information about all logical volumes (LVs) in rootvg
# lsvg -o | lsvg -il             --> Display information about all LVs in all active VGs
# lsvg -p rootvg                 --> Display information about all physical volumes (PVs) in rootvg
# lsvg -t                        --> Display VG type (rootvg, non-rootvg, system, etc.)
# lsvg -h                        --> Display detailed help for lsvg options
# mkvg -s 126 hdisk1             --> Create VG on hdisk1 with partition size 126 MB
# mkvg -s 126 -y datavg hdisk1   --> Create VG named datavg on hdisk1 with PP size 126 MB
# mkvg -s 32 -t 2 -y datavg hdisk1 --> Create datavg on hdisk1 with PP size 32 and 2 PPs per PV
# chvg -a y datavg               --> Set VG datavg to activate automatically at startup
# chvg -a n datavg               --> Deactivate automatic activation for VG datavg
# chvg -t 2 datavg               --> Change maximum number of PPs in VG datavg to 2032
# chvg -Q n datavg               --> Disable quorum on VG datavg
# reorgvg datavg                 --> Reorganize PP allocation in VG datavg
# extendvg datavg hdisk3 hdisk4  --> Add PVs hdisk3 and hdisk4 to VG datavg
# exportvg datavg                --> Export VG datavg (prepare for import on another system)
# importvg -V 44 -y newvg hdisk2 --> Import VG from hdisk2 as newvg with major number 44
# reducevg datavg hdisk3         --> Remove PV hdisk3 from VG datavg
# varyoffvg datavg               --> Deactivate VG datavg
# varyonvg datavg                --> Activate VG datavg
# syncvg -v datavg               --> Synchronize mirrored LVs in VG datavg
# mirrorvg -S -m datavg hdisk2  --> Mirror all LVs of datavg to hdisk2 (-m exact mirror, -S background mirror)
# unmirrorvg datavg hdisk2       --> Remove mirrored PV hdisk2 from VG datavg
# importvg -y datavg hdisk2      --> Import VG datavg from PV hdisk2 without specifying major number
# lsvg -l datavg                 --> List all LVs and attributes in VG datavg
# lsvg -p datavg                 --> List all PVs and their status in VG datavg
# lsvg -o | lsvg -l              --> List all LVs in all active VGs
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX FILESYSTEM COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
LIST FILESYSTEMS
# lsfs                            --> List all filesystems in /etc/filesystems
# lsfs -q                         --> List filesystems with detailed information
# lsfs -a                         --> List all filesystems (default)
# lsfs -l                         --> Output in list format
# lsfs -c                         --> Output in column format
# lsfs -v jfs                      --> List all JFS type filesystems
# df -g                            --> Show filesystem usage in GB
# df -m                            --> Show filesystem usage in MB
# mount                            --> Show currently mounted filesystems
# mount -v jfs                     --> List mounted JFS filesystems
# mount | grep /data               --> Check if /data is mounted

CREATE FILESYSTEM
# crfs -v jfs -g testvg -a size=64465 -m /data --> Create JFS filesystem /data in VG testvg with blocksize 64465
# crfs -v jfs -d /dev/lv00 -m /data           --> Create JFS filesystem /data on LV /dev/lv00
# crfs -v jfs -a size=100M -m /backup -g datavg --> Create FS in VG datavg with size 100 MB

MODIFY FILESYSTEM
# chfs -a size=24576 /data                  --> Set FS /data size to 24576 x 512-byte blocks (~12 MB)
# chfs -a size=+24576 /data                 --> Increase FS /data by 24576 x 512-byte blocks
# chfs -m /data01 /data                     --> Change mount point from /data01 to /data
# chfs -A /data                              --> Enable auto-mount for /data
# chfs -d account /data                      --> Remove account attribute from /data
# chfs -a splitcopy=/backup -a copy=2 /data --> Mount 2nd copy of mirrored FS /data to /backup (read-only)

DELETE FILESYSTEM
# rmfs /data                                --> Delete FS /data and associated LV
# rmfs -r /data                             --> Delete FS /data, its mount point, and associated LV

FILESYSTEM MAINTENANCE
# defragfs /data                             --> Defragment filesystem /data
# defragfs -q /sifs                          --> Display defrag status of filesystem /sifs
# fsck -y n /dev/lv00                        --> Run filesystem check on /dev/lv00, auto-yes to prompts
# fsck -p /dev/lv00                           --> Restore superblock from backup (preen mode)
# fsck -F jfs -y /dev/lv00                    --> Force check FS of type JFS, auto-yes
# fsck -F jfs -D /dev/lv01                    --> Display superblock info for LV /dev/lv01

MOUNT / UNMOUNT FILESYSTEMS
# mount /data                                --> Mount filesystem /data
# umount /data                               --> Unmount filesystem /data
# mount -o ro /data                           --> Mount filesystem read-only
# mount -a                                    --> Mount all filesystems from /etc/filesystems
# umount -f /data                             --> Force unmount filesystem
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX PV (PHYSICAL VOLUME) COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
DISPLAY PV INFORMATION
# lspv hdisk0                          --> Display status and characteristics of the PV hdisk0
# lspv -p hdisk0                       --> Display the physical partition (PP) usage of hdisk0
# lspv -l hdisk0                       --> List all logical volumes (LVs) on PV hdisk0
# lspv -t hdisk0                        --> Display PV type and attributes (bootable, etc.)
# lspv -v hdisk0                        --> Verbose PV info including VG and PP mapping

MODIFY PV STATUS
# chpv -v r hdisk1                      --> Close (offline) the PV (used before removing PV without varyon)
# chpv -v a hdisk1                      --> Open (online) the PV
# chpv -c hdisk0                         --> Clear the master boot record (MBR) on PV hdisk0

MIGRATE PV DATA
# migratepv hdisk1 hdisk2               --> Move all PPs from PV hdisk1 to hdisk2
# migratepv -l datalv hdisk1 hdisk2     --> Migrate LV datalv from PV hdisk1 to hdisk2
# migratepv -i /dev/lvname hdisk1 hdisk2 --> Interactive migration of LV data from hdisk1 to hdisk2
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX LV (LOGICAL VOLUME) COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
DISPLAY LV INFORMATION
# lslv lv00                          --> Display detailed information about LV lv00
# lslv -l lv00                        --> Display LV mapping on physical volumes (PP allocation)
# lslv -p hdisk1                      --> Show LV allocation map for PV hdisk1
# lslv -a                             --> Display all LVs in all VGs
# lsvg -l datavg                       --> Display all LVs and their attributes in VG datavg

CREATE LOGICAL VOLUMES
# mklv -y datalv datavg 5              --> Create LV datalv in VG datavg with 5 LPs
# mklv -s n -c 3 datalv hdisk1         --> Create LV datalv with 3 mirrored copies on hdisk1
# mklv -t jfslog -y log00 datavg 2     --> Create JFS log LV log00 in VG datavg with 2 LPs
# mklvcopy -s n datalv 2 hdisk1        --> Mirror LV datalv on PV hdisk1 with 2 copies
# mklvcopy datalv 3 hdisk1 hdisk2      --> Mirror LV datalv on PV hdisk1 and hdisk2 with 3 copies
# logform /dev/log00                    --> Format the JFS log LV log00

MODIFY LOGICAL VOLUMES
# chlv -t copy lv00                     --> Change LV lv00 type to copy (mirrored)
# chlv -n silv lv00                     --> Rename LV lv00 to silv
# chlv -p r lv00                        --> Change LV lv00 to read-only
# extendlv datalv 5                     --> Extend LV datalv by 5 logical partitions (LPs)
# reduceLV datalv                        --> Reduce LV (if supported, usually after shrinking filesystem)

REMOVE LOGICAL VOLUMES
# rmlv datalv                            --> Remove LV datalv (interactive)
# rmlv -f datalv                         --> Remove LV datalv without user intervention
# rmlvcopy datalv 2 hdisk1               --> Remove a copy of LV datalv from PV hdisk1

MISCELLANEOUS LV COMMANDS
# lsvg -l datavg                         --> Display all LV attributes (PP size, copies, type)
# lsvg -p datavg                         --> Display PVs in VG datavg and LP usage
# mirrorvg -S -m datavg hdisk2           --> Mirror all LVs in VG datavg to PV hdisk2
# unmirrorvg datavg hdisk2               --> Remove mirrored PV from VG
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX BLV / BOOT COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
VIEW BOOT SEQUENCE
# bootlist -m normal -o                  --> Display the boot sequence in normal mode
# bootlist -m service -o                 --> Display the boot sequence in service mode
# bootlist -m normal cd0 hdisk0          --> Set normal mode boot sequence to cd0, hdisk0
# bootlist -m service cd0 rmt0 hdisk0    --> Set service mode boot sequence to cd0, rmt0, hdisk0

CREATE / MANAGE BOOT IMAGE
# bosboot -ad /dev/hdisk1                --> Create a boot image on PV hdisk1
# mkboot -cd /dev/hdisk1                 --> Clear boot image on PV hdisk1
# bootinfo -b                             --> Display bootable disk
# bootinfo -t                             --> Display type of boot (network, disk, tape)
# bootinfo -e                             --> Check if machine can boot from tape
# bootinfo -T                             --> Display machine hardware type
# bootinfo -s hdisk0                      --> Display size of hdisk0
# bootinfo -r                             --> Display memory size
# bootinfo -k                             --> Display key position of the machine
# bootinfo -m                             --> Display machine model code
# bootinfo -o hdisk0                      --> Display location code of hdisk0
# bootinfo -z                             --> Check if machine is multiprocessor capable
# bootinfo -p                             --> Display processor information

ADDITIONAL BOOT MANAGEMENT
# bootlist -m normal                       --> List current boot devices in normal mode
# bootlist -m service                      --> List current boot devices in service mode
# bosboot -ad -v /dev/hdisk1               --> Create verbose boot image on hdisk1
# bootinfo -L /dev/hdisk0                  --> Display boot logical volume info
# bootinfo -u /dev/hdisk0                  --> Display unique device characteristics
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX PAGING SPACE COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
LIST PAGING SPACE
# lsps -a                           --> List all paging spaces
# lsps hd6                           --> Display details of paging space hd6
# lsps -s                             --> Display total and free size of all paging spaces
# lsps -f                             --> Show free space in each paging space
# swap -s                              --> Show current swap usage summary

CREATE PAGING SPACE
# mkps -a -n -s4 datavg               --> Create a paging space on VG datavg with size 4 LPs, activate immediately (-n), and set to activate at every restart
# mkps -s 64 -n datavg                 --> Create paging space of 64 LPs on VG datavg and activate immediately

MODIFY PAGING SPACE
# chps -a y paging00                   --> Activate paging space paging00
# chps -a n paging00                   --> Deactivate paging space paging00
# chps -s 4 paging00                   --> Increase size of paging space paging00 by 4 LPs
# chps -s +4 paging00                  --> Add 4 LPs to existing paging space

REMOVE PAGING SPACE
# rmps paging00                         --> Remove paging space paging00

SWAP MANAGEMENT
# swapon -a                             --> Activate all entries in /etc/swapspaces
# swapon /dev/paging00                  --> Activate specific paging space /dev/paging00
# swapoff /dev/paging00                 --> Deactivate specific paging space
# swap -l                               --> Display swap usage information
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX SYSTEM DUMP COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
LIST DUMP CONFIGURATION
# sysdumpdev -l                          --> List current dump device
# sysdumpdev -L                          --> List details of previous system dump
# sysdumpdev -v                          --> Display verbose information about dump device
# sysdumpdev -a                          --> Show all dump devices and settings

START SYSTEM DUMP
# sysdumpstart -p                        --> Start system dump on primary dump device
# sysdumpstart -s                        --> Start system dump on secondary dump device
# sysdumpstart -f /path/dumpfile         --> Start dump to a specified file/device

CONFIGURE DUMP DEVICE
# sysdumpdev -p /dev/lv00                --> Set lv00 as primary dump device (temporary until reboot)
# sysdumpdev -P -p /dev/lv00             --> Set lv00 as primary dump device permanently
# sysdumpdev -s /dev/rmt0                --> Set rmt0 as secondary dump device
# sysdumpdev -d                          --> Delete current dump device configuration

MONITOR / CHECK DUMP
# sysdumpdev -z                          --> Determine if a new system dump has occurred
# errpt -a                                --> Check detailed system errors that may trigger dumps
# dump -Tv /dev/lv00                      --> View contents of dump for verification
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX DEVICES COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
CONFIGURE DEVICES
# cfgmgr                                --> Configure all devices and install device software
# cfgmgr -l vscsi0                       --> Configure devices/components connected to vscsi0 interface

DISPLAY DEVICE INFORMATION
# lscfg                                  --> Display configuration, diagnostics, and VPD info
# lscfg -l mem0                           --> Display info about device mem0
# lscfg -l ent*                           --> Display info about all Ethernet adapters
# lscfg -v                                --> Display VPD (Vital Product Data) of all devices
# lscfg -v -l hdisk0                       --> Display VPD of device hdisk0
# lsdev -P                                --> List all supported devices
# lsdev -P -c disk                         --> List all supported disk devices
# lsdev -P -r class                         --> Display all supported classes
# lsdev -P -r subclass                      --> Display all supported subclasses
# lsdev -C                                --> List all configured devices
# lsdev -C -l mem0                         --> Display properties of configured device mem0

CREATE / ACTIVATE DEVICES
# mkdev -l rmt0                            --> Change device rmt0 from defined to available state
# mknod /dev/null c 2 2                     --> Create /dev/null char device with major 2 and minor 2

MODIFY DEVICE ATTRIBUTES
# chdev -l sys0 -a maxproc=100             --> Change default maxproc value to 100
# chdev -l rmt0 -a blocksize=512           --> Change block size of rmt0 to 512
# chdev -l rmt0 -a ret=no                  --> Disable tape retention for rmt0

REMOVE / STOP DEVICES
# rmdev -l rmt0                             --> Remove device rmt0 from configuration
# rmdev -d -l rmt0                          --> Remove device rmt0 completely from ODM database
# rmdev -l rmt0 -S                           --> Stop device rmt0 (change state to stopped)

DEVICE HIERARCHY & CONNECTIONS
# lsparent -C -k rs232                       --> Display possible parent devices accepting rs232 devices
# lsparent -C -l hdisk0                       --> Display parent devices accepting hdisk0 as child
# lsconn -p scsi0                             --> List all possible connections for scsi0 interface

DEVICE ATTRIBUTES
# lsattr -Dl rmt0                             --> Show default attribute values of device rmt0
# lsattr -El rmt0                             --> Show current attribute values of device rmt0
# lsattr -El tty0 -a login -R                 --> Show all possible values of 'login' attribute of tty0

MISCELLANEOUS DEVICE COMMANDS
# lvlstmajor                                  --> List available major device numbers
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX CONSOLE COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
LIST CONSOLES
# lscons                               --> List the current system console(s)
# lscons -b                            --> List the console to be used at next system boot

CHANGE / REDIRECT CONSOLE
# chcons /dev/tty3                      --> Change the system console to /dev/tty3
# chcons -a login=enable /dev/tty3      --> Redirect console to /dev/tty3 and enable login prompt
# swcons /dev/tty3                       --> Temporarily switch the system console to /dev/tty3

VIEW CONSOLE LOGS
# alog -L -t console                     --> Show current attributes of log type 'console'
# alog -t console -o                      --> Display console messages (historical logs)
# alog -t boot -o                         --> Display boot-time messages
# alog -t console -s "start_date" -e "end_date" --> Display console messages within date range

ADDITIONAL CONSOLE MANAGEMENT
# condev -l                               --> List all console devices (if installed)
# condev -C /dev/tty3                     --> Configure /dev/tty3 as console device
# errpt -t H -s console                    --> View hardware errors related to console
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX INSTALLATION COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
LIST INSTALLED FILE SETS
# lslpp -l                              --> Display details of all installed filesets
# lslpp -ha bos.net.*                     --> Show installation history of all filesets in bos.net packages
# lslpp -f bos.rte                        --> List all files contained in bos.rte package
# lslpp -w /etc/hosts                      --> Find which fileset contains /etc/hosts
# lslpp -p bos.net.nfs.server              --> Display prerequisites for bos.net.nfs.server fileset

INSTALL SOFTWARE
# installp -L -d /dev/rmt0.1              --> List installable products on device rmt0
# installp -aX -d /dev/rmt0.1 bos.net      --> Install all filesets within bos.net and expand file systems if required
# instfix -k IX8888 -d /dev/rmt0.1         --> Install fix associated with IX8888 from device rmt0

REMOVE OR REJECT SOFTWARE
# installp -u bos.net                       --> Remove the bos.net fileset
# installp -r                               --> Reject the applied software

VERIFY / COMMIT SOFTWARE
# installp -c -f <product>                  --> Commit the installed <product>
# installp -C                                --> Cleanup an incomplete or failed installation
# lppchk -c <product>                        --> Check integrity of installed <product>
# instfix -ik IX8888                          --> Verify that fix IX8888 is installed
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX NETWORKING COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
HOST / NAME RESOLUTION
# host 193.10.10.190                     --> Resolve IP address to host name (from /etc/hosts or DNS)
# host ibmaixhost                         --> Resolve host name to IP address (from /etc/hosts or DNS)
# hostname ibmaixhost                     --> Temporarily change the hostname to ibmaixhost
# chdev -l inet0 -a hostname=ibmaixhost  --> Change hostname permanently

ETHERNET DEVICE STATUS
# entstat en0                              --> Display status of Ethernet device en0
# entstat -d en0                            --> Display detailed status of Ethernet device en0

NETWORK ATTRIBUTES
# no -a                                     --> List all configurable network attributes and their current values
# no -d thewall                             --> Reset network attribute 'thewall' to default
# no -o ipforwarding=1                       --> Enable IP forwarding (make machine act as a router)

INTERFACE CONFIGURATION
# ifconfig -a                               --> Show status of all network interfaces
# ifconfig en0                               --> Show status of interface en0
# ifconfig en0 up                            --> Activate network card en0
# ifconfig en0 down                          --> Deactivate network card en0
# ifconfig en0 detach                        --> Remove en0 from network interface list
# ifconfig en0 inet 194.35.52.1 netmask 255.255.255.0 up --> Configure IP and activate en0 immediately
# ifconfig en0 alias 193.10.10.191          --> Create an alias IP address for en0

ROUTING
# route add 0 193.10.10.1                   --> Set default gateway to 193.10.10.1
# route add 192.100.12.0 192.100.13.7      --> Set 192.100.13.7 as gateway for network 192.100.12.0
# route -f                                  --> Clear all entries from the routing table

NETWORK STATISTICS
# netstat -a                                --> Show state of all sockets
# netstat -c                                --> Display network buffer cache
# netstat -D                                --> Show dropped packets statistics
# netstat -i                                --> Display interface statistics
# netstat -r                                --> Show routing table (hostnames)
# netstat -rn                               --> Show routing table (IP addresses instead of hostnames)
# netstat -s                                --> Show protocol statistics
# netstat -s -p <tcp/udp/ipv6>             --> Show statistics for a specific protocol

DIAGNOSTICS & TRACE
# ping ibmaixhost                           --> Test network connectivity to ibmaixhost
# traceroute ibmaixhost                      --> Trace the route packets take to ibmaixhost
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX SPACE USAGE COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
DISK USAGE (DIRECTORIES / FILES)
# du -k                                    --> Display disk usage in 1 KB blocks for files/directories
# du -l                                    --> Display disk usage in 512-byte blocks
# du -s                                    --> Display only the total disk usage of the current directory
# du -sh                                   --> Display total usage in human-readable format (KB/MB/GB)

FILE SYSTEM / INODE USAGE
# df -i                                    --> Display number of free and used inodes per filesystem
# df -k                                    --> Display disk space usage in 1024-byte (1 KB) blocks
# df -m                                    --> Display disk space usage in megabytes
# df -g                                    --> Display disk space usage in gigabytes
# df -h                                    --> Display disk usage in human-readable format
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX BACKUP COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
SYSTEM BACKUP (ROOTVG / FULL SYSTEM)
# mksysb -i -X /dev/rmt0                   --> Create image.data and full system backup (-X expands /tmp if required)
# mksysb -m /dev/rmt0                       --> Create system backup with map file (image.data)
# mksysb -e /dev/rmt0                       --> Create system backup excluding files in /etc/exclude.rootvg
# mkszfile                                  --> Creates /image.data file for backup
# mkcd -d /dev/cd1                           --> Create system boot backup to CD-R /dev/cd1
# mkcd -d /dev/cd1 -v vg00                  --> Backup VG vg00 to CD-R /dev/cd1
# mkcd -d /dev/cd1 -G                        --> Create generic boot backup

VOLUME GROUP BACKUP
# savevg -i -f /dev/rmt0 vg00              --> Create VG image file vg00.data and backup vg00
# savevg -ef /dev/rmt0 vg00                 --> Backup VG vg00 excluding files listed in /etc/exclude.vg00

DIRECTORY / FILE BACKUP
# find / -print | backup -ivf /dev/rmt0    --> Backup entire filesystem to rmt0
# backup -0vf /dev/rmt0 /home               --> Backup /home with level 0 to rmt0
# restore -Tvf /dev/rmt0                     --> List archive contents in rmt0
# restore -xvf /dev/rmt0 /home               --> Restore /home from archive in rmt0

CPIO BACKUP
# find ./home -print | cpio -ocvumB > /dev/rmt0  --> Archive /home directory to rmt0
# cpio -icvdumB < /dev/rmt0                    --> Restore cpio archive from rmt0
# cpio -ivt < /dev/rmt0                         --> List contents of cpio archive
# cpio -icvd < /dev/rmt0 /home                  --> Restore /home directory from cpio archive

TAR BACKUP
# tar -cvf /dev/rmt0 /home                      --> Archive /home to rmt0
# tar -tvf /dev/rmt0                             --> List tar archive contents in rmt0
# tar -xvf /dev/rmt0 /home                       --> Extract /home from tar archive

BLOCK COPY / CONVERSION
# dd if=si of=si1 conv=ebcdic                   --> Convert ASCII file si to EBCDIC si1
# dd if=/dev/rmt0 ibs=512 obs=1024 of=/dev/rmt1 --> Copy tape blocks from rmt0 to rmt1 with different block sizes

TAPE DEVICE MANAGEMENT
# tctl -f /dev/rmt0 rewind                       --> Rewind the tape
# tctl -f /dev/rmt0 offline                      --> Eject the tape
# tctl -f /dev/rmt0 status                       --> Show status of tape device
# chdev -l rmt0 -a block_size=512               --> Set block size of tape device rmt0 to 512
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX PRINT COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
QUEUE STATUS
# qchk -q                                   --> Display the default print queue
# qchk -P lp0                               --> Display the status of printer queue lp0
# qchk -# 123                               --> Display the status of print job number 123
# qchk -A                                   --> Display the status of all print queues
# lpstat                                    --> Display the status of all queues
# lpstat -p lp0                              --> Display the status of print queue lp0
# lpstat -u root                             --> Display all jobs submitted by user root
# lpq -P lp0                                 --> Display status of queue lp0

JOB MANAGEMENT
# qcan -x 123                               --> Cancel print job 123
# qcan -X -P lp0                             --> Cancel all jobs submitted to lp0
# qpri -#570 -a 25                           --> Change the priority of job #570 to 25
# qhld #569                                  --> Hold job #569
# qhld -r -#569                              --> Release hold from job #569
# qmov -m lpa -#11                           --> Move job #11 to queue 'lpa'
# cancel -#111                               --> Cancel job #111
# QUEUE CONTROL
# enable psq                                 --> Enable print queue 'psq'
# disable psq                                --> Disable print queue 'psq'

SYSTEM ACTIVITY RELATED TO PRINT
# last                                       --> List all login/logout/shutdown records from /var/adm/wtmp
# last | grep shutdown                        --> Display only shutdown sessions
# uptime (or w -u)                            --> Show how long the system has been up and load average
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX LICENSING COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
OPERATING SYSTEM AND LICENSE STATUS
# oslevel                                  --> Display the current AIX operating system level
# lslicense                                --> Display the number and type of installed licenses

MODIFY LICENSES
# chlicense -u30                            --> Set the fixed user license count to 30
# chlicense -f on                           --> Enable floating user license
# chlicense -f off                          --> Disable floating user license
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX NIM COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
NIM CONFIGURATION
# nimconfig -a pif_name=en0 -a netname=net1           --> Initialize NIM master with network name 'net1'
# nimconfig -r                                      --> Rebuild /etc/niminfo file containing NIM variables

RESOURCE DEFINITION
# nim -o define -t lpp_source -a source=/dev/cd0 -a server=master -a location=/export/lpp_source/lpp_source1 lpp_source1  --> Define LPP source lpp_source1 from /dev/cd0
# nim -o define -t mksysb -a server=master -a location=/resources/mksysb.image mksysb1    --> Define mksysb resource mksysb1
# nim -o define -t standalone -a platform=rspc -a if1="net1 dcmds xxxxx" -a cable_type1=bnc dcmds  --> Define standalone machine dcmds with platform rspc, network net1, cable BNC, MAC xxxxx

RESOURCE MANAGEMENT
# nim -o remove inst_resource                         --> Remove resource inst_resource
# nim -o check lpp_source1                             --> Check status of LPP source lpp_source1
# nim -o allocate -a spot=spot1 -a lpp_source=lpp_source1 node1
                                                    --> Allocate resources spot1 and lpp_source1 to client node1
# nim -o allocate -a spot=spot1 dcmds                 --> Allocate resource spot1 to machine dcmds
# nim -o deallocate -a spot=spot1 dcmds               --> Deallocate resource spot1 from machine dcmds
# nim -o remove dcmds                                  --> Remove machine dcmds after removing all resources

CLIENT OPERATIONS
# nim -o bos_inst node1                                --> Initialize NIM for BOS installation on node1
# nim -o dkls_init dcmds                               --> Initialize dcmds as diskless client
# nim -o dtls_init dcmds                               --> Initialize dcmds as dataless client
# nim -o cust dcmds                                    --> Initialize dcmds for customize operation
# nim -o diag dcmds                                    --> Initialize dcmds for diagnostic operation
# nim -o maint dcmds                                   --> Initialize dcmds for maintenance operation
# nim -o reboot dcmds                                  --> Reboot client machine dcmds
# nim -o unconfig master                               --> Unconfigure NIM master 'master'

LPP SOURCE MANAGEMENT
# nim -o define -t lpp_source -a location=/software/lpp1 -a server=master -a source=/dev/cd0 lpp1
                                                    --> Define LPP source lpp1 in /software/lpp1 from /dev/cd0

LISTING NIM OBJECTS AND RESOURCES
# lsnim                                                --> List all NIM resources
# lsnim -l dcmds                                      --> Display detailed information about object dcmds
# lsnim -O dcmds                                      --> List operations supported by object dcmds
# lsnim -c resources dcmds                             --> List resources allocated to machine dcmds

NIM CLIENT
# nimclient                                           --> Client-side version of NIM command (same functionality as server)
----------------------------------------------------------------------------------------------------------------------------------
IBM HMC Commands
----------------------------------------------------------------------------------------------------------------------------------
System and LPAR Information
# lssyscfg -r sys -F name     --> List names of all managed systems (useful for other commands)
# lssyscfg -m <sys> -r lpar     --> General info of LPARs on the managed system
# lssyscfg -m <sys> -r prof     --> Lists all settings in LPAR profiles on the managed system
# lssyscfg -m <sys> -r lpar -F name,state --header     --> Lists LPARs and whether they are activated
# lssyscfg -m <sys> -r prof -F lpar_name,virtual_eth_adapters     --> Lists LPARs with virtual ethernet adapters
# lssyscfg -m <sys> -r prof --filter "lpar_names=<lpar>" -F name,virtual_fc_adapters     --> Lists vFC adapters (with WWPN) of an LPAR

Hardware Resources (lshwres)
Physical I/O
# lshwres -m <sys> -r io --rsubtype slot/slotchildren     --> Shows IO slot information or children devices of slots

Memory and CPU
# lshwres -m <sys> -r mem/proc --level lpar/sys     --> Shows memory/CPU info for all LPARs or the managed system

Virtual I/O
# lshwres -m <sys> -r virtualio --rsubtype vswitch     --> Shows virtual switches with VLAN IDs
# lshwres -m <sys> -r virtualio --rsubtype eth --level lpar     --> Shows virtual ethernet adapters with slot_id, vlan_id
# lshwres -m <sys> -r virtualio --rsubtype fc --level lpar     --> Shows virtual FC adapters with WWPNs 
# lshwres -m <sys> -r virtualio --rsubtype scsi --level lpar     --> Shows virtual SCSI adapters

SR-IOV
# lshwres -m <sys> -r sriov --rsubtype physport --level ethc     --> Lists physical port config: location, speed, MTU
# lshwres -m <sys> -r sriov --rsubtype logport --level eth     --> Lists logical port config: MAC, capacity, VLANs
# chhwres -m <sys> -r sriov --rsubtype physport -o s -a "adapter_id=1,phys_port_id=1,conn_speed=10000"     --> Change physical port configuration

System and LPAR Power Control
# chsysstate -m <sys> -o standby -r sys     --> Power on a system to standby
# chsysstate -m <sys> -r sys -o off normal     --> Power off the managed system
# chsysstate -m <sys> -r sys -o off --immed     --> Immediate power off
# chsysstate -m <sys> -r lpar -n <lpar> -o shutdown --restart     --> Reboot LPAR with dump
# chsysstate -m <sys> -r lpar -n <lpar> -o shutdown --immed --restart     --> Immediate reboot without dump
# chsysstate -m <sys> -r lpar -n <lpar> -o on -f default     --> Activate LPAR

Migration Commands
# migrlpar     --> Perform LPAR migrations
# lslparmigr -m <sys> -r lpar     --> List LPARs and migration state
# lslparmigr -r sys -m <managed_system> | sed "s/,/\n/g"     --> Shows number of concurrent migrations possible

Network and VLAN Management
# lsnportlogin -m <sys> --filter "lpar_names=<lpar>"     --> List all NPIV WWPN info of an LPAR
# chhwres -r virtualio --rsubtype eth -m <sys> -o s -p <LPAR> -s <adapter id> -a "addl_vlan_ids+=<VLAN TAG>"     --> Add VLAN tag dynamically (does not update profile)
# chhwres -r virtualio --rsubtype eth -m <sys> -o s -p <LPAR> -s <adapter id> -a "addl_vlan_ids-=<VLAN TAG>"     --> Remove VLAN tag dynamically

LPAR Weight Management
# lshwres -r proc -m <sys> --level lpar --filter lpar_names=<LPAR>     --> List actual running configuration
# chhwres -r proc -m <sys> -p <LPAR> -o s -a "uncap_weight=32"     --> Change running configuration weight
# lssyscfg -r prof -m <sys> --filter lpar_names=<LPAR>     --> List profile
# chsyscfg -r prof -m <sys> -i "name=<PROFILE_NAME>,lpar_name=<LPAR>,uncap_weight=32"     --> Change weight in profile

Other Useful HMC Commands
# lssacfg -t email                  --> Show email notification settings
# lssysconn -r all                   --> Show HMC-assigned IPs
# mksysconn -o auto                  --> Rediscover all server IP addresses
# lssvcevents -t console -d 60      --> List console events last 60 days
# lssvcevents -t hardware -d 0      --> List serviceable events today
# lssvcevents -t console -d 300 | grep DLPAR
                                    --> List DLPAR operations
# lssvcevents -t console -d 7 | grep Migration
                                    --> List last 7 days LPM events
# lshmc -V                           --> HMC version
# lshmv -v                           --> HMC model
# lshmc -n                           --> HMC network settings
# hmcshutdown -t now -r              --> Reboot HMC
# lslogon -r webui -u                --> List users logged into web 

GUI
# lslogon -r ssh -u                   --> List users logged into CLI
# termtask -r {webgui|ssh} -s <session> -t <task>
                                    --> Terminate a running task
# monhmc -r mem -n 0                 --> Show HMC memory usage
# monhmc -r disk -n 0                --> Show HMC filesystems and usage
# monhmc -r proc -n 0                --> Show CPU usage per processor
# monhmc -r swap -n 0                --> Show paging space usage
# sendfile                           --> Transfer files via FTP from 

HMC
# vtmenu                             --> Open HMC menu options / console session
8. Virtual Terminal
# mkvterm -m <managed system> -p <lpar>   --> Open a virtual terminal to LPAR
# rmvterm -m <managed system> -p <lpar>   --> Close virtual terminal
----------------------------------------------------------------------------------------------------------------------------------
IBM POWERHA / HACMP COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
LOG FILES
/var/hacmp/adm/cluster.log → Main PowerHA log file (errors, events, messages).
/var/hacmp/adm/history/cluster.mmddyy → Shows only daily EVENTS.
/var/hacmp/log/clinfo.log → Activity of the clinfo daemon.
/var/hacmp/log/clstrmgr.debug → Debug info about the cluster (used by IBM support).
/var/hacmp/log/clutils.log → Summary of nightly verification.
/var/hacmp/log/cspoc.log → Info from smitty c-spoc.
/var/hacmp/log/hacmp.out → Detailed script output (similar to cluster.log).
/var/hacmp/log/loganalyzer/loganalyzer.log → Log analyzer outputs.
/var/hacmp/clverify → Verification results.
/var/log/clcomd/clcomd.log → Node connect requests and return statuses.
/var/ha/log → RSCT logs.
/var/ha/log/nim.topsvcs... → Heartbeat logs (communication OK between nodes).

ODM & CONFIGURATION
odmget HACMPlogs → Show locations of HACMP log files.
odmget HACMPcluster → Display cluster version.
odmget HACMPnode → Display node info and cluster version.
/etc/es/objrepos → HACMP ODM files location.

RESOURCE GROUPS (RG)
clRGinfo → Show state of resource groups.
clRGinfo -p → Node with temporarily highest priority (POL).
clRGinfo -t → Show delayed timer information.
clRGinfo -m → Show application monitors’ status (online, offline, acquiring, releasing, error, unknown).
clRGinfo -a | awk '{print $1,$2}' | grep -E -v 'denied|error' → List resource group names and types.
clRGinfo -s | grep -E -v 'denied|error' → More info about resource groups.
clfindres -s | grep -E -v 'denied|error' → Alternative command for resource group info.
clshowres → Detailed resource group info.
clshowres | grep -E 'Resource Group Name|Volume' ... → Get volume groups associated with RGs.
clstat -o | grep 'Resource Group' ... → Show state of resource groups.
clRGmove -g <RG> -n <node> -m → Move RG to another node.
clRGmove -g <RG> -n <node> -d → Bring RG down.
clRGmove -g <RG> -n <node> -u → Bring RG up.

CLUSTER STATUS & INFORMATION
cldump or clstat -o → Real-time cluster status.
cldisp → General cluster info (not real-time).
cltopinfo → Network info (from DCD).
cltopinfo -i → Overview of cluster interfaces.
cltopinfo -m → Heartbeat statistics (PowerHA 7.1: -m not available).
cllsnode → List cluster node names.
cltopinfo -n → Get cluster node names.
clstat -o | grep -i 'Node:' ... → Get cluster node states.
lscluster -m → Node configuration and state.

DAEMON & SERVICE STATUS
clshowsrv -v → Show status of cluster daemons.
lssrc -g cluster → List running cluster daemons.
lssrc -ls clstrmgrES → Check cluster stability, dynamic node priority.
lssrc -ls topsvcs → Status of diskhb devices, heartbeat intervals, failure cycle.
lssrc -ls grpsvcs → Connected clients info, number of groups.
lssrc -ls emsvcs → Resource monitors in event management.
lssrc -ls snmpd → SNMP daemon info.

CLUSTER MANAGEMENT
mkcluster → Create a CAA cluster.
chcluster → Change cluster configuration.
rmcluster → Remove cluster configuration.
clcmd <command> → Run command on all nodes (e.g., clcmd date).
cl_ping → Ping all adapters of nodes (cl_ping -w 2 node1 node2).
cldiag → Troubleshoot cluster (cldiag debug clstrmgr -l 5).
cldiags vgs -h nodeA nodeB → Check shared VG definitions between nodes.
clmgr offline cluster WHEN=now MANAGE=offline STOP_CAA=yes → Stop cluster and CAA for maintenance.
clmgr view report cluster TYPE=html FILE=/tmp/powerha.report → Create HTML cluster report.
clanalyze -a -p "diskfailure" → Analyze PowerHA logs for failures.
lvlstmajor → List available major numbers for cluster nodes.

NODE & REPOSITORY MANAGEMENT
get_local_nodename → Show local node name in cluster.
clexit.rc → Halt node if cluster manager stops incorrectly.
clmgr modify cluster caa_cl REPOSITORY=hdiskX → Replace repository disk.
clmgr verify cluster CHANGES_ONLY=yes SYNC=yes → Verify and synchronize cluster.
/usr/sbin/lscluster -d → Verify repository disk after sync.

LICENSE & VERSION
lslpp -l cluster.license → Get cluster license and version.
lslpp -l cluster.license | awk '{$1=$2=$3=""; print $0}' ... → Software label version.
lslpp -Lqc cluster.es.server.rte | cut -d: -f3 → PowerHA version.

SCRIPTS & APPLICATION MANAGEMENT
cllsserv → Show which scripts run during takeover.
cllsserv | grep <app> → Locate application start/stop scripts.
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX GPFS COMMANDS
----------------------------------------------------------------------------------------------------------------------------------
CLUSTER CONFIGURATION
mmlsconfig → Show GPFS version.
mmlscluster → List cluster configuration.
mmaddnode -N <nodefile> → Add node(s) to the cluster.
mmdelnode -N <node> → Remove node(s) from the cluster.
mmlsnode → List all nodes.
mmlsnode -L → Show detailed node information.
mmchnode -N <node> -a <attribute=value> → Change node attributes.
mmchconfig <parameter>=<value> → Change a configuration parameter.
mmlsconfig > /tmp/gpfs_config.txt → Export current configuration to a file.

CLUSTER SERVICES
mmstartup -a → Start GPFS on all nodes.
mmshutdown -a → Stop GPFS on all nodes.
mmgetstate -a → Check GPFS cluster status.
mmgetstate -N <node> → Check GPFS status on a specific node.
mmgetstate -aL → Check status of GPFS daemons.
mmshutdown -N <node> -f → Force GPFS stop on a node.

FILESYSTEM MANAGEMENT
mmlsfs all → List all GPFS filesystems.
mmlsfs <fsname> → Show specific filesystem information.
mmcrfs <Device> -F <stanzaFile> -A yes -T /mountpoint → Create a new filesystem.
mmmount <fsname> -a → Mount filesystem on all nodes.
mmumount <fsname> -a → Unmount filesystem on all nodes.
mmlsmount all -L → Check mount status.
mmdelfs <fsname> → Delete filesystem.

DISKS & STORAGE POOLS
mmlsdisk all -L → List all disks.
mmlsdisk <fsname> -L → Show disks for specific filesystem.
mmadddisk <fsname> <diskdesc> -r <pool> → Add disk(s) to a pool.
mmdeldisk <fsname> <disk> → Remove disk(s) from filesystem.
mmchdisk <fsname> <disk> <options> → Change disk attributes.
mmdf <fsname> → Check disk usage.
mmlspool <fsname> → Display storage pool information.

QUOTA MANAGEMENT
mmquotaon <fsname> → Enable quotas.
mmquotaoff <fsname> → Disable quotas.
mmlsquota -j all → Check quota status.
mmsetquota -u <user>:<fsname> --block <limit> → Set user quota.
mmsetquota -g <group>:<fsname> --block <limit> → Set group quota.
mmlsquota -a -j all → Display all quotas.

NSD (NETWORK SHARED DISK) MANAGEMENT
mmlsnsd → List NSDs.
mmcrnsd -F <nsdfile> → Define NSD file.
mmadddisk <fsname> -F <nsdfile> → Add NSD to filesystem.
mmdelnsd -F <nsdfile> → Delete NSD.
mmchdisk <fsname> -d <NSD> <options> → Change NSD attributes.

MONITORING & DIAGNOSTICS
mmgetstate -a → Cluster status summary.
mmdf <fsname> → View filesystem usage.
mmlslog -g → View GPFS event logs.
mmhealth node show -a → Check cluster health.
mmperfmon query → Check performance metrics.
mmtracelog show → View trace logs.
mmtracelog clear → Clear trace logs.
mmfsadm dump → Collect diagnostic data.

CLUSTER ROLES & TOKENS
mmlscluster -roles → View node roles.
mmchconfig minQuorumNodes=<n> → Change quorum node.
mmlscluster -r → Check token manager information.

MAINTENANCE COMMANDS
mmfsck <fsname> → Run filesystem check.
mmdefragfs <fsname> → Run filesystem defragmentation.
mmchfs <fsname> -T <param=value> → Tune filesystem parameters.
mmsnap create <fsname> <snapshot> → Create filesystem snapshot.
mmsnap delete <fsname> <snapshot> → Delete snapshot.

SNAPSHOT MANAGEMENT
mmlssnapshot <fsname> → List snapshots.
mmcrsnapshot <fsname> <snapshot_name> → Create snapshot.
mmdelsnapshot <fsname> <snapshot_name> → Delete snapshot.
mmapplypolicy -P restore.policy <fsname> → Restore from snapshot.

USEFUL ONE-LINERS
mmlscluster; mmlsnode; mmgetstate -a → Check GPFS cluster summary.
mmdf all → Show disk usage summary.
mmlsnsd -m → Verify NSD mapping.
mmcheck config → Verify GPFS configuration consistency.

LOG LOCATIONS
/var/adm/ras/mmfs.log.latest → GPFS daemon logs.
/var/adm/ras/mmfs.log.* → GPFS kernel logs.
/var/mmfs/traces/ → GPFS trace logs.
/var/mmfs/gen/mmhealth.log → GPFS health monitoring logs.
----------------------------------------------------------------------------------------------------------------------------------
IBM AIX SYSTEM CONFIGURATION FILES
----------------------------------------------------------------------------------------------------------------------------------
LOGIN & ENVIRONMENT
/etc/motd → Message displayed to users after login (“message of the day”).
/etc/environment → System-wide environment variables (PATH, LANG, etc.).
/etc/profile → System-wide shell initialization (Bourne/Korn shell).
/etc/csh.cshrc → C shell system-wide initialization.
/etc/csh.login → C shell login initialization.

USER & GROUP MANAGEMENT
/etc/passwd → User accounts (username, UID, GID, home, shell).
/etc/group → Group definitions.
/etc/security/passwd → Encrypted passwords and aging data.
/etc/security/user → User-level security attributes (login restrictions, resource limits).
/etc/security/limits → CPU, memory, file limits for users/processes.
/etc/hosts.equiv → Trusted hosts for r-commands (rlogin, rsh).

NETWORK CONFIGURATION
/etc/hosts → Static hostname-to-IP mapping.
/etc/resolv.conf → DNS configuration (nameservers, domain, search).
/etc/netsvc.conf → Name resolution order (hosts=local,bind).
/etc/hostname.<interface> → Hostname for a specific network adapter (e.g., /etc/hostname.en0).
/etc/rc.net → Network startup script; configures interfaces/routes.
/etc/rc.tcpip → Starts TCP/IP daemons (inetd, telnet, ftp, SNMP).
/etc/rc.nfs → Starts NFS server/client services.
/etc/ntp.conf → NTP daemon configuration.

SYSTEM INITIALIZATION
/etc/inittab → Controls system initialization, run levels, and startup programs.
/etc/rc → Master startup script; calls lower-level rc scripts.
/etc/rc.local → Custom startup commands.
/etc/rc.shutdown → Scripts executed during shutdown.
/etc/rc.d/ → Directory for additional run-level scripts.

FILESYSTEM & STORAGE
/etc/filesystems → Local/remote filesystems, mount points, types, and options.
/etc/exports → NFS shared directories.
/etc/qconfig → Print queue configuration.
/etc/tunables/ → Kernel tunable parameters (AIX 6.1+).

DEVICE MANAGEMENT & ODM
/etc/objrepos/ → Directory containing Object Data Manager (ODM) databases.
/etc/objrepos/CuAt → Customized attributes of devices.
/etc/objrepos/PdAt → Pre-defined device attributes.
/etc/objrepos/CuDv → Customized device objects.
odmadd, odmget, odmchange → Commands to view/modify ODM database.

SERVICES & PROTOCOLS
/etc/services → Maps service names to ports and protocols (e.g., ssh 22/tcp).
/etc/protocols → Maps protocol names to numbers (TCP=6, UDP=17).
/etc/inetd.conf → Configuration for Internet super-server inetd.
/etc/rc.tcpip → Starts TCP/IP daemons like inetd, snmpd, portmap.

SECURITY & ACCESS CONTROL
/etc/security/limits → Resource limits per user/process.
/etc/security/login.cfg → Login session policies.
/etc/security/methods → Authentication methods.
/etc/hosts.equiv → Trusted hosts for r-commands.

LOG & MONITORING FILES
/var/adm/ras/errlog → AIX error log for system messages.
/var/adm/ras/ → Directory for AIX diagnostic logs.
/var/log/ → Standard log directory for system/application logs.
/etc/cron.d/ → Scheduled jobs (system).
/var/spool/cron/crontabs/ → Scheduled jobs for users.

ADDITIONAL CONFIGURATION FILES
/etc/aliases → Mail aliases (sendmail/postfix).
/etc/ssh/ssh_config → SSH client configuration.
/etc/ssh/sshd_config → SSH server configuration.
/etc/rc.secure → Optional security scripts executed at boot.

No comments:

Post a Comment