in reply to Monitor user activity

As pointed out before, the term user activity is not very clear. On UNIX-like systems you could 'monitor' users who use a BASH shell e.g. by simply tailing the .bash_history

$ tail -f ~user/.bash_history
--
b10m

All code is usually tested, but rarely trusted.