Q:keep track of a user activities during login time?

Q:keep track of a user activities during login time?

Post by Pisut Tranchindavong - SCCS - 37371 » Sun, 29 Jan 1995 22:09:49



I'm using UNIX SVR4 machine and I'd like to log every activities of a
user logging in. I've studied about acct command but still don't
understand. Is this command can solve my problem, if not, what should I do?
Thanx,
Pisut T.
 
 
 

Q:keep track of a user activities during login time?

Post by Donald Campbe » Thu, 02 Feb 1995 07:29:41




           "Pisut Tranchindavong - SCCS - 3737111" writes:

Quote:> I'm using UNIX SVR4 machine and I'd like to log every activities of a
> user logging in. I've studied about acct command but still don't
> understand. Is this command can solve my problem, if not, what should I do?
> Thanx,
> Pisut T.

If you have accounting on when a process terminates information on such things
as when it started, the user, their group, the command (first 8 chars) are
written to /usr/adm/pacct (OK on some systems it goes to /var).

When '/usr/lib/acct/runacct' is run (normally root cron) the file is
read and the information summerised into a 'tacct' file (total accounting).
There are a number of standard reports in /usr/lib/acct that produce
reports on line usage, CPU usage by user etc.

These standard reports are not very accurate because in the summing of the
data to the tacct records the times tend to be truncated to the nearest
minute. A minute is a long time for a 486. (It was OK when all we had were
Z8000s).

Other difficulties arrise when you run applications like Oracle or Unify
where a lot of the work is done by applications deamons and not by the user.

The struct of the pacct file in given in acct.h. It is not that difficult
to write your own analysis program. You can then work to 100th of a second
CPU usage and analyse by group which is often better for charging.

Regards
Donald Campbell   [ SueDon Ltd  -  UNIX and Database Specialists ]