Get PID of a domain's QEMU instance from its domain ID

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

 



Hello,

I cannot find a way to retrieve PIDs of QEMU instances from libvirt domains'
IDs (I'm using libvirt C API). I recognize it sounds like a bad idea doing so
(and I know PIDs are explicitly made not available, as I gathered from the
source code and on your IRC channel) but I need that to use the perf_event_open
syscall in order to gather statistics on my QEMU/KVM guests. I also know
libvirt now supports some perf events but only a few and I need more. I could
submit patches to add them and I will definitely consider that but in the
meantime...

What would be the best way to get those PIDs? I tried using the XML file but
PID is hidden in there too. I took a look at QEMU Machine Protocol. Now I'm
going to walk /proc and match on guests names but it is not that elegant.
Any ideas?

Thanks,

Thibaut S.

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users



[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux