AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.128.78.255
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/977/cwd/lib64/pm-utils/sleep.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /proc/977/cwd/lib64/pm-utils/sleep.d/94cpufreq
#!/bin/sh
# Ensure cpu governor is set to something sane.
# TODO: Which of the cpu governors is still insane?  File bugs against
#       those that are.

. "${PM_FUNCTIONS}"

[ -d /sys/devices/system/cpu/ ] || exit $NA

hibernate_cpufreq()
{
	( cd /sys/devices/system/cpu/
	for x in cpu[0-9]*; do
		# if cpufreq is a symlink, it is handled by another cpu. Skip.
		[ -L "$x/cpufreq" ] && continue
		gov="$x/cpufreq/scaling_governor"
		# if we do not have a scaling_governor file, skip.
		[ -f "$gov" ] || continue
		# if our temporary governor is not available, skip.
		grep -q "$TEMPORARY_CPUFREQ_GOVERNOR" \
			"$x/cpufreq/scaling_available_governors" || continue
		savestate "${x}_governor" < "$gov"
		echo "$TEMPORARY_CPUFREQ_GOVERNOR" > "$gov"
	done )
}

thaw_cpufreq()
{
	( cd /sys/devices/system/cpu/
	for x in cpu[0-9]*/cpufreq/scaling_governor ; do
		[ -f "$x" ] || continue
		state_exists "${x%%/*}_governor" || continue
		restorestate "${x%%/*}_governor" > "$x"
	done )
}

case "$1" in
	suspend|hibernate)
		hibernate_cpufreq
		;;
	resume|thaw)
		thaw_cpufreq
		;;
	*) exit $NA
		;;
esac

Anon7 - 2022
AnonSec Team