From: Razvan Deaconescu Date: Sat, 10 Apr 2010 10:08:26 +0000 (+0300) Subject: added UPB infrastructure details and scripts X-Git-Tag: getopt_long~107 X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=a50149336d44f2264eb30c0f0d24f282dc3ed4cb;p=cs-p2p-next.git added UPB infrastructure details and scripts --- diff --git a/experiments/upb-infrastructure/description.txt b/experiments/upb-infrastructure/description.txt new file mode 100644 index 0000000..9fc6617 --- /dev/null +++ b/experiments/upb-infrastructure/description.txt @@ -0,0 +1,8 @@ +10 commodity hardware systems kindly provided by NCIT cluster[1] + +* 141.85.224.2{01..10} (p2p-next-{01..10}.grid.pub.ro) +* 1 GBit Ethernet links +* Debian GNU/Linux 5.0 Lenny (stable) +* Intel Pentium 4 3GHz, 64bit + +[1] http://cluster.grid.pub.ro/ diff --git a/experiments/upb-infrastructure/get-infra-details b/experiments/upb-infrastructure/get-infra-details new file mode 100755 index 0000000..9c93194 --- /dev/null +++ b/experiments/upb-infrastructure/get-infra-details @@ -0,0 +1,53 @@ +#!/bin/bash + +# +# use SSH and Linux commands to collect hardware and OS information for +# infrastructure systems +# +# root access is presumed/required +# + +remote_hosts=(141.85.224.201 141.85.224.202 141.85.224.203\ + 141.85.224.204 141.85.224.205 141.85.224.207\ + 141.85.224.208 141.85.224.210) + +get_disk_info() +{ + echo " * disk" + ssh -l root $1 "fdisk -l | grep '^Disk[ \t]\+/'" | sed 's/^\(.\)/ * \1/g' +} + +get_mem_info() +{ + echo " * mem" + ssh -l root $1 "free -m | grep '^Mem:'" | awk -F '[ \t]+' '{ printf "%s %sM\n", $1, $2; }' | sed 's/^\(.\)/ * \1/g' +} + +get_cpu_info() +{ + echo " * cpu" + ssh -l root $1 "cat /proc/cpuinfo | grep '\(processor\|vendor_id\|model\ name\)'" | sed 's/[ \t]\+/ /g;s/^\(.\)/ * \1/g' +} + +get_os_info() +{ + echo " * os" + ssh -l root $1 "cat /etc/issue" | sed 's/\\n//g;s/\\l//g' | sed 's/^\(.\)/ * \1/g' | sed '/^$/d' + ssh -l root $1 "uname -a" | sed 's/^\(.\)/ * \1/g' +} + +get_net_info() +{ + echo " * net" + ssh -l root $1 "mii-tool" | sed 's/^\(.\)/ * \1/g' +} + +for host in ${remote_hosts[*]}; do + echo "host: $host" + get_disk_info $host + get_mem_info $host + get_cpu_info $host + get_os_info $host + get_net_info $host + echo +done