Re: [PATCH] qemu_process: add pid of vm in domain log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28.09.2016 13:43, Chen Hanxiao wrote:
> From: Chen Hanxiao <chenhanxiao@xxxxxxxxx>
> 
> Add pid of VM in domain log.
> We used to show this info in debug log.
> 
> For example:
> If a process send SIGKILL to a qemu process,
> we could find something in audit logs.
> Then the pid of VM in domain log will be helpful.
> 
> Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxx>
> ---
>  src/qemu/qemu_process.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index 27d04a4..8510a89 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -5392,11 +5392,14 @@ qemuProcessLaunch(virConnectPtr conn,
>                             _("Domain %s didn't show up"), vm->def->name);
>              rv = -1;
>          }
> -        VIR_DEBUG("QEMU vm=%p name=%s running with pid=%llu",
> -                  vm, vm->def->name, (unsigned long long)vm->pid);
> +        qemuDomainLogContextWrite(logCtxt,
> +                                  "QEMU vm=%p name=%s running with pid=%llu\n",
> +                                  vm,
> +                                  vm->def->name,
> +                                  (unsigned long long)vm->pid);
>      } else {
> -        VIR_DEBUG("QEMU vm=%p name=%s failed to spawn",
> -                  vm, vm->def->name);
> +        qemuDomainLogContextWrite(logCtxt, "QEMU vm=%p name=%s failed to spawn",
> +                                  vm, vm->def->name);
>      }
>  
>      VIR_DEBUG("Writing early domain status to disk");
> 

Can't we have both?

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]