'\" te .\" Copyright 1989 AT&T Copyright (c) 1999, Sun Microsystems, Inc. All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH ACCTCMS 8 "Feb 22, 1999" .SH NAME acctcms \- command summary from process accounting records .SH SYNOPSIS .LP .nf \fB/usr/lib/acct/acctcms\fR [\fB-a\fR [\fB-o\fR] [\fB-p\fR]] [\fB-c\fR] [\fB-j\fR] [\fB-n\fR] [\fB-s\fR] [\fB-t\fR] \fIfilename\fR... .fi .SH DESCRIPTION .sp .LP \fBacctcms\fR reads one or more \fIfilename\fRs, normally in the form described in \fBacct.h\fR(3HEAD). It adds all records for processes that executed identically named commands, sorts them, and writes them to the standard output, normally using an internal summary format. .SH OPTIONS .sp .ne 2 .na \fB\fB-a\fR\fR .ad .RS 6n Print output in \fBASCII\fR rather than in the internal summary format. The output includes command name, number of times executed, total kcore-minutes, total \fBCPU\fR minutes, total real minutes, mean size (in K), mean \fBCPU\fR minutes per invocation, "hog factor," characters transferred, and blocks read and written, as in \fBacctcom\fR(1). Output is normally sorted by total kcore-minutes. .sp Use the following options only with the \fB-a\fR option: .sp .ne 2 .na \fB\fB-o\fR\fR .ad .RS 6n Output a (non-prime) offshift-time-only command summary. .RE .sp .ne 2 .na \fB\fB-p\fR\fR .ad .RS 6n Output a prime-time-only command summary. .RE When \fB-o\fR and \fB-p\fR are used together, a combination prime-time and non-prime-time report is produced. All the output summaries are total usage except number of times executed, CPU minutes, and real minutes, which are split into prime and non-prime. .RE .sp .ne 2 .na \fB\fB-c\fR\fR .ad .RS 6n Sort by total \fBCPU\fR time, rather than total kcore-minutes. .RE .sp .ne 2 .na \fB\fB-j\fR\fR .ad .RS 6n Combine all commands invoked only once under "***other". .RE .sp .ne 2 .na \fB\fB-n\fR\fR .ad .RS 6n Sort by number of command invocations. .RE .sp .ne 2 .na \fB\fB-s\fR\fR .ad .RS 6n Any file names encountered hereafter are already in internal summary format. .RE .sp .ne 2 .na \fB\fB-t\fR\fR .ad .RS 6n Process all records as total accounting records. The default internal summary format splits each field into prime and non-prime-time parts. This option combines the prime and non-prime time parts into a single field that is the total of both, and provides upward compatibility with old style \fBacctcms\fR internal summary format records. .RE .SH EXAMPLES .LP \fBExample 1 \fRUsing the \fBacctcms\fR command. .sp .LP A typical sequence for performing daily command accounting and for maintaining a running total is: .sp .in +2 .nf example%\fB acctcms filename ... > today\fR example% \fBcp total previoustotal\fR example% \fBacctcms \fR\fB-s\fR\fB today previoustotal > total\fR example% \fBacctcms \fR\fB-a\fR\fB \fR\fB-s\fR\fB today\fR .fi .in -2 .sp .SH SEE ALSO .sp .LP .BR acctcom (1), .BR acct (2), .BR acct.h (3HEAD), .BR utmpx (5), .BR attributes (7), .BR acct (8), .BR acctcon (8), .BR acctmerg (8), .BR acctprc (8), .BR acctsh (8), .BR fwtmp (8), .BR runacct (8) .SH NOTES .sp .LP Unpredictable output results if \fB-t\fR is used on new style internal summary format files, or if it is not used with old style internal summary format files.