From 446c23f6b9bd2d6f9a60e1ebbf979055c8e03507 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Thu, 5 May 2011 17:59:03 +0300 Subject: [PATCH] Added scripts to generate network aliases and delete it --- projects/sgauthstress/mkifs.sh | 17 +++++++++++++++++ projects/sgauthstress/rmifs.sh | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100755 projects/sgauthstress/mkifs.sh create mode 100755 projects/sgauthstress/rmifs.sh diff --git a/projects/sgauthstress/mkifs.sh b/projects/sgauthstress/mkifs.sh new file mode 100755 index 00000000..b73ca719 --- /dev/null +++ b/projects/sgauthstress/mkifs.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +users=`cat users.1000` +hi=0 +lo=0 +for user in $users +do + cp -R /var/stargazer/users/test /var/stargazer/users/$user + if (( $lo > 254 )) + then + lo=0 + let hi++ + fi + let lo++ + ip="10.22.$hi.$lo" + ip addr add $ip dev eth0 +done diff --git a/projects/sgauthstress/rmifs.sh b/projects/sgauthstress/rmifs.sh new file mode 100755 index 00000000..6469f0df --- /dev/null +++ b/projects/sgauthstress/rmifs.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +users=`cat users.1000` +hi=0 +lo=0 +for user in $users +do + cp -R /var/stargazer/users/test /var/stargazer/users/$user + if (( $lo > 254 )) + then + lo=0 + let hi++ + fi + let lo++ + ip="10.22.$hi.$lo/32" + ip addr del $ip dev eth0 +done -- 2.44.2