]> git.pld-linux.org Git - packages/cpudyn.git/commitdiff
- init
authorpbern <pbern@pld-linux.org>
Sun, 27 Jun 2004 16:33:20 +0000 (16:33 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cpudyn.conf -> 1.1
    cpudyn.init -> 1.1

cpudyn.conf [new file with mode: 0644]
cpudyn.init [new file with mode: 0644]

diff --git a/cpudyn.conf b/cpudyn.conf
new file mode 100644 (file)
index 0000000..0b81054
--- /dev/null
@@ -0,0 +1,54 @@
+# Cpudyn configure options
+
+################################################
+# COMMON OPTIONS
+################################################
+
+#
+# Internal between idle ratio tests in 1/10 sec increments
+# 
+
+INTERVAL=1 
+
+################################################
+# CPUFREQ OPTIONS
+################################################
+
+#
+# CPU idle work ratio to speed up
+#
+
+CPU_UP=0.5
+
+#
+# CPU idle work ratio to speed down
+#
+
+CPU_DOWN=0.9
+
+#
+# when using cputhrottling, what state to switch when speeding down
+#
+
+THROTTLING_LOW=7
+
+################################################
+# DISK OPTIONS
+# (disabled by default)
+################################################
+
+#
+# Timeout to put the disk in standby mode if there was no
+# io during that period (in seconds)
+#
+
+# TIMEOUT=120
+
+# 
+# Specified disks to spindown (comma separated devices)
+#
+
+# DISKS=/dev/hda,/dev/hdb
+
+
+
diff --git a/cpudyn.init b/cpudyn.init
new file mode 100644 (file)
index 0000000..af601b0
--- /dev/null
@@ -0,0 +1,61 @@
+#! /bin/sh
+#
+#              Written by Celso Gonzalez <celso@bulma.net>.
+# 
+#              based in skeleton example file provided by Debian.
+#
+# Version:     @(#)cpudyn  0.4.0  30-Jul-2003  celso@bulma.net
+#
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/sbin/cpudynd
+NAME=cpudyn
+DESC=cpudyn
+CONFFILE=/etc/cpudyn.conf
+PIDFILE=/var/run/$NAME.pid
+
+test -x $DAEMON || exit 0
+test -e $CONFFILE || exit 0
+
+# Read the configuration file
+. $CONFFILE
+
+OPTS=""
+if [ ! -z "$INTERVAL" ]; then OPTS="$OPTS -i $INTERVAL"; fi
+if [ ! -z "$CPU_UP" -a ! -z "$CPU_DOWN" ]; then OPTS="$OPTS -p $CPU_UP $CPU_DOWN"; fi
+if [ ! -z "$THROTTLING_LOW" ]; then OPTS="$OPTS -l $THROTTLING_LOW"; fi
+if [ ! -z "$TIMEOUT" ]; then OPTS="$OPTS -t $TIMEOUT"; fi
+if [ ! -z "$DISKS" ]; then OPTS="$OPTS -h $DISKS"; fi
+
+set -e
+
+case "$1" in
+  start)
+       echo -n "Starting $DESC: "
+       start-stop-daemon --start --quiet --pidfile $PIDFILE \
+               --background --make-pidfile --exec $DAEMON -- $OPTS
+       echo "$NAME."
+       ;;
+  stop)
+       echo -n "Stopping $DESC: "
+       start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+               --exec $DAEMON && rm -f $PIDFILE
+       echo "$NAME."
+       ;;
+  restart|force-reload)
+       echo -n "Restarting $DESC: "
+       start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+               --exec $DAEMON && rm -f $PIDFILE
+       sleep 1
+       start-stop-daemon --start --quiet --pidfile $PIDFILE \
+               --background --make-pidfile --exec $DAEMON -- $OPTS
+       echo "$NAME."
+       ;;
+  *)
+       N=/etc/init.d/$NAME
+       echo "Usage: $N {start|stop|restart|force-reload}" >&2
+       exit 1
+       ;;
+esac
+
+exit 0
This page took 0.065602 seconds and 4 git commands to generate.