Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
WYuei opened this issue Jan 3, 2023 · 0 comments
Open

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

WYuei opened this issue Jan 3, 2023 · 0 comments

Comments

@WYuei
Copy link

WYuei commented Jan 3, 2023

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);
      }```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant