psacct/psacct.init

54 lines
1021 B
Plaintext
Raw Normal View History

auto-import changelog data from psacct-6.3.2-18.src.rpm Tue Mar 26 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-18 - Fixed duh in initscript pointing to wrong accounting file (#61939) Sun Mar 17 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-17 - Removed the files usracct and savacct, which are not used by psacct utilities at all, but by the sa program. Our sa uses files in a different location, and so these files are unused and unnecessary. Sat Mar 16 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-16 - Added chkconfig to post and preun scripts for bug (#61191) Tue Mar 12 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-15 - Added new feature - psacct initscript now controls process accounting so that it is not just forced on if installed as was the previous behaviour - Modified the initscripts package to not force psacct on anymore and made the new psacct-6.3.2-15 conflict with previous initscripts packages. - Fixed logrotate config to set perms/owner of new log files, and closed bug (#54165) Thu Mar 07 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-14 - Fixed 64bit bug in calls to ctime() in lastcomm and dump-utmp (#60712) Wed Mar 06 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-13 - Removed Build_7x flag, added FHS_compliant flag, reworked specfile to use new flag, and fixed bug (#60716) Thu Feb 28 2002 Bill Nottingham <notting@redhat.com> 6.3.2-12 - rebuild in new environment for FHS correctness Thu Jan 31 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-11 - Conditionalized acct-6.3.2-config.patch to only be applied for RHL 7.x builds, as it breaks FHS compliance by putting files in nonstandard locations. Also fixed up other places in specfile for FHS 2.2. - Added acct-6.3.2-I-HATE-GNU-AUTOCONK.patch because I hate GNU autoconk really really badly. - Bumped to -11 to avoid buildsystem stupidness
2004-09-09 10:47:19 +00:00
#!/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
# Source function library.
. /etc/init.d/functions
# The location of the accounting file
ACCTFILE=/var/account/pacct
start() {
[ ! -r $ACCTFILE ] && touch $ACCTFILE && chmod 600 $ACCTFILE
auto-import changelog data from psacct-6.3.2-18.src.rpm Tue Mar 26 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-18 - Fixed duh in initscript pointing to wrong accounting file (#61939) Sun Mar 17 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-17 - Removed the files usracct and savacct, which are not used by psacct utilities at all, but by the sa program. Our sa uses files in a different location, and so these files are unused and unnecessary. Sat Mar 16 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-16 - Added chkconfig to post and preun scripts for bug (#61191) Tue Mar 12 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-15 - Added new feature - psacct initscript now controls process accounting so that it is not just forced on if installed as was the previous behaviour - Modified the initscripts package to not force psacct on anymore and made the new psacct-6.3.2-15 conflict with previous initscripts packages. - Fixed logrotate config to set perms/owner of new log files, and closed bug (#54165) Thu Mar 07 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-14 - Fixed 64bit bug in calls to ctime() in lastcomm and dump-utmp (#60712) Wed Mar 06 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-13 - Removed Build_7x flag, added FHS_compliant flag, reworked specfile to use new flag, and fixed bug (#60716) Thu Feb 28 2002 Bill Nottingham <notting@redhat.com> 6.3.2-12 - rebuild in new environment for FHS correctness Thu Jan 31 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-11 - Conditionalized acct-6.3.2-config.patch to only be applied for RHL 7.x builds, as it breaks FHS compliance by putting files in nonstandard locations. Also fixed up other places in specfile for FHS 2.2. - Added acct-6.3.2-I-HATE-GNU-AUTOCONK.patch because I hate GNU autoconk really really badly. - Bumped to -11 to avoid buildsystem stupidness
2004-09-09 10:47:19 +00:00
action $"Starting process accounting: " /sbin/accton $ACCTFILE
touch /var/lock/subsys/psacct
}
stop() {
auto-import changelog data from psacct-6.3.2-18.src.rpm Tue Mar 26 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-18 - Fixed duh in initscript pointing to wrong accounting file (#61939) Sun Mar 17 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-17 - Removed the files usracct and savacct, which are not used by psacct utilities at all, but by the sa program. Our sa uses files in a different location, and so these files are unused and unnecessary. Sat Mar 16 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-16 - Added chkconfig to post and preun scripts for bug (#61191) Tue Mar 12 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-15 - Added new feature - psacct initscript now controls process accounting so that it is not just forced on if installed as was the previous behaviour - Modified the initscripts package to not force psacct on anymore and made the new psacct-6.3.2-15 conflict with previous initscripts packages. - Fixed logrotate config to set perms/owner of new log files, and closed bug (#54165) Thu Mar 07 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-14 - Fixed 64bit bug in calls to ctime() in lastcomm and dump-utmp (#60712) Wed Mar 06 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-13 - Removed Build_7x flag, added FHS_compliant flag, reworked specfile to use new flag, and fixed bug (#60716) Thu Feb 28 2002 Bill Nottingham <notting@redhat.com> 6.3.2-12 - rebuild in new environment for FHS correctness Thu Jan 31 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-11 - Conditionalized acct-6.3.2-config.patch to only be applied for RHL 7.x builds, as it breaks FHS compliance by putting files in nonstandard locations. Also fixed up other places in specfile for FHS 2.2. - Added acct-6.3.2-I-HATE-GNU-AUTOCONK.patch because I hate GNU autoconk really really badly. - Bumped to -11 to avoid buildsystem stupidness
2004-09-09 10:47:19 +00:00
action $"Shutting down process accounting: " /sbin/accton
rm -f /var/lock/subsys/psacct
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
auto-import changelog data from psacct-6.3.2-18.src.rpm Tue Mar 26 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-18 - Fixed duh in initscript pointing to wrong accounting file (#61939) Sun Mar 17 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-17 - Removed the files usracct and savacct, which are not used by psacct utilities at all, but by the sa program. Our sa uses files in a different location, and so these files are unused and unnecessary. Sat Mar 16 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-16 - Added chkconfig to post and preun scripts for bug (#61191) Tue Mar 12 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-15 - Added new feature - psacct initscript now controls process accounting so that it is not just forced on if installed as was the previous behaviour - Modified the initscripts package to not force psacct on anymore and made the new psacct-6.3.2-15 conflict with previous initscripts packages. - Fixed logrotate config to set perms/owner of new log files, and closed bug (#54165) Thu Mar 07 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-14 - Fixed 64bit bug in calls to ctime() in lastcomm and dump-utmp (#60712) Wed Mar 06 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-13 - Removed Build_7x flag, added FHS_compliant flag, reworked specfile to use new flag, and fixed bug (#60716) Thu Feb 28 2002 Bill Nottingham <notting@redhat.com> 6.3.2-12 - rebuild in new environment for FHS correctness Thu Jan 31 2002 Mike A. Harris <mharris@redhat.com> 6.3.2-11 - Conditionalized acct-6.3.2-config.patch to only be applied for RHL 7.x builds, as it breaks FHS compliance by putting files in nonstandard locations. Also fixed up other places in specfile for FHS 2.2. - Added acct-6.3.2-I-HATE-GNU-AUTOCONK.patch because I hate GNU autoconk really really badly. - Bumped to -11 to avoid buildsystem stupidness
2004-09-09 10:47:19 +00:00
;;
status)
if [ -e /var/lock/subsys/psacct ]; then
echo $"Process accounting is enabled."
else
echo $"Process accounting is disabled."
fi
;;
restart|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}"
exit 1
esac
exit 0