AIX Commands TODO

New commands from my knowledge db... will be integrated into aixcommands

settime [ Date | -f Reffile ] File # change file mtime/atime - see also touch

/usr/lpp/diagnostics/bin/usysident [-s {normal | identify}][-l location code | -d device name]

mkinstallp [ -d BaseDirectory ] [ -T TemplateFile ] # create bff fileset

/usr/sbin/acct/nulladm /var/adm/wtmp # empty file and set perms

getconf -a

getconf DISK_SIZE /dev/hdisk0

getconf REAL_MEMORY

lppchk -c Fileset # verify checksums

lppchk -c "*" # check all filesets for checksums

rmyp [ -c | -s ] # remove NIS client / server configuration

fdpr

fsdb Filesystem # interactive FS debugger

filemon

get_config -l dar# # DS4k arrays?

lspcmcfg [[-d DiskClass | hdiskX ]] # list FC disks and corresponding paths, LVs

pppdial -f Chatfile # PPP dialer

pppattachd # PPP daemon (client and server)

termdef -c # number of colums in the terminal

termdef -l # number of lines in the terminal

termdef -t # terminal type

mkcd # create bootable CD/DVD or image

mkcd -e -I Imagedir -L -S # example: use exclude file, make only a DVD image

mkdvd -cRSY -C [targetdir] -M [targetdir] -I [targetdir]

-c # don't compress

-C cdfs_dir (/mkcd/cd_fs)

-M mksysb_dir (/mkcd/mksysb_image)

-I image_dir (/mkcd/cd_images)

-R # don't delete images

-S # don't burn

-e # exclude /etc/exclude.rootvg

/usr/lib/methods/showled 0x000 Message # show LED

lssec -f /etc/security/login.cfg -s usw -a ALL

#

#

usr/lpp/diagnostics/bin/usysfault -s normal [-l location code | -d device name]

lsslot -c [ pci | phb | slot ]

dumpctrl -P ldmpoff # turn off livedump permanently

dumpctrl -qs # query system dump attributes

# dspcat -g /usr/lib/nls/msg/en_US/telnetd.cat > /tmp/telnetd.msg

# gencat /tmp/telnetd.cat /tmp/telnetd.msg

saveodms - restodms # save / restore ODM VPD information

mkwpar -h wpartest -l -n wpartest -P -r -s -w -o mkwpar.wpartest -R CPU=10%-20%,50% memory=10%-20%,50% totalProcesses=250

mkwpar -f mkwpar.wpartest

swvpdmgr -w Fileset # Mark fileset manageable by workload partitions, @Global!

ff # 'find files' - similar to 'find'

hpmstat [Interval] # hardware performance metrics

ls-secldapclntd # show ldap status

cdmount/cdumount # if cdromd is running

#

syscorepath [ -g | -p Path ] #

dircmp [ -s ] Directory1 Directory2 # compare directory contents

dosformat/dosread/dosdir/doswrite # manipulate DOS files (on a floppy)

efsenable -a # enable Encrypted FS usage on a system (implies AIX 6.1 / enabled RBAC)

efsmgr -e File/Dir -c Crypt # enable EFS for File

efsmgr -l File # list EFS

efsmgr -a File -u User -g Group # add access for users/groups

efsmgr -s -E Dir # extend EFS for a filesystem

bffcreate -c -d Dir # convert update filesets to their actual names

bffcreate -d $DIR_WITH_UPDATES -t $TARGET_DIR all # extract/rename update images

udfcreate

umountall [ -F Type | -r | -l | -k ] # umount all filesystems: -r: remote; -l: local; -k: force

procfiles -n PID # list files opened by PID

prtconf -c # CPU type = bootinfo -y

prtconf -k # kernel bits = bootinfo -k

prtconf -L # LPAR ID = uname -L

prtconf -m # memory size

prtconf -s # CPU speed

listdgrp Group # list devices by group ~ lsdev -Cc Class

switch.prt -d | -s AIX | SystemV # display/change current print subsystem

procwdx PID # show CWD of a process

wlmcntrl -q # check WLM status

setclock TimeServer # sync with ntp server

startsrc -s sendmail -a "-bd -q30" # start sendmail with srcmstr

last [ User | reboot ]

last -t MMDDhhmm

strace # prints STREAMS (System V character device framework) trace messages; nothing to do with 'linux strace'!

pcmpath [disable|enable|set|query]

swap -l # equivalent of 'lsps -a'

swap -s # total/used/free blocks of paging space

bosdebug -M # activate MODS (memory overlay detection system)

bosdebug -L # list options of MODS

sysdumpdev -z # show dump size if new dump is present

savecore [-f] -d Directory # save system dump

setclock [Timeserver] # show or (if run as root) sync clock with the timeserver

shutdown -m # boot to maintenance (single user) mode

shutdown -F # don't wait for users/don't wall message

shutdown -k # send only message about shutdown

reboot # reboot the system, disrespecting other logins

reboot -q # immediate reboot without kill or sync

halt # halt the system, disrespecting other logins

halt -q # immediate shutdown without kill or sync; classic method for avoiding cluster takeover

lslpp -d Fileset # show dependents

lslpp -i Fileset # show product information: vendor code, product id, feature id

lslpp -p Fileset # show prerequisites (dependencies)

emgr -pe FixFile # preview install

lsvp -a # list IBM ESS (Shark) vpaths

lsvpcfg # list ESS vpath configuration (device names)

datapath query adapter # show FC adapters

datapath query device # show ESS LUNs and adapters

mkvgdata VGName # create data file (image.data) for use with savevg/restvg

mkvgdata -m VGName # create data file with PV/LV mappings (separate map files)

fileplace [-v] File # show file placement (location) in the LV

fileplace -p [-v] File # show file placement in the PV

snmpv3_ssw -1 # switch from SNMP v3 to SNMP v1

/etc/snmpd.conf # snmpd v1 configuration

/etc/snmpdv3.conf # snmpd v3 configuration

auditstream | auditpr -t0 -heRl # read the audit trail events in real time (/audit/trail)

bffcreate -d $dirname -t $targetdir all # extract/rename update images

/opt/ibm/director/bin/twgstop # Stop IBM Director

/opt/IBM/ITM/bin/itmcmd agent stop all # stop Tivoli Management Agent, see /etc/rc.itm

diag -cd hdiskN -T "format -s erase -a write -P 00,ff,a5,5a,00,ff,a5" # format disk with diag

/usr/opt/perl5/link_perl_64 # change to 64bit perl

restorevgfiles # frontend for 'restore' for mksysb images

listvgbackup # frontend for 'restore' for mksysb images

securetcpip # tcpip hardening: chmod 0000 on insecure daemons etc

/usr/lib/errdead Path # extract error entries from /dev/error on a system dump device

getlvcb -t $LV # determine LV type

manage_disk_drivers [ -l | -c Num ] # change storage drivers between mpio, rdac/fcparray or others, requires bosboot/reboot!

lsvgfs $VGname # list only filesystem names in a VG

sissasraidmgr -A -l Array -z Pdisk # add new pdisk to array

sissasraidmgr -B -l Adapter|Array # list supported RAID levels

sissasraidmgr -C -r RAIDlevel [-s StripeSize] -z 'PdiskX PdiskY ...' # create array

sissasraidmgr -D [-l Adapter|-d Hdisk] # delete array

sissasraidmgr -F -z 'PdiskX PdiskY ...' # format RAID prepared disks

sissasraidmgr -L -l Hdisk

sissasraidmgr -L -j1 -l Adapter|Array

sissasraidmgr -P -z 'PdiskX PdiskY ...' # prepare (create) RAID disks

sissasraidmgr -R -z 'PdiskX PdiskY ...' # reconstruct array members

sissasraidmgr -S -l Adapter # adapter link status

sissasraidmgr -T -l Device # list device SAS path information

sissasraidmgr -U -z 'PdiskX PdiskY ...' # unprepare RAID disks (convert to hdisk)

sissasraidmgr -Z -l Adapter # device physical information (location codes)

sissasraidmgr -Z -l Adapter -o 1 # device physical information (WWID/serial)

xntpdc -l # show NTP server

xntpdc -s # show NTP peers and their state*

---

---------

### NIM

nim -o bos_inst -a source=rte -a lpp_source=Lpp_Source -a spot=SPOTName -a accept_licenses=yes -a boot_client=no ClientName # install from NIM server; requires manual configuation and initiation of network boot from the client

nim -o deallocate NimResource NimClient # deallocate NIM resource

nim -o change -a new_name=NewName OldName

### RMC

ls -ltr /var/ct/cfg # you should see the *acls* files

lsrsrc IBM.ManagementServer # you should see the HMCs

/usr/sbin/rsct/bin/ctsthl -l # Contents of trusted host list file

rmcctrl -z; rmcctrl -d; rmcctrl -A # 'recycle' RMC # OR:

rmcctrl -z; rmcctrl -k; rmcctrl -s

rmcctrl # without options, shows help

lsrsrc IBM.ManagementServer # check if AIX sees the HMC via network

/usr/sbin/rsct/bin/rmcdomainstatus -s ctrmc # Management Domain Status: Management Control Points (HMC)

drmgr # DLPAR script manager; log = syslog, local1.*

### Workload Partitions

mkwpar -n WparName

startwpar -n WparName

stopwpar -n WparName

rebootwpar WparName # Stops and restarts a system workload partition

### Security

getrunmode # show current security mode: configuration or operational (6.1, Trusted AIX)

setrunmode [-c|-o] # set system security mode: configuration or operational (6.1, Trusted AIX)

getsecconf

setsecconf

/etc/rc.security.boot # init script for AIX 6.1 security (Trusted AIX)

### Process statistics

procflags [PID]

procstack [PID]

pprof [time] # generate process trace of the system; CPU usage

### Files

/var/adm/cron/log # default cron log

/etc/cronlog.conf # cron log configuration file

/var/adm/cron/cron.{allow|deny} # cron access control

/etc/swapspaces # paging devices

/etc/vg/$VGID # VGIDs

/etc/lvmtlog.cfg # alog lvmt log configuration file (optional)

/usr/lpp/bosinst/image.template # template for image.data

---

rpm -qa --qf "%{NAME}\n" # query only rpm package names

netcd # AIX name service caching daemon ~ nscd

/etc/netcd.conf # configuration file for netcd - name service caching daemon

netcdctrl # netcd control options

netcdctrl -t dns -e hosts -f # flush netcd DNS cache

## TEC tecad_logfile

/opt/Tivoli/lcf/dat/1/../../bin/aix4-r1/TME/TEC/adapters/etc/tecad_logfile.conf

/opt/Tivoli/lcf/bin/aix4-r1/TME/TEC/adapters/bin/init.tecad_logfile (start|stop)

/etc/rc.tecad_logfile # rc script

rctecad_logfil # inittab entry

---

## ICC Extension SNMP SubAgent

icesnmp # inittab entry

/etc/ibm/icc/icesnmp

/etc/ibm/icc/startdirsnmpd

/etc/ibm/icc/stopdirsnmpd

dirsnmpd # daemon process