AIX general tips & tricks
Determine every possible driver in use on a given host
The method is not 100% safe!
The first line finds the drivers in the customized (= actually configured and used) device database and lists owning filesets.
The second one uses the list of loaded kernel extensions to do the same.
You can try comparing the result from both.
$ for i in $(odmget CuDv | grep "ddins =" | sort -u | sed '/ddins = ""/d;s/.* \"//g;s/"//g'); do lslpp -wqc /usr/lib/drivers/$i; done
$ for i in $(genkex | awk '{print $3}'); do lslpp -wqc $i; done | grep devices
Configure sendmail to listen on localhost only
Edit /etc/sendmail.cf (a symbolic link to /etc/mail/sendmail.cf):
# O DaemonPortOptions=Name=MTA
O DaemonPortOptions=NAME=NoMTA4, Family=inet, Addr=127.0.0.1
Set window size
It doesn't work in every case.
$ COLUMNS=$(termdef -c); LINES=$(termdef -l); export COLUMNS LINES
Show text on the LED panel
This is a firmware command used by cfgmgr, where 'nnn' is the number to be displayed and the 16 digits are the text shown.
Should work with POWER4 and newer models. Tested on a 615 with 6.1 in full partition mode.
$ /usr/lib/methods/showled 0xnnn "0123456789ABCDEF"
Set date offset with the TZ variable
Handy in scripts where you need a certain date back or forward in time. Example shows minus 24 hours, ie. yesterday's date.
$ date; TZ=24 date
Fri Apr 29 15:22:36 CEST 2011
Thu Apr 28 13:22:36 2011