211 lines
2.9 KiB
HTML
211 lines
2.9 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Miscellaneous Process Accounting Commands</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.60"><LINK
|
|
REL="HOME"
|
|
TITLE="Enabling Process Accounting on Linux HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Process Accounting Setup on Linux"
|
|
HREF="pasetup.html"></HEAD
|
|
><BODY
|
|
CLASS="SECT1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Enabling Process Accounting on Linux HOWTO</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="pasetup.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
> </TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECT1"
|
|
><H1
|
|
CLASS="SECT1"
|
|
><A
|
|
NAME="MISCCOMMANDS"
|
|
>7. Miscellaneous Process Accounting Commands</A
|
|
></H1
|
|
><P
|
|
></P
|
|
><DIV
|
|
CLASS="VARIABLELIST"
|
|
><DL
|
|
><DT
|
|
><B
|
|
CLASS="COMMAND"
|
|
>ac</B
|
|
></DT
|
|
><DD
|
|
><P
|
|
><B
|
|
CLASS="COMMAND"
|
|
>ac</B
|
|
> prints out statistics about users' connection times in
|
|
hours based on the logins and logouts in the current <TT
|
|
CLASS="FILENAME"
|
|
> /var/log/wtmp</TT
|
|
> file. <B
|
|
CLASS="COMMAND"
|
|
>ac</B
|
|
> is
|
|
also capable of printing out time totals for each day (-d option), and for each
|
|
user (-p option). </P
|
|
></DD
|
|
><DT
|
|
><B
|
|
CLASS="COMMAND"
|
|
>accton</B
|
|
></DT
|
|
><DD
|
|
><P
|
|
><B
|
|
CLASS="COMMAND"
|
|
>accton</B
|
|
> is used to turn on or turn off process accounting.
|
|
The file is normally executed at system bootup or shutdown via system init
|
|
scripts. </P
|
|
></DD
|
|
><DT
|
|
><B
|
|
CLASS="COMMAND"
|
|
>last</B
|
|
></DT
|
|
><DD
|
|
><P
|
|
><B
|
|
CLASS="COMMAND"
|
|
>last</B
|
|
> goes through the <TT
|
|
CLASS="FILENAME"
|
|
>/var/log/wtmp</TT
|
|
> file and prints out
|
|
information about users' connection times. </P
|
|
></DD
|
|
><DT
|
|
><B
|
|
CLASS="COMMAND"
|
|
>sa</B
|
|
></DT
|
|
><DD
|
|
><P
|
|
><B
|
|
CLASS="COMMAND"
|
|
>sa</B
|
|
> summarizes accounting information from previously
|
|
executed commands, software I/O operation times, and CPU times, as recorded in the
|
|
accounting record file <TT
|
|
CLASS="FILENAME"
|
|
> /var/account/pacct</TT
|
|
>. </P
|
|
></DD
|
|
><DT
|
|
><B
|
|
CLASS="COMMAND"
|
|
>lastcomm</B
|
|
></DT
|
|
><DD
|
|
><P
|
|
><B
|
|
CLASS="COMMAND"
|
|
>lastcomm</B
|
|
> prints out the information about all previously
|
|
executed commands, recorded in <TT
|
|
CLASS="FILENAME"
|
|
>/var/account/pacct</TT
|
|
>. </P
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="pasetup.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
> </TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Process Accounting Setup on Linux</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
> </TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |