AC(8) System Manager's Manual AC(8)NAME
ac - login accounting
SYNOPSIS
/usr/sbin/ac [ -w wtmp ] [ -p ] [ -d ] [ people ] ...
DESCRIPTION
Ac produces a printout giving connect time for each user who has logged in during the life of the current wtmp file. A total is also pro-
duced. -w is used to specify an alternate wtmp file. -p prints individual totals; without this option, only totals are printed. -d
causes a printout for each midnight to midnight period. Any people will limit the printout to only the specified login names. If no wtmp
file is given, /usr/adm/wtmp is used.
The accounting file /usr/adm/wtmp is maintained by init and login. Neither of these programs creates the file, so if it does not exist no
connect-time accounting is done. To start accounting, it should be created with length 0. On the other hand if the file is left undis-
turbed it will grow without bound, so periodically any information desired should be collected and the file truncated.
FILES
/usr/adm/wtmp
SEE ALSO init(8), sa(8), login(1), utmp(5).
4th Berkeley Distribution November 16, 1996 AC(8)
Check Out this Related Man Page
AC(8) BSD System Manager's Manual AC(8)NAME
ac -- display connect time accounting
SYNOPSIS
ac [-d | -p] [-t tty] [-w file] [users ...]
DESCRIPTION
If the file /var/log/wtmp exists, a record of individual login and logout times are written to it by login(1) and init(8), respectively. The
program ac examines these records and writes the accumulated connect time for all logins to the standard output.
Options available:
-d Display the connect times in 24 hour chunks.
-p Display individual user totals.
-t tty Only do accounting logins on certain ttys. The tty specification can start with '!' to indicate not this tty and end with '*' to
indicate all similarly named ttys. Multiple -t flags may be specified.
-w file Read raw connect time data from file instead of the default file /var/log/wtmp.
users ... Display totals for the given individuals only.
If no arguments are given, ac displays the total amount of login time for all active accounts on the system.
The default wtmp file is an infinitely increasing file unless frequently truncated. This is normally done by the daily daemon scripts sched-
uled by cron(8), which rename and rotate the wtmp files before truncating them (and keep about a week's worth on hand). No login times are
collected, however, if the file does not exist.
For example,
ac -p -t "ttyd*" > modems
ac -p -t "!ttyd*" > other
allows times recorded in modems to be charged out at a different rate than other.
The ac utility exits 0 on success, and >0 if a fatal error occurs.
FILES
/var/log/wtmp connect time accounting file
/var/log/wtmp.[0-7] rotated files
SEE ALSO login(1), utmp(5), init(8), sa(8)HISTORY
An ac command appeared in Version 6 AT&T UNIX. This version of ac was written for NetBSD 1.0 from the specification provided by various sys-
tems' manual pages.
BSD April 19, 1994 BSD
Hi there thanks for checking in.
I run a helpdesk with about 500 users login onto a network
and then onto a Unix box.
Sometimes people use other people's login's.:-(
All user's use there own PC.( I.P )
Is there a way that when somebody logs onto the unix box with a different I.P that the... (6 Replies)
Hi Friends,
We are currently 5 people using same Unix login-id on different terminals, .sh_history file contains list of commands typed by all 5 peoples(commands history) with the below list :
$tail .sh_history
ls -ltr
pwd
cd ..
ls -ltr
clear
cd temp
more kk.lst
Now my question... (9 Replies)
I would like to find out the last time all users have logged in or out. I tried the last command, but it could not find the wtmp file in /var/adm (I searched in othe directories also). This is an AIX rs6000 4.2.1 system. We are moving our applications from this system to an AIX 5.2 system and I... (11 Replies)
I am wondering if solaris captures id's associated w/invalid login attempts?
when I try to login as "test1" several (3-5) times, I do not find any userID info under "/var/adm" files:
utmpx
wtmpx
messages
lastlog
Is there another location/log I should be checking?
Is it necessary for... (6 Replies)
Hi all, i am trying to reduce the file size of /var/adm/wtmp in my AIX servers and im using the method cp /dev/null /var/adm/wtmp to reduce it. I thought of automating it by including this command into crontab. Surprisingly, it doesn't work once i put into crontab, there is no error message thrown... (25 Replies)
Hello everyone
I have a problem with the file wtmp that is on /var/adm
This file was not on this directory (adm).
I try creating a new file with the correct rights (644) and owner (adm:adm)
but It doesnt work.
If I type the last command i get this
last
ora10g ... (4 Replies)
hi all, i need yor help!!!:D
i am a newbie in programming
i want to get user list and their login time...
i have search and learn about pswd and utmp, but i only can get usr list without their login time...
do you have an idea to solve my problem?
thanx (5 Replies)
So I made my own unix shell, but i want to make a background process when using the & appended to the end, so far most of the commands seem to work (except cd, but thats another story)
right now here is what I have got.
Im thinking maybe I shouldn't be using switch and maybe switch it to... (27 Replies)
Hello,
I have a client with an 18 year old SCO Openserver 5.0.5 server.
They can't find their installation media.
They are experiencing an error at login:
*LOGIN: ERROR- Failed to initialize policy manager. (IFOR_PM_FATAL)
The status from the policy manager daemon (PMD -... (10 Replies)
Hi Friends
I have a query. we had a requirement to see the last login details of our users so I ran the command last <username> and the output i get is:
wtmp begins Apr 17 21:48
Now I need to know couple of things:
1. How can I see the year this log is being read from wtmp file
2. Is... (4 Replies)
New Unix user/scripter here. Been trying to solve a problem for two days now with no luck. Hoping someone here has an answer.
Essentially I have a list of wtmp files which I have decompressed and copied to a temporary directory. Using the following command I can turn them into a file than can... (4 Replies)
Hi,
Does anyone have a script to truncate the wtmp file.
I want to move older entries in the wtmp to a new file and move it out of var/adm and shrink the size. (4 Replies)
Hi there!
I was wondering if someone could help me with the following:
I'm trying to find all files within a directory which have been modified since midnight of the current date.
Any help would be appreciated.
Thank you kindly. (6 Replies)
I appreciate the fact that rules are for everyone and I screwed up by not putting a screen printout in code brackets...
However, I was a bit dismayed when I received the following and tried to reply to say "Thank you" for sending me the reminder. I could not reply and had no idea what the... (4 Replies)