Sie sind auf Seite 1von 3

Running the CloudSim examples

----------------------------To run the CloudSim examples you need to do the following steps.
In Windows:
1. cd <PATH TO CLOUDSIM PACKAGE>\jars
2. java -classpath cloudsim-<VERSION>.jar;cloudsim-examples-<VERSION>.jar org.cl
oudbus.cloudsim.examples.CloudSimExample<EXAMPLE NUMBER>
In Unix/Linux:
1. cd <PATH TO CLOUDSIM PACKAGE>/jars
2. java -classpath cloudsim-<VERSION>.jar:cloudsim-examples-<VERSION>.jar org.cl
oudbus.cloudsim.examples.CloudSimExample<EXAMPLE NUMBER>
Where you need to replace:
<PATH TO CLOUDSIM PACKAGE> - by the path to a directory where you have unpacked
the CloudSim package
<VERSION> - by the version of the downloaded CloudSim package
<EXAMPLE NUMBER> - by the of number of the example you want to run
CloudSim examples source code
----------------------------You can find the source code of the examples in <PATH TO CLOUDSIM PACKAGE>/examp
les/org/cloudbus/cloudsim/examples/
Compiling and running examples
-----------------------------To compile and run an example (let's say org.cloudbus.cloudsim.examples.CloudSim
Example1) you need to do the following steps:
In Windows:
1. cd <PATH TO CLOUDSIM PACKAGE>
2. javac -classpath jars\cloudsim-<VERSION>.jar;examples examples\org\cloudbus\c
loudsim\examples\CloudSimExample1.java
3. java -classpath jars\cloudsim-<VERSION>.jar;examples org.cloudbus.cloudsim.ex
amples.CloudSimExample1
In Unix/Linux:
1. cd <PATH TO CLOUDSIM PACKAGE>
2. javac -classpath jars/cloudsim-<VERSION>.jar:examples examples/org/cloudbus/c
loudsim/examples/CloudSimExample1.java
3. java -classpath jars/cloudsim-<VERSION>.jar:examples org.cloudbus.cloudsim.ex
amples.CloudSimExample1
Compiling and running examples from the power package
----------------------------------------------------To compile and run an example (let's say org.cloudbus.cloudsim.examples.power.pl
anetlab.LrMc) you need to do the following steps:

In Windows:
1. Download Michael Thomas Flanagan's Java Scientific Library from http://www.ee
.ucl.ac.uk/~mflanaga/java/
2. Copy flanagan.jar to <PATH TO CLOUDSIM PACKAGE>/jars/
3. cd <PATH TO CLOUDSIM PACKAGE>
4. javac -classpath jars\cloudsim-<VERSION>.jar;jars\flanagan.jar;examples examp
les\org\cloudbus\cloudsim\examples\power\planetlab\LrMc.java
5. java -classpath jars\cloudsim-<VERSION>.jar;jars\flanagan.jar;examples org.cl
oudbus.cloudsim.examples.power.planetlab.LrMc
In Unix/Linux:
1. cd <PATH TO CLOUDSIM PACKAGE>
2. chmod +x ./install-flanagan.sh
3. ./install-flanagan.jar
4. javac -classpath jars/cloudsim-<VERSION>.jar:jars/flanagan.jar:examples examp
les/org/cloudbus/cloudsim/examples/power/planetlab/LrMc.java
5. java -classpath jars/cloudsim-<VERSION>.jar:jars/flanagan.jar:examples org.cl
oudbus.cloudsim.examples.power.planetlab.LrMc
Description of the CloudSim examples
-----------------------------------Here is the description of what each example does:
CloudSimExample1.java : shows how to create a datacenter with one host and run o
ne cloudlet on it.
CloudSimExample2.java : shows how to create a datacenter with one host and run t
wo cloudlets on it.
The cloudlets run in VMs with the same MIPS requirements
. The cloudlets will take the same
time to complete the execution.
CloudSimExample3.java : shows how to create a datacenter with two hosts and run
two cloudlets on it.
The cloudlets run in VMs with different MIPS requirement
s. The cloudlets will take different
time to complete the execution depending on the requeste
d VM performance.
CloudSimExample4.java : shows how to create two datacenters with one host each a
nd run two cloudlets on them.
CloudSimExample5.java : shows how to create two datacenters with one host each a
nd run cloudlets of two users on them.
CloudSimExample6.java : shows how to create scalable simulations.
CloudSimExample7.java : shows how to pause simulations.
CloudSimExample8.java : shows how to add entities in run time.
network: this package contains examples on how to run simulation with network si
mulation.
power: this package contains examples on how to use CloudSim's power-aware featu

res.

Das könnte Ihnen auch gefallen