Whamcloud - gitweb
A Perl script to hammer concurrently at multiple mount points
authorpschwan <pschwan>
Mon, 1 Jul 2002 15:26:52 +0000 (15:26 +0000)
committerpschwan <pschwan>
Mon, 1 Jul 2002 15:26:52 +0000 (15:26 +0000)
lustre/tests/create.pl [new file with mode: 0644]

diff --git a/lustre/tests/create.pl b/lustre/tests/create.pl
new file mode 100644 (file)
index 0000000..c9aa192
--- /dev/null
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+
+$mtpt = shift || die;
+$mount_count = shift || die;
+$i = shift || die;
+
+while ($i--) {
+    $which = int(rand() * $mount_count) + 1;
+    $path = "$mtpt$which/";
+
+    $d = int(rand() * 5);
+    print `./mcreate $path$d`;
+
+    $which = int(rand() * $mount_count) + 1;
+    $path = "$mtpt$which/";
+
+    $d = int(rand() * 5);
+    unlink("$path$d") || print "unlink($path$d): $!\n"
+}