diff --git a/Makefile b/Makefile index 7add923..c978588 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ pull: git update-server-info cat loadbot/testservers |xargs --verbose -n 1 --replace=BLAH ssh BLAH "cd benchmarks; git pull" -screen: +docpu: cat loadbot/testservers |xargs --verbose -n 1 --replace=BLAH ssh BLAH "screen -d -m -S loadbot -c /root/benchmarks/screenrc" killall: diff --git a/loadbot/init_all.sh b/loadbot/init_all.sh index 1d0fc0c..654080f 100755 --- a/loadbot/init_all.sh +++ b/loadbot/init_all.sh @@ -1,24 +1,6 @@ #!/bin/bash -x -#SELECT droplets.name, sizes.memory, vnics.vif as vname, ip_addresses.ip, images.name, servers.name from droplets -# JOIN sizes -# ON droplets.size_id = sizes.id -# JOIN vnics -# ON droplets.id = vnics.droplet_id -# JOIN ip_addresses -# ON vnics.ip_address_id = ip_addresses.id -# JOIN images -# ON droplets.image_id = images.id -# JOIN servers -# ON droplets.server_id = servers.id -# WHERE droplets.is_active=1; - -# cat /tmp/junk |awk '{print $8}' - - -# run this once when you have a new collection of test servers -rm .ssh/known_hosts -cat testservers |xargs -n 1 --replace=BLAH echo ./ssh.pl BLAH root dopass \$1 > do_all.sh +./make_do_all.pl bash -x do_all.sh "echo >> /etc/hosts" bash -x do_all.sh "echo 69.55.54.144 loadbot >> /etc/hosts" bash -x do_all.sh "restorecon -R /root/.ssh/" diff --git a/loadbot/make_do_all.pl b/loadbot/make_do_all.pl new file mode 100755 index 0000000..6a1216f --- /dev/null +++ b/loadbot/make_do_all.pl @@ -0,0 +1,15 @@ +#!/usr/bin/perl + +use strict; + +open OUT, ">do_all.sh"; + +foreach my $line (split "\n", `cat /tmp/junk`) { + my @parts = split " ", $line; + print OUT "./ssh.pl $parts[13] root $parts[7] \$1\n"; +} + +close OUT; + +# system "chmod +x do_all.sh"; +system "cat do_all.sh"; diff --git a/loadbot/showall.sql b/loadbot/showall.sql new file mode 100644 index 0000000..f67d729 --- /dev/null +++ b/loadbot/showall.sql @@ -0,0 +1,21 @@ +SELECT droplets.id, + droplets.name, + sizes.memory, + vnics.vif as vname, + ip_addresses.ip, + images.name as iname, + servers.name as sname, + droplets.status, + droplets.vnc_public + FROM droplets + JOIN sizes + ON droplets.size_id = sizes.id + JOIN vnics + ON droplets.id = vnics.droplet_id + JOIN ip_addresses + ON vnics.ip_address_id = ip_addresses.id + JOIN images + ON droplets.image_id = images.id + JOIN servers + ON droplets.server_id = servers.id + WHERE droplets.is_active=1;