Re: how to get vm uptime through libvirt api

2022-07-26 Thread Jiatong Shen
> > On Tue, Jul 26, 2022 at 10:27:19AM +0200, Michal Prívozník wrote: > > On 7/26/22 10:07, Jiatong Shen wrote: > > > thank you very much for reply. I have got another question which is off > > > topic. > > > Am I able to get vm's process id through libvirt api? > > > > Unfortunately, no. We specif

Re: how to get vm uptime through libvirt api

2022-07-26 Thread Jiatong Shen
Thank you very much for reply. I'll read the code and try to provide patch . Best, Norman On Tue, Jul 26, 2022 at 4:27 PM Michal Prívozník wrote: > On 7/26/22 10:07, Jiatong Shen wrote: > > thank you very much for reply. I have got another question which is off > > topic. > > Am I able to get v

Re: how to get vm uptime through libvirt api

2022-07-26 Thread Daniel P . Berrangé
On Tue, Jul 26, 2022 at 10:27:19AM +0200, Michal Prívozník wrote: > On 7/26/22 10:07, Jiatong Shen wrote: > > thank you very much for reply. I have got another question which is off > > topic. > > Am I able to get vm's process id through libvirt api? > > Unfortunately, no. We specifically try to a

Re: how to get vm uptime through libvirt api

2022-07-26 Thread Michal Prívozník
On 7/26/22 10:07, Jiatong Shen wrote: > thank you very much for reply. I have got another question which is off > topic. > Am I able to get vm's process id through libvirt api? Unfortunately, no. We specifically try to avoid telling users this information so that they are not tempted to go behind

Re: how to get vm uptime through libvirt api

2022-07-26 Thread Jiatong Shen
thank you very much for reply. I have got another question which is off topic. Am I able to get vm's process id through libvirt api? Thank you very much. Best, Norman On Tue, Jul 26, 2022 at 4:04 PM Michal Prívozník wrote: > On 7/26/22 09:48, Jiatong Shen wrote: > > Thank you very much for rep

Re: how to get vm uptime through libvirt api

2022-07-26 Thread Michal Prívozník
On 7/26/22 09:48, Jiatong Shen wrote: > Thank you very much for reply. Initially my thought of uptime is equal > to executing to `uptime` inside a virtual machine.  > as for the second case, where virtual machine is paused for a period, > does libvirt expose an api to get how long qemu process > ha

Re: how to get vm uptime through libvirt api

2022-07-26 Thread Jiatong Shen
Thank you very much for reply. Initially my thought of uptime is equal to executing to `uptime` inside a virtual machine. as for the second case, where virtual machine is paused for a period, does libvirt expose an api to get how long qemu process has existed? thank you. Best, Norman On Tue, Jul

Re: how to get vm uptime through libvirt api

2022-07-26 Thread Michal Prívozník
On 7/26/22 08:49, Jiatong Shen wrote: > Hello community, > >    I would like to know if there is an api to get a virtual machine's > uptime. Thank you in advance for the help. There's no such API because not even qemu guest agent has an explicit API for that. However, it has an API to execute bin