MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /etc/init.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //etc/init.d/sysstat
#!/bin/sh
#
# sysstat      Reset the system activity logs
#
# chkconfig: 12345 01 99
# description: Reset the system activity logs
# Author: Klaus.Franken@fth2.siemens.de
# Die Okt 12 10:05:41 EDT 1999
#
# Modified by:
# 1999/11/07 - Sebastien Godard <sebastien.godard@wanadoo.fr>
#	Now use '-d' option when starting sar.
# 2000/01/22 - Sebastien Godard <sebastien.godard@wanadoo.fr>
#	Rewritten from scratch. Call sadc instead of sar.
# 2004/01/22 - Nils Philippsen <nphilipp@redhat.com>
#   Adapt for chkconfig. Call only once after booting.
# 2004/10/10 - Sebastien Godard (sysstat <at> wanadoo.fr)
#	Now returns real exit code.
#
# /etc/init.d/sysstat
#

RETVAL=0
# Remove flag indicating that sadc was successfully launched
rm -f /tmp/sysstat.run

# See how we were called.
case "$1" in
  start)
        echo -n "Calling the system activity data collector (sadc): "
        /usr/lib/sa/sadc -F -L - && touch /tmp/sysstat.run

# Try to guess if sadc was successfully launched. The difficulty
# here is that the exit code is lost when the above command is
# run via "su foo -c ..."
	if [ ! -f /tmp/sysstat.run ]; then
		RETVAL=1
	else
		rm -f /tmp/sysstat.run
	fi
        echo
        ;;
  stop|status|restart|reload)
        ;;
  *)
        echo "Usage: sysstat {start|stop|status|restart|reload}"
        exit 1
esac
exit ${RETVAL}


Anon7 - 2021