File manager - Edit - /home/newsbmcs.com/public_html/static/img/logo/cpupower.tar
Back
debug/i386/Makefile 0000644 00000002005 15030752163 0007762 0 ustar 00 # SPDX-License-Identifier: GPL-2.0 OUTPUT=./ ifeq ("$(origin O)", "command line") OUTPUT := $(O)/ endif DESTDIR = bindir = /usr/bin INSTALL = /usr/bin/install default: all $(OUTPUT)centrino-decode: centrino-decode.c $(CC) $(CFLAGS) -o $@ centrino-decode.c $(OUTPUT)dump_psb: dump_psb.c $(CC) $(CFLAGS) -o $@ dump_psb.c $(OUTPUT)intel_gsic: intel_gsic.c $(CC) $(CFLAGS) -o $@ -llrmi intel_gsic.c $(OUTPUT)powernow-k8-decode: powernow-k8-decode.c $(CC) $(CFLAGS) -o $@ powernow-k8-decode.c all: $(OUTPUT)centrino-decode $(OUTPUT)dump_psb $(OUTPUT)intel_gsic $(OUTPUT)powernow-k8-decode clean: rm -rf $(OUTPUT)centrino-decode rm -rf $(OUTPUT)dump_psb rm -rf $(OUTPUT)intel_gsic rm -rf $(OUTPUT)powernow-k8-decode install: $(INSTALL) -d $(DESTDIR)${bindir} $(INSTALL) $(OUTPUT)centrino-decode $(DESTDIR)${bindir} $(INSTALL) $(OUTPUT)powernow-k8-decode $(DESTDIR)${bindir} $(INSTALL) $(OUTPUT)dump_psb $(DESTDIR)${bindir} $(INSTALL) $(OUTPUT)intel_gsic $(DESTDIR)${bindir} .PHONY: all default clean install debug/x86_64/Makefile 0000644 00000001261 15030752163 0010232 0 ustar 00 # SPDX-License-Identifier: GPL-2.0 OUTPUT=./ ifeq ("$(origin O)", "command line") OUTPUT := $(O)/ endif DESTDIR = bindir = /usr/bin INSTALL = /usr/bin/install default: all $(OUTPUT)centrino-decode: ../i386/centrino-decode.c $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(OUTPUT)powernow-k8-decode: ../i386/powernow-k8-decode.c $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< all: $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode clean: rm -rf $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode install: $(INSTALL) -d $(DESTDIR)${bindir} $(INSTALL) $(OUTPUT)centrino-decode $(DESTDIR)${bindir} $(INSTALL) $(OUTPUT)powernow-k8-decode $(DESTDIR)${bindir} .PHONY: all default clean install debug/kernel/Makefile 0000644 00000000703 15030752163 0010554 0 ustar 00 # SPDX-License-Identifier: GPL-2.0 obj-m := KDIR := /lib/modules/$(shell uname -r)/build KMISC := /lib/modules/$(shell uname -r)/cpufrequtils/ ifeq ("$(CONFIG_X86_TSC)", "y") obj-m += cpufreq-test_tsc.o endif default: $(MAKE) -C $(KDIR) M=$(CURDIR) clean: - rm -rf *.o *.ko .*.cmd .*.mod.* *.mod.c - rm -rf Module.symvers modules.order install: default install -d $(KMISC) install -m 644 -c *.ko $(KMISC) /sbin/depmod -a all: default bench/cpufreq-bench_plot.sh 0000644 00000004675 15030752163 0011755 0 ustar 00 #!/bin/bash # SPDX-License-Identifier: GPL-2.0-or-later # Author/Copyright(c): 2009, Thomas Renninger <trenn@suse.de>, Novell Inc. # Helper script to easily create nice plots of your cpufreq-bench results dir=`mktemp -d` output_file="cpufreq-bench.png" global_title="cpufreq-bench plot" picture_type="jpeg" file[0]="" function usage() { echo "cpufreq-bench_plot.sh [OPTIONS] logfile [measure_title] [logfile [measure_title]] ...]" echo echo "Options" echo " -o output_file" echo " -t global_title" echo " -p picture_type [jpeg|gif|png|postscript|...]" exit 1 } if [ $# -eq 0 ];then echo "No benchmark results file provided" echo usage fi while getopts o:t:p: name ; do case $name in o) output_file="$OPTARG".$picture_type ;; t) global_title="$OPTARG" ;; p) picture_type="$OPTARG" ;; ?) usage ;; esac done shift $(($OPTIND -1)) plots=0 while [ "$1" ];do if [ ! -f "$1" ];then echo "File $1 does not exist" usage fi file[$plots]="$1" title[$plots]="$2" # echo "File: ${file[$plots]} - ${title[plots]}" shift;shift plots=$((plots + 1)) done echo "set terminal $picture_type" >> $dir/plot_script.gpl echo "set output \"$output_file\"" >> $dir/plot_script.gpl echo "set title \"$global_title\"" >> $dir/plot_script.gpl echo "set xlabel \"sleep/load time\"" >> $dir/plot_script.gpl echo "set ylabel \"Performance (%)\"" >> $dir/plot_script.gpl for((plot=0;plot<$plots;plot++));do # Sanity check ###### I am to dump to get this redirected to stderr/stdout in one awk call... ##### cat ${file[$plot]} |grep -v "^#" |awk '{if ($2 != $3) printf("Error in measure %d:Load time %s does not equal sleep time %s, plot will not be correct\n", $1, $2, $3); ERR=1}' ###### I am to dump to get this redirected in one awk call... ##### # Parse out load time (which must be equal to sleep time for a plot), divide it by 1000 # to get ms and parse out the performance in percentage and write it to a temp file for plotting cat ${file[$plot]} |grep -v "^#" |awk '{printf "%lu %.1f\n",$2/1000, $6}' >$dir/data_$plot if [ $plot -eq 0 ];then echo -n "plot " >> $dir/plot_script.gpl fi echo -n "\"$dir/data_$plot\" title \"${title[$plot]}\" with lines" >> $dir/plot_script.gpl if [ $(($plot + 1)) -ne $plots ];then echo -n ", " >> $dir/plot_script.gpl fi done echo >> $dir/plot_script.gpl gnuplot $dir/plot_script.gpl rm -r $dir bench/cpufreq-bench_script.sh 0000644 00000006575 15030752163 0012304 0 ustar 00 #!/bin/bash # SPDX-License-Identifier: GPL-2.0-or-later # Author/Copyright(c): 2009, Thomas Renninger <trenn@suse.de>, Novell Inc. # Ondemand up_threshold and sampling rate test script for cpufreq-bench # mircobenchmark. # Modify the general variables at the top or extend or copy out parts # if you want to test other things # # Default with latest kernels is 95, before micro account patches # it was 80, cmp. with git commit 808009131046b62ac434dbc796 UP_THRESHOLD="60 80 95" # Depending on the kernel and the HW sampling rate could be restricted # and cannot be set that low... # E.g. before git commit cef9615a853ebc4972084f7 one could only set # min sampling rate of 80000 if CONFIG_HZ=250 SAMPLING_RATE="20000 80000" function measure() { local -i up_threshold_set local -i sampling_rate_set for up_threshold in $UP_THRESHOLD;do for sampling_rate in $SAMPLING_RATE;do # Set values in sysfs echo $up_threshold >/sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold echo $sampling_rate >/sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate up_threshold_set=$(cat /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold) sampling_rate_set=$(cat /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate) # Verify set values in sysfs if [ ${up_threshold_set} -eq ${up_threshold} ];then echo "up_threshold: $up_threshold, set in sysfs: ${up_threshold_set}" else echo "WARNING: Tried to set up_threshold: $up_threshold, set in sysfs: ${up_threshold_set}" fi if [ ${sampling_rate_set} -eq ${sampling_rate} ];then echo "sampling_rate: $sampling_rate, set in sysfs: ${sampling_rate_set}" else echo "WARNING: Tried to set sampling_rate: $sampling_rate, set in sysfs: ${sampling_rate_set}" fi # Benchmark cpufreq-bench -o /var/log/cpufreq-bench/up_threshold_${up_threshold}_sampling_rate_${sampling_rate} done done } function create_plots() { local command for up_threshold in $UP_THRESHOLD;do command="cpufreq-bench_plot.sh -o \"sampling_rate_${SAMPLING_RATE}_up_threshold_${up_threshold}\" -t \"Ondemand sampling_rate: ${SAMPLING_RATE} comparison - Up_threshold: $up_threshold %\"" for sampling_rate in $SAMPLING_RATE;do command="${command} /var/log/cpufreq-bench/up_threshold_${up_threshold}_sampling_rate_${sampling_rate}/* \"sampling_rate = $sampling_rate\"" done echo $command eval "$command" echo done for sampling_rate in $SAMPLING_RATE;do command="cpufreq-bench_plot.sh -o \"up_threshold_${UP_THRESHOLD}_sampling_rate_${sampling_rate}\" -t \"Ondemand up_threshold: ${UP_THRESHOLD} % comparison - sampling_rate: $sampling_rate\"" for up_threshold in $UP_THRESHOLD;do command="${command} /var/log/cpufreq-bench/up_threshold_${up_threshold}_sampling_rate_${sampling_rate}/* \"up_threshold = $up_threshold\"" done echo $command eval "$command" echo done command="cpufreq-bench_plot.sh -o \"up_threshold_${UP_THRESHOLD}_sampling_rate_${SAMPLING_RATE}\" -t \"Ondemand up_threshold: ${UP_THRESHOLD} and sampling_rate ${SAMPLING_RATE} comparison\"" for sampling_rate in $SAMPLING_RATE;do for up_threshold in $UP_THRESHOLD;do command="${command} /var/log/cpufreq-bench/up_threshold_${up_threshold}_sampling_rate_${sampling_rate}/* \"up_threshold = $up_threshold - sampling_rate = $sampling_rate\"" done done echo "$command" eval "$command" } measure create_plots bench/Makefile 0000644 00000002531 15030752163 0007266 0 ustar 00 # SPDX-License-Identifier: GPL-2.0 OUTPUT := ./ ifeq ("$(origin O)", "command line") ifneq ($(O),) OUTPUT := $(O)/ endif endif ifeq ($(strip $(STATIC)),true) LIBS = -L../ -L$(OUTPUT) -lm OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o \ $(OUTPUT)../lib/cpufreq.o $(OUTPUT)../lib/cpupower.o else LIBS = -L../ -L$(OUTPUT) -lm -lcpupower OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o endif CFLAGS += -D_GNU_SOURCE -I../lib -DDEFAULT_CONFIG_FILE=\"$(confdir)/cpufreq-bench.conf\" $(OUTPUT)%.o : %.c $(ECHO) " CC " $@ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@ $(OUTPUT)cpufreq-bench: $(OBJS) $(ECHO) " CC " $@ $(QUIET) $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) all: $(OUTPUT)cpufreq-bench install: $(OUTPUT)cpufreq-bench mkdir -p $(DESTDIR)/$(sbindir) mkdir -p $(DESTDIR)/$(bindir) mkdir -p $(DESTDIR)/$(docdir) mkdir -p $(DESTDIR)/$(confdir) install -m 755 $(OUTPUT)cpufreq-bench $(DESTDIR)/$(sbindir)/cpufreq-bench install -m 755 cpufreq-bench_plot.sh $(DESTDIR)/$(bindir)/cpufreq-bench_plot.sh install -m 644 README-BENCH $(DESTDIR)/$(docdir)/README-BENCH install -m 755 cpufreq-bench_script.sh $(DESTDIR)/$(docdir)/cpufreq-bench_script.sh install -m 644 example.cfg $(DESTDIR)/$(confdir)/cpufreq-bench.conf clean: rm -f $(OUTPUT)*.o rm -f $(OUTPUT)cpufreq-bench utils/version-gen.sh 0000755 00000002017 15030752163 0010501 0 ustar 00 #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # # Script which prints out the version to use for building cpupowerutils. # Must be called from tools/power/cpupower/ # # Heavily based on tools/perf/util/PERF-VERSION-GEN . LF=' ' # First check if there is a .git to get the version from git describe # otherwise try to get the version from the kernel makefile if test -d ../../../.git -o -f ../../../.git && VN=$(git describe --abbrev=4 HEAD 2>/dev/null) && case "$VN" in *$LF*) (exit 1) ;; v[0-9]*) git update-index -q --refresh test -z "$(git diff-index --name-only HEAD --)" || VN="$VN-dirty" ;; esac then VN=$(echo "$VN" | sed -e 's/-/./g'); else eval $(grep '^VERSION[[:space:]]*=' ../../../Makefile|tr -d ' ') eval $(grep '^PATCHLEVEL[[:space:]]*=' ../../../Makefile|tr -d ' ') eval $(grep '^SUBLEVEL[[:space:]]*=' ../../../Makefile|tr -d ' ') eval $(grep '^EXTRAVERSION[[:space:]]*=' ../../../Makefile|tr -d ' ') VN="${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${EXTRAVERSION}" fi VN=$(expr "$VN" : v*'\(.*\)') echo $VN Makefile 0000644 00000024651 15030752163 0006216 0 ustar 00 # SPDX-License-Identifier: GPL-2.0-only # Makefile for cpupower # # Copyright (C) 2005,2006 Dominik Brodowski <linux@dominikbrodowski.net> # # Based largely on the Makefile for udev by: # # Copyright (C) 2003,2004 Greg Kroah-Hartman <greg@kroah.com> # OUTPUT=./ ifeq ("$(origin O)", "command line") OUTPUT := $(O)/ endif ifneq ($(OUTPUT),) # check that the output directory actually exists OUTDIR := $(shell cd $(OUTPUT) && pwd) $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) endif # --- CONFIGURATION BEGIN --- # Set the following to `true' to make a unstripped, unoptimized # binary. Leave this set to `false' for production use. DEBUG ?= true # make the build silent. Set this to something else to make it noisy again. V ?= false # Internationalization support (output in different languages). # Requires gettext. NLS ?= true # Set the following to 'true' to build/install the # cpufreq-bench benchmarking tool CPUFREQ_BENCH ?= true # Do not build libraries, but build the code in statically # Libraries are still built, otherwise the Makefile code would # be rather ugly. export STATIC ?= false # Prefix to the directories we're installing to DESTDIR ?= # --- CONFIGURATION END --- # Package-related definitions. Distributions can modify the version # and _should_ modify the PACKAGE_BUGREPORT definition VERSION:= $(shell ./utils/version-gen.sh) LIB_MAJ= 0.0.1 LIB_MIN= 0 PACKAGE = cpupower PACKAGE_BUGREPORT = linux-pm@vger.kernel.org LANGUAGES = de fr it cs pt # Directory definitions. These are default and most probably # do not need to be changed. Please note that DESTDIR is # added in front of any of them bindir ?= /usr/bin sbindir ?= /usr/sbin mandir ?= /usr/man includedir ?= /usr/include localedir ?= /usr/share/locale docdir ?= /usr/share/doc/packages/cpupower confdir ?= /etc/ bash_completion_dir ?= /usr/share/bash-completion/completions # Toolchain: what tools do we use, and what options do they need: CP = cp -fpR INSTALL = /usr/bin/install -c INSTALL_PROGRAM = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 #bash completion scripts get sourced and so they should be rw only. INSTALL_SCRIPT = ${INSTALL} -m 644 # If you are running a cross compiler, you may want to set this # to something more interesting, like "arm-linux-". If you want # to compile vs uClibc, that can be done here as well. CROSS = #/usr/i386-linux-uclibc/usr/bin/i386-uclibc- CC = $(CROSS)gcc LD = $(CROSS)gcc AR = $(CROSS)ar STRIP = $(CROSS)strip RANLIB = $(CROSS)ranlib HOSTCC = gcc MKDIR = mkdir # 64bit library detection include ../../scripts/Makefile.arch ifeq ($(IS_64_BIT), 1) libdir ?= /usr/lib64 else libdir ?= /usr/lib endif # Now we set up the build system # GMO_FILES = ${shell for HLANG in ${LANGUAGES}; do echo $(OUTPUT)po/$$HLANG.gmo; done;} export CROSS CC AR STRIP RANLIB CFLAGS LDFLAGS LIB_OBJS # check if compiler option is supported cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -x c /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;} # use '-Os' optimization if available, else use -O2 OPTIMIZATION := $(call cc-supports,-Os,-O2) WARNINGS := -Wall -Wchar-subscripts -Wpointer-arith -Wsign-compare WARNINGS += $(call cc-supports,-Wno-pointer-sign) WARNINGS += $(call cc-supports,-Wdeclaration-after-statement) WARNINGS += -Wshadow override CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \ -DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE UTIL_OBJS = utils/helpers/amd.o utils/helpers/msr.o \ utils/helpers/sysfs.o utils/helpers/misc.o utils/helpers/cpuid.o \ utils/helpers/pci.o utils/helpers/bitmask.o \ utils/idle_monitor/nhm_idle.o utils/idle_monitor/snb_idle.o \ utils/idle_monitor/hsw_ext_idle.o \ utils/idle_monitor/amd_fam14h_idle.o utils/idle_monitor/cpuidle_sysfs.o \ utils/idle_monitor/mperf_monitor.o utils/idle_monitor/cpupower-monitor.o \ utils/cpupower.o utils/cpufreq-info.o utils/cpufreq-set.o \ utils/cpupower-set.o utils/cpupower-info.o utils/cpuidle-info.o \ utils/cpuidle-set.o UTIL_SRC := $(UTIL_OBJS:.o=.c) UTIL_OBJS := $(addprefix $(OUTPUT),$(UTIL_OBJS)) UTIL_HEADERS = utils/helpers/helpers.h utils/idle_monitor/cpupower-monitor.h \ utils/helpers/bitmask.h \ utils/idle_monitor/idle_monitors.h utils/idle_monitor/idle_monitors.def LIB_HEADERS = lib/cpufreq.h lib/cpupower.h lib/cpuidle.h LIB_SRC = lib/cpufreq.c lib/cpupower.c lib/cpuidle.c LIB_OBJS = lib/cpufreq.o lib/cpupower.o lib/cpuidle.o LIB_OBJS := $(addprefix $(OUTPUT),$(LIB_OBJS)) override CFLAGS += -pipe ifeq ($(strip $(NLS)),true) INSTALL_NLS += install-gmo COMPILE_NLS += create-gmo override CFLAGS += -DNLS endif ifeq ($(strip $(CPUFREQ_BENCH)),true) INSTALL_BENCH += install-bench COMPILE_BENCH += compile-bench endif ifeq ($(strip $(STATIC)),true) UTIL_OBJS += $(LIB_OBJS) UTIL_HEADERS += $(LIB_HEADERS) UTIL_SRC += $(LIB_SRC) endif override CFLAGS += $(WARNINGS) ifeq ($(strip $(V)),false) QUIET=@ ECHO=@echo else QUIET= ECHO=@\# endif export QUIET ECHO # if DEBUG is enabled, then we do not strip or optimize ifeq ($(strip $(DEBUG)),true) override CFLAGS += -O1 -g -DDEBUG STRIPCMD = /bin/true -Since_we_are_debugging else override CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment endif # the actual make rules all: libcpupower $(OUTPUT)cpupower $(COMPILE_NLS) $(COMPILE_BENCH) $(OUTPUT)lib/%.o: $(LIB_SRC) $(LIB_HEADERS) $(ECHO) " CC " $@ $(QUIET) $(CC) $(CFLAGS) -fPIC -o $@ -c lib/$*.c $(OUTPUT)libcpupower.so.$(LIB_MAJ): $(LIB_OBJS) $(ECHO) " LD " $@ $(QUIET) $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ \ -Wl,-soname,libcpupower.so.$(LIB_MIN) $(LIB_OBJS) @ln -sf $(@F) $(OUTPUT)libcpupower.so @ln -sf $(@F) $(OUTPUT)libcpupower.so.$(LIB_MIN) libcpupower: $(OUTPUT)libcpupower.so.$(LIB_MAJ) # Let all .o files depend on its .c file and all headers # Might be worth to put this into utils/Makefile at some point of time $(UTIL_OBJS): $(UTIL_HEADERS) $(OUTPUT)%.o: %.c $(ECHO) " CC " $@ $(QUIET) $(CC) $(CFLAGS) -I./lib -I ./utils -o $@ -c $*.c $(OUTPUT)cpupower: $(UTIL_OBJS) $(OUTPUT)libcpupower.so.$(LIB_MAJ) $(ECHO) " CC " $@ ifeq ($(strip $(STATIC)),true) $(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) $(UTIL_OBJS) -lrt -lpci -L$(OUTPUT) -o $@ else $(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) $(UTIL_OBJS) -lcpupower -lrt -lpci -L$(OUTPUT) -o $@ endif $(QUIET) $(STRIPCMD) $@ $(OUTPUT)po/$(PACKAGE).pot: $(UTIL_SRC) $(ECHO) " GETTEXT " $@ $(QUIET) xgettext --default-domain=$(PACKAGE) --add-comments \ --keyword=_ --keyword=N_ $(UTIL_SRC) -p $(@D) -o $(@F) $(OUTPUT)po/%.gmo: po/%.po $(ECHO) " MSGFMT " $@ $(QUIET) msgfmt -o $@ po/$*.po create-gmo: ${GMO_FILES} update-po: $(OUTPUT)po/$(PACKAGE).pot $(ECHO) " MSGMRG " $@ $(QUIET) @for HLANG in $(LANGUAGES); do \ echo -n "Updating $$HLANG "; \ if msgmerge po/$$HLANG.po $< -o \ $(OUTPUT)po/$$HLANG.new.po; then \ mv -f $(OUTPUT)po/$$HLANG.new.po $(OUTPUT)po/$$HLANG.po; \ else \ echo "msgmerge for $$HLANG failed!"; \ rm -f $(OUTPUT)po/$$HLANG.new.po; \ fi; \ done; compile-bench: $(OUTPUT)libcpupower.so.$(LIB_MAJ) @V=$(V) confdir=$(confdir) $(MAKE) -C bench O=$(OUTPUT) # we compile into subdirectories. if the target directory is not the # source directory, they might not exists. So we depend the various # files onto their directories. DIRECTORY_DEPS = $(LIB_OBJS) $(UTIL_OBJS) $(GMO_FILES) $(DIRECTORY_DEPS): | $(sort $(dir $(DIRECTORY_DEPS))) # In the second step, we make a rule to actually create these directories $(sort $(dir $(DIRECTORY_DEPS))): $(ECHO) " MKDIR " $@ $(QUIET) $(MKDIR) -p $@ 2>/dev/null clean: -find $(OUTPUT) \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' \) -type f -print \ | xargs rm -f -rm -f $(OUTPUT)cpupower -rm -f $(OUTPUT)libcpupower.so* -rm -rf $(OUTPUT)po/*.gmo -rm -rf $(OUTPUT)po/*.pot $(MAKE) -C bench O=$(OUTPUT) clean install-lib: libcpupower $(INSTALL) -d $(DESTDIR)${libdir} $(CP) $(OUTPUT)libcpupower.so* $(DESTDIR)${libdir}/ $(INSTALL) -d $(DESTDIR)${includedir} $(INSTALL_DATA) lib/cpufreq.h $(DESTDIR)${includedir}/cpufreq.h $(INSTALL_DATA) lib/cpuidle.h $(DESTDIR)${includedir}/cpuidle.h install-tools: $(OUTPUT)cpupower $(INSTALL) -d $(DESTDIR)${bindir} $(INSTALL_PROGRAM) $(OUTPUT)cpupower $(DESTDIR)${bindir} $(INSTALL) -d $(DESTDIR)${bash_completion_dir} $(INSTALL_SCRIPT) cpupower-completion.sh '$(DESTDIR)${bash_completion_dir}/cpupower' install-man: $(INSTALL_DATA) -D man/cpupower.1 $(DESTDIR)${mandir}/man1/cpupower.1 $(INSTALL_DATA) -D man/cpupower-frequency-set.1 $(DESTDIR)${mandir}/man1/cpupower-frequency-set.1 $(INSTALL_DATA) -D man/cpupower-frequency-info.1 $(DESTDIR)${mandir}/man1/cpupower-frequency-info.1 $(INSTALL_DATA) -D man/cpupower-idle-set.1 $(DESTDIR)${mandir}/man1/cpupower-idle-set.1 $(INSTALL_DATA) -D man/cpupower-idle-info.1 $(DESTDIR)${mandir}/man1/cpupower-idle-info.1 $(INSTALL_DATA) -D man/cpupower-set.1 $(DESTDIR)${mandir}/man1/cpupower-set.1 $(INSTALL_DATA) -D man/cpupower-info.1 $(DESTDIR)${mandir}/man1/cpupower-info.1 $(INSTALL_DATA) -D man/cpupower-monitor.1 $(DESTDIR)${mandir}/man1/cpupower-monitor.1 install-gmo: create-gmo $(INSTALL) -d $(DESTDIR)${localedir} for HLANG in $(LANGUAGES); do \ echo '$(INSTALL_DATA) -D $(OUTPUT)po/$$HLANG.gmo $(DESTDIR)${localedir}/$$HLANG/LC_MESSAGES/cpupower.mo'; \ $(INSTALL_DATA) -D $(OUTPUT)po/$$HLANG.gmo $(DESTDIR)${localedir}/$$HLANG/LC_MESSAGES/cpupower.mo; \ done; install-bench: compile-bench @#DESTDIR must be set from outside to survive @sbindir=$(sbindir) bindir=$(bindir) docdir=$(docdir) confdir=$(confdir) $(MAKE) -C bench O=$(OUTPUT) install ifeq ($(strip $(STATIC)),true) install: all install-tools install-man $(INSTALL_NLS) $(INSTALL_BENCH) else install: all install-lib install-tools install-man $(INSTALL_NLS) $(INSTALL_BENCH) endif uninstall: - rm -f $(DESTDIR)${libdir}/libcpupower.* - rm -f $(DESTDIR)${includedir}/cpufreq.h - rm -f $(DESTDIR)${includedir}/cpuidle.h - rm -f $(DESTDIR)${bindir}/utils/cpupower - rm -f $(DESTDIR)${mandir}/man1/cpupower.1 - rm -f $(DESTDIR)${mandir}/man1/cpupower-frequency-set.1 - rm -f $(DESTDIR)${mandir}/man1/cpupower-frequency-info.1 - rm -f $(DESTDIR)${mandir}/man1/cpupower-set.1 - rm -f $(DESTDIR)${mandir}/man1/cpupower-info.1 - rm -f $(DESTDIR)${mandir}/man1/cpupower-monitor.1 - for HLANG in $(LANGUAGES); do \ rm -f $(DESTDIR)${localedir}/$$HLANG/LC_MESSAGES/cpupower.mo; \ done; .PHONY: all utils libcpupower update-po create-gmo install-lib install-tools install-man install-gmo install uninstall clean cpupower-completion.sh 0000644 00000006657 15030752163 0011133 0 ustar 00 # -*- shell-script -*- # bash completion script for cpupower # Taken from git.git's completion script. _cpupower_commands="frequency-info frequency-set idle-info idle-set set info monitor" _frequency_info () { local flags="-f -w -l -d -p -g -a -s -y -o -m -n --freq --hwfreq --hwlimits --driver --policy --governors --related-cpus --affected-cpus --stats --latency --proc --human --no-rounding" local prev="${COMP_WORDS[COMP_CWORD-1]}" local cur="${COMP_WORDS[COMP_CWORD]}" case "$prev" in frequency-info) COMPREPLY=($(compgen -W "$flags" -- "$cur")) ;; esac } _frequency_set () { local flags="-f -g --freq --governor -d --min -u --max -r --related" local prev="${COMP_WORDS[COMP_CWORD-1]}" local cur="${COMP_WORDS[COMP_CWORD]}" case "$prev" in -f| --freq | -d | --min | -u | --max) if [ -d /sys/devices/system/cpu/cpufreq/ ] ; then COMPREPLY=($(compgen -W '$(cat $(ls -d /sys/devices/system/cpu/cpufreq/policy* | head -1)/scaling_available_frequencies)' -- "$cur")) fi ;; -g| --governor) if [ -d /sys/devices/system/cpu/cpufreq/ ] ; then COMPREPLY=($(compgen -W '$(cat $(ls -d /sys/devices/system/cpu/cpufreq/policy* | head -1)/scaling_available_governors)' -- "$cur")) fi;; frequency-set) COMPREPLY=($(compgen -W "$flags" -- "$cur")) ;; esac } _idle_info() { local flags="-f --silent" local prev="${COMP_WORDS[COMP_CWORD-1]}" local cur="${COMP_WORDS[COMP_CWORD]}" case "$prev" in idle-info) COMPREPLY=($(compgen -W "$flags" -- "$cur")) ;; esac } _idle_set() { local flags="-d --disable -e --enable -D --disable-by-latency -E --enable-all" local prev="${COMP_WORDS[COMP_CWORD-1]}" local cur="${COMP_WORDS[COMP_CWORD]}" case "$prev" in idle-set) COMPREPLY=($(compgen -W "$flags" -- "$cur")) ;; esac } _set() { local flags="--perf-bias, -b" local prev="${COMP_WORDS[COMP_CWORD-1]}" local cur="${COMP_WORDS[COMP_CWORD]}" case "$prev" in set) COMPREPLY=($(compgen -W "$flags" -- "$cur")) ;; esac } _monitor() { local flags="-l -m -i -c -v" local prev="${COMP_WORDS[COMP_CWORD-1]}" local cur="${COMP_WORDS[COMP_CWORD]}" case "$prev" in monitor) COMPREPLY=($(compgen -W "$flags" -- "$cur")) ;; esac } _taskset() { local prev_to_prev="${COMP_WORDS[COMP_CWORD-2]}" local prev="${COMP_WORDS[COMP_CWORD-1]}" local cur="${COMP_WORDS[COMP_CWORD]}" case "$prev_to_prev" in -c|--cpu) COMPREPLY=($(compgen -W "$_cpupower_commands" -- "$cur")) ;; esac case "$prev" in frequency-info) _frequency_info ;; frequency-set) _frequency_set ;; idle-info) _idle_info ;; idle-set) _idle_set ;; set) _set ;; monitor) _monitor ;; esac } _cpupower () { local i local c=1 local command while test $c -lt $COMP_CWORD; do if test $c == 1; then command="${COMP_WORDS[c]}" fi c=$((++c)) done # Complete name of subcommand if the user has not finished typing it yet. if test $c -eq $COMP_CWORD -a -z "$command"; then COMPREPLY=($(compgen -W "help -v --version -c --cpu $_cpupower_commands" -- "${COMP_WORDS[COMP_CWORD]}")) return fi # Complete arguments to subcommands. case "$command" in -v|--version) return ;; -c|--cpu) _taskset ;; help) COMPREPLY=($(compgen -W "$_cpupower_commands" -- "${COMP_WORDS[COMP_CWORD]}")) ;; frequency-info) _frequency_info ;; frequency-set) _frequency_set ;; idle-info) _idle_info ;; idle-set) _idle_set ;; set) _set ;; monitor) _monitor ;; esac } complete -o bashdefault -o default -F _cpupower cpupower 2>/dev/null \ || complete -o default -F _cpupower cpupower
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings