commit 631f4067547f7591b51639d908e93ca3b95c0e3a
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Thu Nov 10 14:27:20 2011 +0100
An example how to put a system under memory pressure using stress utility.
This type of test can check the network stack behavior under low memory
conditions.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Jiri Pirko <jpirko(a)redhat.com>
example_recipes/cmd_sequences/memory_pressure.xml | 22 +++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/example_recipes/cmd_sequences/memory_pressure.xml b/example_recipes/cmd_sequences/memory_pressure.xml
new file mode 100644
index 0000000..2ba4c48
--- /dev/null
+++ b/example_recipes/cmd_sequences/memory_pressure.xml
@@ -0,0 +1,22 @@
+<command_sequence>
+ <command type='test' value='Iperf' machine_id='2' bg_id="1">
+ <options>
+ <option name="role" value="server"/>
+ <option name="bind" value="192.168.122.102" />
+ <option name="duration" value="3600"/>
+ </options>
+ </command>
+ <command type='exec' value='sleep 30' />
+ <command type='test' value='Iperf' machine_id='1' bg_id="1">
+ <options>
+ <option name="role" value="client"/>
+ <option name="iperf_server" value="192.168.122.102" />
+ <option name="duration" value="120"/>
+ </options>
+ </command>
+ <command type='exec' value='sleep 30' />
+ <command type='exec' value="fb=`free -b | grep Mem: | sed 's/[ ]\+/ /g' | cut -f4 -d' '`; stress -m 10 --vm-bytes $(( $fb / 10 ))" machine_id='1' bg_id='2'/>
+ <command type='wait' machine_id='1' value='1'/>
+ <command type='kill' machine_id='1' value='2' />
+ <command type='kill' machine_id='2' value='1' />
+</command_sequence>