Compare commits

...

No commits in common. "c8" and "c8s" have entirely different histories.
c8 ... c8s

16 changed files with 464 additions and 2 deletions

6
.gitignore vendored
View File

@ -1 +1,5 @@
SOURCES/acct-6.6.3.tar.gz
acct-6.5.4.tar.gz
/acct-6.5.5.tar.gz
/acct-6.6.1.tar.gz
/acct-6.6.2.tar.gz
/acct-6.6.3.tar.gz

View File

@ -1 +0,0 @@
548bef66398b9394945f32b9e00e91d775c58e07 SOURCES/acct-6.6.3.tar.gz

View File

@ -0,0 +1,12 @@
diff -up acct-6.3.2/sa.8.pom acct-6.3.2/sa.8
--- acct-6.3.2/sa.8.pom 2008-11-13 13:08:54.000000000 +0100
+++ acct-6.3.2/sa.8 2008-11-13 13:09:38.000000000 +0100
@@ -323,8 +323,6 @@ file.
.I acct
The raw system wide process accounting file. See
.BR acct (5)
-(or
-.BR pacct (5))
for further details.
.TP
.I savacct

View File

@ -0,0 +1,12 @@
diff -up acct-6.5.4/lastcomm.1.pom acct-6.5.4/lastcomm.1
--- acct-6.5.4/lastcomm.1.pom 2010-01-23 20:18:03.000000000 +0100
+++ acct-6.5.4/lastcomm.1 2010-02-12 12:57:34.000000000 +0100
@@ -111,7 +111,7 @@ For each entry the following information
D -- command terminated with the generation of a core file
X -- command was terminated with the signal SIGTERM
+ the name of the user who ran the process
- + time the process exited
+ + time the process started
.SH OPTIONS
.PD 0
.TP

View File

@ -0,0 +1,128 @@
diff -up acct-6.3.2/dump-acct.8.orig acct-6.3.2/dump-acct.8
--- acct-6.3.2/dump-acct.8.orig 2009-12-02 13:56:58.000000000 +0100
+++ acct-6.3.2/dump-acct.8 2009-12-02 13:56:58.000000000 +0100
@@ -0,0 +1,37 @@
+.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
+.\" Written by Ivana Hutarova Varekova <varekova@redhat.com>
+.TH DUMP_ACCT 8 "2009 December 2" "Linux accounting system"
+
+.SH NAME
+dump\-acct \- print an acct/pacct file in human-readable format
+
+.SH SYNOPSYS
+\fBdump-acct\fR [\fB-hrR\fR] [\fB-n\fR <\fIrecs\fR>] <\fBfiles\fR>
+ [\fB--num\fR <\fIrecs\fR>] [\fB--raw\fR] [\fB--reverse\fR] [\fB--help\fR]
+
+.SH DESCRIPTION
+The dump-acct command transforms the output \fBfile\fR from the
+accton format to the human-readable format: one record per line.
+Each record consists of severald fields which are separated by
+character "|" (the meaning of concreate field depends on the
+version of kernel package - with which the accton file was created).
+
+.SH OPTIONS
+The following options are supported:
+.TP
+.B -h, --help
+Print a help message and the default location of the process accounting file
+and exit.
+.TP
+.B -r, --reverse
+Print the output in reverse order.
+.TP
+.B -R, --raw
+The records will be printed without any parsing.
+.TP
+.B -n, --num NUMRECS
+Display only the first NUMRECS number of records.
+
+.SH SEE ALSO
+accton (8), lastcomm (1)
+
diff -up ./acct-6.5.5/dump-utmp.8.orig ./acct-6.5.5/dump-utmp.8
--- acct-6.5.5/dump-utmp.8.orig 2010-10-23 13:33:27.000000000 +0200
+++ acct-6.5.5/dump-utmp.8 2010-11-09 17:08:53.000000000 +0100
@@ -1,65 +1,29 @@
-.TH DUMP-UTMP 8 "2006-04-22" "6.5.1" "GNU Accounting Utilities"
+.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
+.\" Written by Ivana Hutarova Varekova <varekova@redhat.com>
+.TH DUMP_UTMP 8 "2009 December 2" "Linux accounting system"
.SH NAME
-dump-utmp \- print an utmp file in human-readable format.
+dump\-utmp \- print a utmp file in human-readable format
-.SH SYNOPSIS
-.B dump-acct
-.RB [\| \-r \||\| \-\-reverse \|]
-.RB [\| \-R \||\| \-\-raw \|]
-.RB [\| \-n \||\| \-\-num
-.IR recs \|]
-.RB [\| \-h \||\| \-\-help \|]
-.RB [\|
-.IR files \|]
-
-.SH DESCRIPTION
-.B dump-acct
-.I filename
-prints a list of all logins. This list is usually written in
-.IR /var/log/wtmp .
-.LP
-All fields are separated by vertical line. Fields are:
-.IR "user name" ,
-.IR tty ,
-.IR type ,
-.IR id ,
-.IR pid ,
-.IR hostaddr ,
-.IR host ,
-.IR time .
+.SH SYNOPSYS
+\fBdump-utmp\fR [\fB-hrR\fR] [\fB-n\fR <\fIrecs\fR>] <\fBfiles\fR>
+ [\fB--num\fR <\fIrecs\fR>] [\fB--raw\fR] [\fB--reverse\fR] [\fB--help\fR]
.SH OPTIONS
+The following options are supported:
.TP
-.B \-h, \-\-help
-Prints the usage string and default locations of system files to standard output
-and exits.
-.TP
-.B \-n, \-\-num recs
-Number of lines to print.
+.B -h, --help
+Print a help message and the default location of the process accounting file
+and exit.
.TP
-.B \-r, \-\-reverse
-Start printing from last records.
+.B -r, --reverse
+Print the output in reverse order.
.TP
-.B \-R, \-\-raw
-Print raw records, not human-readable.
-
-.SH FILES
+.B -R, --raw
+The records will be printed without any parsing.
.TP
-.I wtmp
-The system wide login record file. See
-.BR wtmp (5)
-for further details.
+.B -n, --num NUMRECS
+Display only the first NUMRECS number of records.
.SH SEE ALSO
-.BR login (1),
-.BR wtmp (5),
-.BR init (8),
-.BR sa (8).
-
-.SH AUTHOR
-The GNU accounting utilities were written by Noel Cragg <noel@gnu.ai.mit.edu>.
-.PP
-This manual page was written by Ognyan Kulev <ogi@fmi.uni-sofia.bg> and updated
-by Daniel Baumann <daniel@debian.org> for the Debian project (but may be used by
-others).
+accton (8), lastcomm (1), utmp (5)

View File

@ -0,0 +1,167 @@
diff -Naur acct-6.6.1.orig/ac.c acct-6.6.1/ac.c
--- acct-6.6.1.orig/ac.c 2011-03-16 23:50:13.000000000 +0100
+++ acct-6.6.1/ac.c 2013-07-31 16:44:17.859142249 +0200
@@ -343,12 +343,29 @@
void give_usage(void)
{
- (void)printf("\
- Usage: %s [-dhpVy] [-f <file>] [people] ...\n\
- [--daily-totals] [--individual-totals] [--file <file>]\n\
- [--complain] [--reboots] [--supplants] [--timewarps] [--print-year]\n\
- [--compatibility] [--print-zeros] [--debug] [--tw-leniency <value>]\n\
- [--tw-suspicious <value>] [--version] [--help]\n", program_name);
+ (void)printf(
+ "\n"
+ "Usage: %s [OPTION] ...\n"
+ "\n"
+ "OPTIONS:\n"
+ " -d, --daily-totals Print totals for each day\n"
+ " -p, --individual-totals Print time totals for each user\n"
+ " -f, --file <file> Read from <file>\n"
+ " --complain Print errors for whatever problem\n"
+ " --reboots Count the time between login and reboot\n"
+ " --supplants Count the time between logins on the terminal\n"
+ " --timewarps Count the time between login and time warp\n"
+ " --compatibility Shortcut for --reboots --supplants --timewarps\n"
+ " -a, --all-days Do not skip days without login activity\n"
+ " --tw-leniency <value> Set the time warp leniency <value> in seconds\n"
+ " --tw-suspicious <value> Set the time warp suspicious <value> in seconds\n"
+ " --print-year Print year when displaying dates\n"
+ " --print-zeros Don't suppress zeros in category totals\n"
+ " --debug Print verbose internal information\n"
+ " -V, --version Show version and exit\n"
+ " -h, --help Show help and exit\n"
+ , program_name);
+
print_wtmp_file_location();
}
diff -Naur acct-6.6.1.orig/dump-acct.c acct-6.6.1/dump-acct.c
--- acct-6.6.1.orig/dump-acct.c 2011-03-16 23:50:13.000000000 +0100
+++ acct-6.6.1/dump-acct.c 2013-07-31 17:45:03.075476755 +0200
@@ -52,6 +52,7 @@
#ifdef LINUX_MULTIFORMAT
- printf (" [--format <version>] [--byteswap]\n");
+ printf (" [--format <version>] [--byteswap]\n");
#endif
+ printf (" [--ahz <freq>]\n");
print_acct_file_location ();
}
diff -Naur acct-6.6.1.orig/lastcomm.c acct-6.6.1/lastcomm.c
--- acct-6.6.1.orig/lastcomm.c 2011-03-16 23:50:13.000000000 +0100
+++ acct-6.6.1/lastcomm.c 2013-07-31 18:01:57.772529043 +0200
@@ -304,7 +304,7 @@
#ifdef HAVE_PAGING
"[--show-paging] "
#endif
- "[--version] [--help]\n", program_name);
+ "[--ahz <freq>] [--version] [--help]\n", program_name);
print_acct_file_location ();
}
diff -Naur acct-6.6.1.orig/lastcomm.1 acct-6.6.1/lastcomm.1
--- acct-6.6.1.orig/lastcomm.1 2013-07-31 15:44:16.000000000 +0200
+++ acct-6.6.1/lastcomm.1 2013-07-31 17:08:33.442122085 +0200
@@ -18,54 +18,7 @@
.I terminal-name ...
]
.br
-[
-.B \-\-strict-match
-]
-.br
-[
-.B \-\-forwards
-]
-.br
-[
-.BI \-f " filename"
-|
-.BI \-\-file " filename"
-]
-[
-.BI \-\-ahz " hz"
-]
-.br
-[
-.B \-\-user
-.I name
-]
-[
-.B \-\-command
-.I name
-]
-[
-.B \-\-tty
-.I name
-]
-.br
-[
-.B \p
-|
-.B \-\-show_paging
-]
-[
-.B \-\-debug
-]
-[
-.B \-V
-|
-.B \-\-version
-]
-[
-.B \-h
-|
-.B \-\-help
-]
+[ OPTION ... ]
.ad b
.hy 1
.SH DESCRIPTION
@@ -115,10 +68,13 @@
.SH OPTIONS
.PD 0
.TP
-.B \-\-strict-match
+.B \-\-strict\-match
Print only entries that match *all* of the arguments on the command
line.
.TP
+.B \-\-print\-controls
+Print control characters.
+.TP
.BI \-\-user " name"
List records for user with
.I name.
diff -Naur acct-6.6.1.orig/sa.8 acct-6.6.1/sa.8
--- acct-6.6.1.orig/sa.8 2013-07-31 15:44:16.000000000 +0200
+++ acct-6.6.1/sa.8 2013-07-31 17:19:06.325431034 +0200
@@ -43,7 +43,7 @@
[
.B \-i
|
-.B \-\-dont-read-summary-file
+.B \-\-dont-read-summary-files
]
.br
[
@@ -282,7 +282,7 @@
When using the `\-\-threshold' option, assume that all answers to
interactive queries will be affirmative.
.TP
-.B \-i, \-\-dont-read-summary-file
+.B \-i, \-\-dont-read-summary-files
Don't read the information in the system's default
.I savacct
file.
@@ -386,7 +386,7 @@
.I SAVACCT
file.
.TP
-.BI \-\-other-file " filename"
+.BI \-\-other-acct-file " filename"
Read from the file
.I filename
instead of the system's default

View File

@ -0,0 +1,57 @@
diff -Naur acct-6.6.1.orig/dump-acct.8 acct-6.6.1/dump-acct.8
--- acct-6.6.1.orig/dump-acct.8 2013-07-31 18:56:57.000000000 +0200
+++ acct-6.6.1/dump-acct.8 2013-07-31 19:19:21.606615965 +0200
@@ -0,0 +1,53 @@
+.\" Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
+.\" Written by Ivana Hutarova Varekova <varekova@redhat.com>
+.TH DUMP_ACCT 8 "2009 December 2" "Linux accounting system"
+
+.SH NAME
+dump\-acct \- print an acct/pacct file in human-readable format
+
+.SH SYNOPSIS
+.B dump-acct
+[\fB\-r\fR|\fB\-\-reverse\fR]
+[\fB\-R\fR|\fB\-\-raw\fR]
+[\fB\-n\fR|\fB\-\-num\fR\ \fIrecs\fR]
+[\fB\-\-byte\-swap\fR]
+[\fB\-\-format\fR]
+[\fB\-\-ahz\fR\ \fIfreq\fR]
+[\fB\-h\fR|\fB\-\-help\fR]
+[\fIfiles\fR]
+
+.SH DESCRIPTION
+The dump-acct command transforms the output \fBfile\fR from the
+accton format to the human-readable format: one record per line.
+Each record consists of severald fields which are separated by
+character "|" (the meaning of concreate field depends on the
+version of kernel package - with which the accton file was created).
+
+.SH OPTIONS
+The following options are supported:
+.TP
+.B -r, --reverse
+Print the output in reverse order.
+.TP
+.B -R, --raw
+The records will be printed without any parsing.
+.TP
+.B -n, --num NUMRECS
+Display only the first NUMRECS number of records.
+.TP
+.B --byteswap
+Swap the bytes (relative to your system's native byte order) in --raw output.
+.TP
+.B --format
+Set output format with --raw option.
+.TP
+.B --ahz FREQ
+Set the AHZ (platform dependent frequency in Hertz) to FREQ.
+.TP
+.B -h, --help
+Print a help message and the default location of the process accounting file
+and exit.
+
+.SH SEE ALSO
+accton (8), lastcomm (1)
+

82
psacct.init Executable file
View File

@ -0,0 +1,82 @@
#!/bin/bash
#
# psacct Script to control kernel process accounting
#
# Author: Mike A. Harris <mharris@redhat.com>
#
# chkconfig: - 90 10
# description: Starts and stops process accounting
# short-description: Starts and stops process accounting
### BEGIN INIT INFO
# Required-Start:
# Required-Stop:
# Provides: psacct
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Description: Starts and stops process accounting
# Short-Description: Starts and stops process accounting
### END INIT INFO
# Source function library.
. /etc/init.d/functions
# The location of the accounting file
ACCTFILE=/var/account/pacct
LOCKFILE=/var/lock/subsys/psacct
start() {
[ ! -r $ACCTFILE ] && touch $ACCTFILE && chmod 600 $ACCTFILE
if [ -r $ACCTFILE ]; then
action $"Starting process accounting: " /sbin/accton $ACCTFILE
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
touch $LOCKFILE
else
exit 7
fi
else
exit 4
fi
}
stop() {
action $"Shutting down process accounting: " /sbin/accton off
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
rm -f $LOCKFILE
else
exit 1
fi
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
if [ -e $LOCKFILE ]; then
echo $"Process accounting is enabled."
else
echo $"Process accounting is disabled."
exit 3
fi
;;
restart|reload|force-reload)
stop
start
;;
*)
# do not advertise unreasonable commands that there is no reason
# to use with this device
echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}"
exit 2
esac
exit 0

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (acct-6.6.3.tar.gz) = 161a0c19af9cfb88689935dca0d64c94922bcf9135063349ef8c4d2bf7702864ade1b75ebab2b4fe182a7a9011b755e8608d253a30a263038bc8d57a22a92bc2