#5, First Floor, 4th Street , Dr. Subbarayan Nagar, Kodambakkam, Chennai-600 024 pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to find the available resources in each Host?
  • The CPU capacity, Bandwidth and storage are referred as resources. These resources decreases when each VM allocated to a Host. The methods to get the available/remaining resources in a host:
  • Let “host” be the Host object.
    // get Host list from the datacenter.
    getHostList();
    int size = getHostList().size();
    for(int i=0; i<size; i++)
    {
    host = getHostList().get(j); // get each Host from the list
    int hid = host.getId();
    double mip = host.getAvailableMips(); //retrieves the available Cpu capacity
    long band = host.getBw(); //retrieves the available Bandwidth capacity
    long st = host.getStorage(); //retrieves the available Storage capacity
    }