Gathering network statistics under Virtual Server

Gathering network statistics under Virtual Server

  • Comments 2

Last week I showed how to use the VM Accountant object in order to retrieve information about virtual machine uptime.  Today I have a simple script that uses the VM Accountant in order to display information about how much network traffic the virtual machines have received and sent:

Set vs = CreateObject("VirtualServer.Application")
set vms = vs.VirtualMachines

For Each vm in vms
        Wscript.Echo "Virtual machine: " & vm.Name
        Wscript.Echo "Network bytes sent: " & vm.Accountant.NetworkBytesSent
        Wscript.Echo "Network bytes received: " & vm.Accountant.NetworkBytesReceived
        Wscript.Echo
Next

Cheers,
Ben

Leave a Comment
  • Please add 4 and 3 and type the answer here:
  • Post
  • Is there object model documentation for Virtual Sever? I'm finding a lot of scripts on the internet, but no object model.
  • There's the huge Virtual Server 2005 COM Interface help file included with Virtual Server.

    "Microsoft Virtual Server 2005 COM Interface
    Purpose

    This documentation provides information about the Microsoft® Virtual Server 2005 COM interface.


    Where Applicable

    Microsoft Virtual Server 2005 allows you to create separate virtual machines on top of your Microsoft Windows® desktop, where you can install virtually any Intel-architecture operating system. Each virtual machine emulates a complete hardware system—from processor to network card—in a self-contained, isolated software environment, enabling the simultaneous operation of otherwise incompatible systems.


    Developer Audience

    The Virtual Server 2005 COM interface reference is for developers who are creating client applications that automate the deployment and operation of virtual machines.
    "
Page 1 of 1 (2 items)