The first form (-r) is used to print accounting reports. If a file is specified data from a saved accounting file; otherwise the data is read from the current accounting file.
If -a is specified, the report will contain accounting data for all users. Otherwise, if one or more users are specified, the data for these users will be printed. If neiter is specified, only the accounting data for the current user is printed. Only the super-user can generate reports for other users than the caller.
The second form (-p and/or -q) assigns the specified access policy and/or quota to the specified users. If a given user is not already known in the accounting file, a new entry with the specified policy and quota is created (default values are used if both are not specified).
The third form (-ZERO) will clear the usage counts for all users. Individual usage counts cannot be cleared. The original accounting file is saved with a .old suffix.
The following policies are currently implemented:
The quota specifies a number of hours which the user is allowed to read news. When this quota is used up, access will be blocked. A quota of zero gives unlimited access.
New users will get the default policy and quota defined in account.c. If this allows new users to read news at only specific times, this form can be used to permit individual users to read news at all times, or it can be used to prevent them from reading news at all. If the default policy does not allow new users to read news, this form must be used to authorize them to read news.
If accounting is enabled, the nn news reader will call nnacct on exit to register the time spent on news reading. If account logging is also defined (see account.c), an line is also added to the accounting log file.
When accounting is defined, the user can use the :cost command to get the current accounting data, and if the variable report-cost is set, nn will print accounting information on exit.
$db/acct accounting data (accumulated per user)
$db/acctlog accounting log (grows indefinitely)
$lib/admins login names of privileged nnacct users.