KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /etc/rc5.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //etc/rc5.d/S13irqbalance
#! /bin/sh
#
# irqbalance       Start/Stop irq balancing daemon
#
# chkconfig: 2345 13 87
# description: The irqbalance daemon will distribute interrupts across  \
#              the cpus on a multiprocessor system with the purpose of \
#              spreading the load. \
# processname: irqbalance


# This is an interactive program, we need the current locale

# Source function library.
. /etc/init.d/functions

# Check that we're a priviledged user
[ `id -u` = 0 ] || exit 4 


prog="irqbalance"

# Check that networking is up.
if [ "$NETWORKING" = "no" ]
then
	exit 1 
fi

[ -f /usr/sbin/irqbalance ] || exit 5

# fetch configuration if it exists
# ONESHOT=yes says to wait for a minute, then look at the interrupt
# load and balance it once; after balancing exit and do not change
# it again.
# The default is to keep rebalancing once every 10 seconds.
ONESHOT=
[ -f /etc/sysconfig/irqbalance ] && . /etc/sysconfig/irqbalance
case "$ONESHOT" in
	y*|Y*|on) ONESHOT=--oneshot ;;
	*) ONESHOT= ;;
esac

RETVAL=0

start() {
	export ONESHOT=$ONESHOT
	export IRQBALANCE_BANNED_INTERRUPTS=$IRQBALANCE_BANNED_INTERRUPTS
	export IRQBALANCE_BANNED_CPUS=$IRQBALANCE_BANNED_CPUS
        if [ -f /var/lock/irqbalance ]; then
                exit 0
        fi
        echo -n $"Starting $prog: "
	if [ -n "$IRQ_AFFINITY_MASK" ];
	then
		export IRQBALANCE_BANNED_CPUS=$IRQ_AFFINITY_MASK
	fi 	
        daemon irqbalance $ONESHOT 
        RETVAL=$?
        echo
        if [ $RETVAL -eq 0 ]; then
                if [ -n "$ONESHOT" ]; then
                        touch /var/lock/subsys/irqbalance
                else
                        touch /var/lock/irqbalance
                fi
        fi
        return $RETVAL
}


stop() {
        echo -n $"Stopping $prog: "
        killproc irqbalance
        echo
        rm -f /var/lock/irqbalance
	return $RETVAL
}

restart() {
	stop
	start
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
	status irqbalance
	;;
  restart|reload)
	restart
	;;
  condrestart)
	[ -f /var/lock/subsys/irqbalance ] && restart || :
	;;
  *)
	echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
	exit 1
	;;
esac

exit $?

Anon7 - 2021