Extended Shell History AIX and VIOS
I needed to setup extended shell history for my AIX servers. Here is how to do it.
By default, when you type 'history -t' or 'fc -t' the output will look something like this.
520 ? :: cd /
521 ? :: cd /tmp
522 ? :: cd /usr
523 ? :: cd /home
524 ? :: cd /var
Now we enable extended shell history. The first command sets the history size and the second command enables extended history. Add both these lines to /etc/profile to make this perminant for all users.
export HISTSIZE=2000
export EXTENDED_HISTORY=ON
Now when we type 'history -t' or 'fc -t' we see the date and time the command was entered.
540 2016/09/06 11:10:40 :: cd /
541 2016/09/06 11:10:40 :: cd /tmp
542 2016/09/06 11:10:40 :: cd /usr
543 2016/09/06 11:10:40 :: cd /home
544 2016/09/06 11:10:40 :: cd /var
For VIO Servers, a similar feature is already activated by default. As the padmin user, run 'lsgcl' and you see the history of commands entered with date and time stamps.
# lsgcl
Sep 6 2016, 10:55:13 padmin lsdev -dev fcs0 -attr
Sep 6 2016, 10:56:26 padmin lsdev -dev fcs1 -attr
Sep 6 2016, 10:59:33 padmin lsmap -all
Sep 6 2016, 11:11:39 padmin lsgcl