Skip to the content.

Dynamic section

After defining your links, you can add a dynamic section where you specify different events to happen, we are going to use the topology designed in Simple.

	<dynamic>
		<schedule name="client1" time="0.0" action="join"/>
		<schedule name="client2" time="0.0" action="join"/>
		<schedule name="client3" time="0.0" action="join"/>
		<schedule name="server"  time="0.0" action="join" amount="3"/>
		
	</dynamic>

Here we tell Kollaps to start all of the services at 0 (this is the default behavior).

Crashing services

Let’s say we want to crash client2 30 seconds into the experiment we can just add.

	<dynamic>
		<schedule name="client1" time="0.0" action="join"/>
		<schedule name="client2" time="0.0" action="join"/>
		<schedule name="client3" time="0.0" action="join"/>
		<schedule name="server"  time="0.0" action="join" amount="3"/>
        <schedule name="client2" time="30.0" action="crash"/>
		
	</dynamic>

Now we want to replace the link between s1-s2 to a better one at second 60.

	<dynamic>
		<schedule name="client1" time="0.0" action="join"/>
		<schedule name="client2" time="0.0" action="join"/>
		<schedule name="client3" time="0.0" action="join"/>
		<schedule name="server"  time="0.0" action="join" amount="3"/>
        <schedule name="client2" time="30.0" action="crash"/>
        <schedule origin ="s1" dest="s2" time = "60" latency="1" drop = "0" download = "100Mbps" upload="100Mbps"/>
	</dynamic>

What if we want to emulate a scenario where a link ceases to exist at second 70.

	<dynamic>
		<schedule name="client1" time="0.0" action="join"/>
		<schedule name="client2" time="0.0" action="join"/>
		<schedule name="client3" time="0.0" action="join"/>
		<schedule name="server"  time="0.0" action="join" amount="3"/>
        <schedule name="client2" time="30.0" action="crash"/>
        <schedule origin ="s1" dest="s2" time = "60" latency="1" drop = "0" download = "100Mbps" upload="100Mbps"/>
        <schedule origin ="s1" dest="s2" time = "70" action="leave"/>
	</dynamic>

Removing bridges

What if we want to emulate a cut off between the client and servers at the second 90, we can just remove the bridges by adding the following line.

	<dynamic>
		<schedule name="client1" time="0.0" action="join"/>
		<schedule name="client2" time="0.0" action="join"/>
		<schedule name="client3" time="0.0" action="join"/>
		<schedule name="server"  time="0.0" action="join" amount="3"/>
        <schedule name="client2" time="30.0" action="crash"/>
        <schedule origin ="s1" dest="s2" time = "60" latency="1" drop = "0" download = "100Mbps" upload="100Mbps"/>
        <schedule origin ="s1" dest="s2" time = "70" action="leave"/>
        <schedule name="s1" time="90.0" action="leave"/>
        <schedule name="s2" time="90.0" action="leave"/>
	</dynamic>