Originally posted by: Casey_B
I should preface this by saying that I never had to save
all user commands on a system.
Usually, we disallowed "sudo su -" and as many other similar commands, and then logged all sudo access to a different
machine. ( We used sudo for root, and also for the db2 admin id's, and other privileged id's)
The knowledge below comes from consulting the google: (history to syslog)
You might want to test and see if fc will be less resource intensive than tail.
Also, I seem to remember that the history file is circular in some way.
I don't know how tail will continue to work for a long running user process.
http://posludio.wordpress.com/2007/11/02/bash-history-to-a-remote-syslog/ traps like they describe above work in ksh88 on AIX, with one exception...
typeset should be substituted for declare.
I still think that is going to be pretty resource intensive if you have any
number of users logging into the machine.
In that case, here is an interesting, if not longer to implement idea:
Compile your own bash to send the syslog entries.
http://blog.rootshell.be/2009/02/28/bash-history-to-syslog/ Good luck,
Casey
#AIX-Forum