Dear Darshan, Thanks for your answer. for running batch script, I also need IConsole::IGuest.executeProcess() that Alexey helped me for this API. Thank you again.
On Thu, Feb 23, 2012 at 1:10 AM, K M Darshan <[email protected]>wrote: > You can also use batch scripts to start the API monitor when the virtual > machine starts. > > Sent from my phone > > On Feb 22, 2012, at 1:03 PM, Mansour Ahmadi <[email protected]> wrote: > > Dear Alexey, > > Thanks a lot for your nice information. It is so helpful. > I'll check it and inform you the result :-) > Thanks again. > > > On Thu, Feb 23, 2012 at 12:19 AM, Alexey Eromenko <[email protected]>wrote: > >> 1. running exe from host on guest is possible via "Guest Control Execute". >> >> 1.a. copy the exe via shared folders. >> >> 1.b. run it >> IConsole::IGuest.executeProcess() >> >> Example in python: >> console.guest.executeProcess(command.split()[0], flags, >> command.split()[1:], env, self.guestcontrol_user, >> self.guestcontrol_password, timeout*1000) >> >> 2. monitor: >> VirtualBox has built-in statistics for many metrics. >> >> IConsole::IDebugger.getStats() >> >> Example in python: >> self.statBytesReceived = >> self.console.debugger.getStats("*%s/ReceiveBytes" % str(int(vnic)-1), >> False).splitlines()[2].split("=")[1].split('"')[1] >> self.statBytesSent = >> self.console.debugger.getStats("*%s/TransmitBytes" % str(int(vnic)-1), >> False).splitlines()[2].split("=")[1].split('"')[1] >> >> 3. Screenshots -- work in action: >> http://forum.gns3.net/topic3262.html >> >> First screenshot shows a 3rd party program getting information from >> guest OS (such as network statistics and IP addresses) >> 2nd screenshot shows a 3rd party program *sending* a command from host >> OS to guest OS. >> >> -- >> -Alexey Eromenko "Technologov" >> >> _______________________________________________ >> vbox-dev mailing list >> [email protected] >> https://www.virtualbox.org/mailman/listinfo/vbox-dev >> > > _______________________________________________ > vbox-dev mailing list > [email protected] > https://www.virtualbox.org/mailman/listinfo/vbox-dev > >
_______________________________________________ vbox-dev mailing list [email protected] https://www.virtualbox.org/mailman/listinfo/vbox-dev
