Common AIX Commands

  • fuser -ku /dev/ttynumber – Terminates all processes associated with the specified tty number (eg: tty34, tty15, etc). This is useful if a user locks in Spa and you wish to kill all processes tied to the locked terminal.
  • kill -9 <process id> – Terminates a process. <process id> is obtained from the ps -ef | grep <user id> command.
  • df -k – Display disk usage (in kilobytes).
  • lpstat -o all – Lists all print jobs that are queued or running
  • lpstat –t | more – Show the status of all the print queues
  • lpstat –t | grep <queue> – Show the status of an individual print queue
  • lptest | lp –d<queue> – Sends a test print job to the print queue
  • nslookup <queue> – Display a print queue’s IP Address.
  • nslookup <IP> – Display an IP Address’s print queue name.
  • disable <queue> – Disable a print queue
  • enable <queue> – Enable a print queue
  • cancel <print job ID> – Cancels a print job. The print job ID is obtained from the first column of the lpstat -o all command.
  • lprm –P <queue name> <job #> – To clear a job from a print queue (assumes knowing the job number)
  • qadm –X <queue name> – clear the jobs from a print queue. [probably best to take the queue down first using disable <queue name> , delete the jobs, and then bring the queue back up using enable <queue name> ]
  • lssrc -g spooler – Display status of all the spooling daemons
  • lssrc -a – List status of all subsystems
  • lsattr -El sys0 – Get Serial # and Model type (aka machine type)
  • uname -u – Get serial # –> ignore IBM + first 2 letters, rest is the S/N
  • prtconf | less – Get Sysinfo Dump
  • rpm -i <rpm file name.rpm> – Install rpm (alternate=rpm -Uih) Upgrade, install & show hash marks as the install progresses
  • ps -ef | grep ssh && kill -HUP <ssh pid from command before> – This reloads the sshd configuration
  • lscfg -vp -l fcs* – Get information on fibre card
  • lscfg -vp | grep -p "Firmware" – Gets the AIX System Firmware information
  • lslpp -l | less – List all software installed
  • ps -ef | grep -i pmon – Lists what oracle DataBases are running
  • rpm -qa – List all installed RPM’s on system
  • cat /etc/oratab – List all DBs setup (running or not)
  • cat /etc/passwd | awk -F ":" '{print $1}' – Parses the file and returns just the username
  • find . -name ERRPT\* -exec rm -f {} \; – Will search current directory for any files of pattern and delete them
  • enq -WA | grep DOWN | awk {'print "echo "$1" ; enq -UP"$1'} – This will search for multiple queues in a Downed state and bring all of them up at once !
  • pwdadm -f ADMCHG [userid] – Will force the admchange flag to be set on userid. This forces a password reset on login.
  • mount -v cdrfs -o ro /dev/cd0 /mnt/cdrom – Mount a CD-ROM filesystem into target directory
  • exportfs -av – If you just want to refresh the nfsd for changes to /etc/exports:

Set some ulimits for root:

chuser fsize=-1 fsize_hard=-1 root
chuser data=-1 data_hard=-1 root
chuser stack=-1 stack_hard=-1 root
chuser rss=-1 rss_hard=-1 root
chuser core=-1 core_hard=-1 root