On Tue, Nov 15, 2022 at 01:56:21PM +0900, Yuya Higashi wrote:
> To prevent libvirtd from printing virNetSocketReadWire I/O errors when
> the virt-top command exits, explicitly disconnect from libvirtd.
> 
> Signed-off-by: Yuya Higashi <higashi.y...@fujitsu.com>
> ---
>  src/top.ml | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/top.ml b/src/top.ml
> index 75fbcb9..cbe655a 100644
> --- a/src/top.ml
> +++ b/src/top.ml
> @@ -306,7 +306,7 @@ let get_string maxlen =
>    )
>  
>  (* Main loop. *)
> -let rec main_loop ((_, batch_mode, script_mode, csv_enabled, stream_mode, _, 
> _, _)
> +let rec main_loop ((conn, batch_mode, script_mode, csv_enabled, stream_mode, 
> _, _, _)
>                    as setup) =
>    let csv_flags = !csv_cpu, !csv_mem, !csv_block, !csv_net in
>  
> @@ -372,7 +372,8 @@ let rec main_loop ((_, batch_mode, script_mode, 
> csv_enabled, stream_mode, _, _,
>        if not !quit || !end_time <> None then
>       millisleep delay
>      )
> -  done
> +  done;
> +  C.close conn
>  

Thanks - included as commit 4b15ee2440b0e70e3c1eb5e164ded493e2d8f0c8

If you want this in RHEL you'll need to file a bug here:

https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%209&component=virt-top

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

Reply via email to