3842bf2424
The CLI is used for administrating the channel monitor and manager and manually setting the CPU frequency on the host. Supports the following commands: add_vm [Mul-choice STRING]: add_vm|rm_vm <name>, add a VM for subsequent operations with the CLI or remove a previously added VM from the VM Power Manager rm_vm [Mul-choice STRING]: add_vm|rm_vm <name>, add a VM for subsequent operations with the CLI or remove a previously added VM from the VM Power Manager add_channels [Fixed STRING]: add_channels <vm_name> <list>|all, add communication channels for the specified VM, the virtio channels must be enabled in the VM configuration(qemu/libvirt) and the associated VM must be active. <list> is a comma-separated list of channel numbers to add, using the keyword 'all' will attempt to add all channels for the VM set_channel_status [Fixed STRING]: set_channel_status <vm_name> <list>|all enabled|disabled, enable or disable the communication channels in list(comma-separated) for the specified VM, alternatively list can be replaced with keyword 'all'. Disabled channels will still receive packets on the host, however the commands they specify will be ignored. Set status to 'enabled' to begin processing requests again. show_vm [Fixed STRING]: show_vm <vm_name>, prints the information on the specified VM(s), the information lists the number of vCPUS, the pinning to pCPU(s) as a bit mask, along with any communication channels associated with each VM show_cpu_freq_mask [Fixed STRING]: show_cpu_freq_mask <mask>, Get the current frequency for each core specified in the mask set_cpu_freq_mask [Fixed STRING]: set_cpu_freq <core_mask> <up|down|min|max>, Set the current frequency for the cores specified in <core_mask> by scaling each up/down/min/max. show_cpu_freq [Fixed STRING]: Get the current frequency for the specified core set_cpu_freq [Fixed STRING]: set_cpu_freq <core_num> <up|down|min|max>, Set the current frequency for the specified core by scaling up/down/min/max quit [Fixed STRING]: close the application Signed-off-by: Alan Carew <alan.carew@intel.com> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
48 lines
1.8 KiB
C
48 lines
1.8 KiB
C
/*-
|
|
* BSD LICENSE
|
|
*
|
|
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
|
|
* All rights reserved.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions
|
|
* are met:
|
|
*
|
|
* * Redistributions of source code must retain the above copyright
|
|
* notice, this list of conditions and the following disclaimer.
|
|
* * Redistributions in binary form must reproduce the above copyright
|
|
* notice, this list of conditions and the following disclaimer in
|
|
* the documentation and/or other materials provided with the
|
|
* distribution.
|
|
* * Neither the name of Intel Corporation nor the names of its
|
|
* contributors may be used to endorse or promote products derived
|
|
* from this software without specific prior written permission.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
*/
|
|
|
|
#ifndef VM_POWER_CLI_H_
|
|
#define VM_POWER_CLI_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void run_cli(__attribute__((unused)) void *arg);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* VM_POWER_CLI_H_ */
|