NetBSD/usr.sbin/accountant/accountant.8

151 lines
4.0 KiB
Groff

.\" Copyright (c) 1993 Christopher G. Demetriou
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. The name of the author may not be used to endorse or promote products
.\" derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $Id: accountant.8,v 1.5 1993/05/03 04:30:10 cgd Exp $
.\"
.Dd May 2, 1993
.Dt ACCOUNTANT 8
.Os NetBSD 0.8a
.Sh NAME
.Nm accountant
.Nd copy accounting records to the accounting log
.Sh SYNOPSIS
.Nm accountant
.Op Fl V
.Op Fl d
.Op Fl s
.Op Fl f Ar log file
.Op Fl F Ar accounting device
.Op Fl m Ar min on
.Op Fl M Ar max off
.Op Fl t Ar sleep time
.Sh DESCRIPTION
.Nm Accountant
copies the accounting records generated by the
kernel's accounting subsystem from the accounting
device file into the system accounting log.
If invoked with no arguments,
.Nm accountant
becomes a daemon process and does its work silently.
.Pp
Recording of accounting information is automatically suspended
if there is less than a given amount of free space left on the disk.
Recording is automatically resumed when enough space becomes available.
.Pp
.Nm Accountant
creates the file
.Pa /var/run/accountant.pid ,
and stores its process id
there. This can be used to kill or reconfigure
.Nm accountant .
.Pp
Options:
.Pp
.Bl -tag -width Fl
.It Fl V
Print program version information and exit.
.El
.Pp
.Bl -tag -width Fl
.It Fl d
Run in debug mode. Do not become a
daemon process, and write useful information
to the terminal.
.El
.Pp
.Bl -tag -width Fl
.It Fl s
Sync the accounting log after every write.
.El
.Pp
.Bl -tag -width Fl
.It Fl f Ar log file
Write accounting records to
.Ar log file
rather than the default
accounting log file.
.El
.Pp
.Bl -tag -width Fl
.It Fl F Ar accounting device
Read accounting records from
.Ar accounting device
rather than the default
accounting device.
.El
.Pp
.Bl -tag -width Fl
.It Fl m Ar min on
Suspend accounting when there is less than
.Ar min on
percent free space left on the disk.
By default,
.Ar min on
is two percent.
.El
.Pp
.Bl -tag -width Fl
.It Fl M Ar max off
Resume accounting when there is more than
.Ar max off
percent free space left on the disk.
By default,
.Ar max off
is four percent.
.El
.Pp
.Bl -tag -width Fl
.It Fl t Ar sleep time
Check to see whether there is enough
disk space to resume accounting every
.Ar sleep time
seeconds, when accounting has been suspended
because of a disk space shortage.
By default,
.Ar sleep time
is 15 seconds.
.El
.Sh FILES
.Bl -tag -width /var/run/accountant.pid -compact
.It Pa /var/account/acct
Default accounting log file.
.It Pa /var/run/accountant.pid
The process id of the
.Nm accountant
process.
.It Pa /dev/acct
Default accounting device.
.El
.Sh SEE ALSO
.Xr accton 8 ,
.Xr lastcomm 1 ,
.Xr acct 5
.Sh HISTORY
The
.Nm accountant
command appeared in
NetBSD 0.8a.