added UPB infrastructure details and scripts
authorRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Sat, 10 Apr 2010 10:08:26 +0000 (13:08 +0300)
committerRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Sat, 10 Apr 2010 10:08:38 +0000 (13:08 +0300)
experiments/upb-infrastructure/description.txt [new file with mode: 0644]
experiments/upb-infrastructure/get-infra-details [new file with mode: 0755]

diff --git a/experiments/upb-infrastructure/description.txt b/experiments/upb-infrastructure/description.txt
new file mode 100644 (file)
index 0000000..9fc6617
--- /dev/null
@@ -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 (executable)
index 0000000..9c93194
--- /dev/null
@@ -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