]> git.pld-linux.org Git - packages/sysstat.git/blame - sysstat.init
- orphaned, outdated
[packages/sysstat.git] / sysstat.init
CommitLineData
87425f14 1#!/bin/sh
2#
76a8375a 3# sysstat Sysstat system monitoring utility
87425f14 4#
5# chkconfig: 2345 35 55
6#
81dc3e63 7# description: Sysstat system monitoring tools (sar,iostat,mpstat)
87425f14 8#
9
10# Source function library
11. /etc/rc.d/init.d/functions
12
eefa8211 13[ -f /etc/sysconfig/sysstat ] && . /etc/sysconfig/sysstat
14
4ab9494d 15RETVAL=0
87425f14 16# See how we were called.
17case "$1" in
18 start)
19 # Check if the service is already running?
20 if [ ! -f /var/lock/subsys/sysstat ]; then
21 msg_starting "system activity data collector"
6449eba0 22 daemon /usr/lib/sa/sadc $SADC_OPTIONS -
87425f14 23 RETVAL=$?
648b9c8e 24 [ "$RETVAL" -eq 0 ] && touch /var/lock/subsys/sysstat
87425f14 25 else
7fd96817 26 msg_already_running "system activity data collector"
87425f14 27 fi
28 ;;
29 stop)
76a8375a 30 if [ -f /var/lock/subsys/sysstat ]; then
31 # Stop daemons.
32 msg_stopping "system activity data collector"
eee32da1 33 ok
76a8375a 34 rm -f /var/lock/subsys/sysstat >/dev/null 2>&1
35 else
36 msg_not_running "system activity data collector"
76a8375a 37 fi
87425f14 38 ;;
39 status)
40 status sysstat
4ab9494d 41 exit $?
87425f14 42 ;;
4ab9494d 43 restart|force-reload)
87425f14 44 $0 stop
45 $0 start
76a8375a 46 exit $?
648b9c8e 47 ;;
87425f14 48 *)
4ab9494d 49 msg_usage "$0 {start|stop|restart|force-reload|status}"
50 exit 3
648b9c8e 51 ;;
87425f14 52esac
53
54exit $RETVAL
This page took 0.043233 seconds and 4 git commands to generate.