ac(8) System Manager's Manual ac(8)Name
ac - login accounting
Syntax
/etc/ac [ -w wtmp ] [ -p ] [ -d ] [ people ] ...
Description
The command 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 produced.
The accounting file is maintained by and 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 undisturbed it will grow without
bound, so periodically any information desired should be collected and the file truncated.
Options-w Specifies 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, is used.
FilesSee Alsolast(1), lastcomm(1), login(1), utmp(5), init(8), sa(8)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 am starting a small business. I need software to invoice and track payments, track income and expense and basically keep everything organized for tax time. I've read positive and negative on all small business accounting software, so now I'm really confused. Oh, my business is a service one, so I... (3 Replies)
Hi,
My test server slows down at 12:00 midnight every day. I don't have any crons set. But I found that there are some system crons. Are they really important, can they cause any problem at 12 midnigh?
# ls cron*.*
cron.deny
cron.d:
sysstat
cron.daily:
0anacron 0logwatch cups ... (2 Replies)
Hi,
The server is Redhat 5 32bit.
It is not easy to produce the problem so I will just write the experienced problems not how it is produced.
1) During login, it shows the last login time and then waits for 3-4 seconds to give shell prompt (considerable)
2) Sometimes the connection window... (2 Replies)
Hello,
Is there a difference between the following commands besides consider the file permissions?
/usr/sbin/acct/nulladm /var/adm/wtmp
>/var/adm/wtmp
cat /dev/null >/var/adm/wtmp
Today I tried the second command and it worked... (2 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)
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)
Hello All,
I would like to ask your kind help. Could you please advise how can I identify and printout all users, who has logged to our server from more than 10 different computers/machines by using the command last?
Thank you in advance for your help.
Janmesz (13 Replies)