From: Maxim Mamontov Date: Thu, 5 May 2011 14:59:03 +0000 (+0300) Subject: Added scripts to generate network aliases and delete it X-Git-Tag: 2.407-p1~29 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/446c23f6b9bd2d6f9a60e1ebbf979055c8e03507 Added scripts to generate network aliases and delete it --- 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