On Thu, 10 Aug 2017 20:04:32 +0800 Sam <batmanu...@gmail.com> wrote: > Hi all, > > I want to send command through qga socket, but sometimes it will hanged > there. So I want to test qga socket available first, then send qga command. > > So my question is how to test qga socket available, which is not taken by > others? By timeout? >
I am not aware of any fast and reliable way. I'd suggest sending the "guest-sync" command and wait for response with a timeout. Tomas -- Tomáš Golembiovský <tgole...@redhat.com>