0

In CloudSim package, I want to monitor Cpu utilization and bandwidth utilization of each vm in constant intervals (for example every 5 min) when vms are running cloudlets.

How can I do it?

Thanks

M_R
  • 1
  • 1
  • 1
  • I found the functions getUtilizationOfCpu(double time) and getUtilizationOfBw(double time) of Vm class. But I don't know where I should call this functions. It should be when cloudlets are running not after finishing cloudlets. I don't know in which class I should use these functions. – M_R Feb 10 '15 at 16:33
  • I also find CloudSimEx package but I don't know how do I using it and does it working for my problem. – M_R Feb 10 '15 at 16:42
  • for calling these methods during the simulation, either you need to code the broker or explore how to pause and resume simulation. – Mohan Sharma May 03 '18 at 18:35
  • if you just want the utilization history data than the answer by Anantha Raju C is good one but if you want to take the decision by the utilization data in runtime than I think you need to pause/resume the simulation in between or code the broker. – Mohan Sharma May 03 '18 at 18:38

1 Answers1

0

Monitoring VM CPU Utilization.

"PowerHostUtilizationHistory" this class stores CPU utilization history. "getUtilizationHistory" - this method gets the utilization history.

for detailed instructions on how to use "PowerHostUtilizationHistory" class, visit this link. http://www.cloudbus.org/cloudsim/doc/api/org/cloudbus/cloudsim/power/PowerHostUtilizationHistory.html

Monitoring VM Bw utilization.

"Vm" this class has a method called "getBw", use this method to get Bw usage details.

for detailed instructions on how to use "Vm" class, visit this link. http://www.cloudbus.org/cloudsim/doc/api/org/cloudbus/cloudsim/Vm.html

you can also use "BwProvisioner" class particularly the method "getUsedBw" to get the usage details. http://www.cloudbus.org/cloudsim/doc/api/org/cloudbus/cloudsim/provisioners/BwProvisioner.html

As far as monitoring CPU & Bw utilization at regular intervals is concerned, call these methods at regular intervals using the time function. or, get the complete history of CPU and Bw utilization and select the values at particular intervals that you may desire.

Anantha Raju C
  • 1,780
  • 12
  • 25
  • 35