bin: ch-remote: Implement "counters" command

This is used to obtain the counters from the VM. The raw JSON data is
presented to the user.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-06-24 11:59:52 +01:00 committed by Samuel Ortiz
parent bca8a19244
commit 9b7afd4aac

View File

@ -337,6 +337,7 @@ fn do_command(matches: &ArgMatches) -> Result<(), Error> {
match matches.subcommand_name() {
Some("info") => simple_api_command(&mut socket, "GET", "info", None),
Some("counters") => simple_api_command(&mut socket, "GET", "counters", None),
Some("resize") => resize_api_command(
&mut socket,
matches
@ -498,6 +499,7 @@ fn main() {
.arg(Arg::with_name("id").index(1).help("<device_id>")),
)
.subcommand(SubCommand::with_name("info").about("Info on the VM"))
.subcommand(SubCommand::with_name("counters").about("Counters from the VM"))
.subcommand(SubCommand::with_name("pause").about("Pause the VM"))
.subcommand(SubCommand::with_name("reboot").about("Reboot the VM"))
.subcommand(