Server IP : 127.0.0.2 / Your IP : 18.119.131.131 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /etc/rc3.d/ |
Upload File : |
#! /bin/sh ### BEGIN INIT INFO # Provides: ondemand # Required-Start: $remote_fs $all # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: Set the CPU Frequency Scaling governor to "ondemand" ### END INIT INFO # Don't run if we're going to start an Android LXC container: [ ! -f /etc/init/lxc-android-config.conf ] || exit 0 PATH=/sbin:/usr/sbin:/bin:/usr/bin . /lib/init/vars.sh . /lib/lsb/init-functions AVAILABLE="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors" DOWN_FACTOR="/sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor" case "$1" in start) start-stop-daemon --start --background --exec /etc/init.d/ondemand -- background ;; background) sleep 60 # probably enough time for desktop login [ -f $AVAILABLE ] || exit 0 read governors < $AVAILABLE case $governors in *interactive*) GOVERNOR="interactive" break ;; *ondemand*) GOVERNOR="ondemand" case $(uname -m) in ppc64*) SAMPLING=100 ;; esac break ;; *powersave*) GOVERNOR="powersave" break ;; *) exit 0 ;; esac for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor do [ -f $CPUFREQ ] || continue echo -n $GOVERNOR > $CPUFREQ done if [ -n "$SAMPLING" ] && [ -f $DOWN_FACTOR ]; then echo -n $SAMPLING > $DOWN_FACTOR fi ;; restart|reload|force-reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) ;; *) echo "Usage: $0 start|stop" >&2 exit 3 ;; esac