Skip to content

how to get the allocated CPU resource for each gateway #16

Description

@WYuei

I'm using iFogsim2 for a simulation of computational offloading. I want to know how to use iFogsim2 to get the CPU usage of each gateway over time?
I refer to your paper, which mentions that the executeTuple() function can monitor resources.
Then I find updateEnergyConsumption() function in Class FogDevice mentioned totalMipsAllocated.But when I debugged it,the Mips add twice with the MIPS of the mobile.Why is that happen?I mean the totalMipsAllocated looks like how many APPModules allocated CPU,but it seems not to be.Please tell me how to get the allocated CPU mips if anyone could.
Best Weshes.

for (final Vm vm : getHost().getVmList()) {
        AppModule operator = (AppModule) vm;
        operator.updateVmProcessing(CloudSim.clock(), getVmAllocationPolicy().getHost(operator).getVmScheduler()
                .getAllocatedMipsForVm(operator));
        totalMipsAllocated += getHost().getTotalAllocatedMipsForVm(vm);
      }```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions