Operating System - HP-UX
1844192 Members
2331 Online
110229 Solutions
New Discussion

How to find what my users are executing ?

 

How to find what my users are executing ?

Hi,

My requirement is I want to check what my users are executing. Users can have any shell.

Is there any way to collect them in a file which can not be edited by any user.
4 REPLIES 4
Niraj Kumar Verma
Trusted Contributor

Re: How to find what my users are executing ?

Hi,

try using

# w -w

see the man page of w for more detial.

-Niraj
Niraj.Verma@philips.com
kish_1
Valued Contributor

Re: How to find what my users are executing ?

try enabling acct
also check acctcms.
I am not sure about it
share the power of the knowledge
Michael Tully
Honored Contributor

Re: How to find what my users are executing ?

Hi,

You need to set up system accounting. This link gives a very good description.

http://data.fas.harvard.edu/micah_altman/unix/sysacct.pdf
Anyone for a Mutiny ?
Steve Steel
Honored Contributor

Re: How to find what my users are executing ?

Hi

Michael is correct if you want to really follow it.


For a snapshot. 2 UNIX95 lines

UNIX95= ps -e -o pcpu,state,ruser,vsz,pid,ppid,args |head -n 1
UNIX95= ps -e -o pcpu,state,ruser,vsz,pid,ppid,args|tail -n +2 |sort -rnk2


Steve steel
If you want truly to understand something, try to change it. (Kurt Lewin)