// SPDX-License-Identifier: GPL-2.0-only /* * (C) 2010,2011 Thomas Renninger <trenn@suse.de>, Novell Inc. * * Ideas taken over from the perf userspace tool (included in the Linus * kernel git repo): subcommand builtins and param parsing.
*/
/* Global cpu_info object available for all binaries * Info only retrieved from CPU 0 * * Values will be zero/unknown on non X86 archs
*/ struct cpupower_cpu_info cpupower_cpu_info; int run_as_root; int base_cpu; /* Affected cpus chosen by -c/--cpu param */ struct bitmask *cpus_chosen; struct bitmask *online_cpus; struct bitmask *offline_cpus;
#ifdef DEBUG int be_verbose; #endif
staticvoid print_help(void);
struct cmd_struct { constchar *cmd; int (*main)(int, constchar **); int needs_root;
};
#ifdef DEBUG
printf(_("Usage:\tcpupower [-d|--debug] [-c|--cpu cpulist ] []\n")); #else
printf(_("Usage:\tcpupower [-c|--cpu cpulist ] []\n")); #endif
printf(_("Supported commands are:\n")); for (i = 0; i < ARRAY_SIZE(commands); i++)
printf("\t%s\n", commands[i].cmd);
printf(_("\nNot all commands can make use of the -c cpulist option.\n"));
printf(_("\nUse 'cpupower help ' for getting help for above commands.\n"));
}
staticint print_man_page(constchar *subpage)
{ int len; char *page;
len = 10; /* enough for "cpupower-" */ if (subpage != NULL)
len += strlen(subpage);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.