1 arta 1.1 #!/usr/bin/perl -w
2
3 use Sys::Hostname;
4
5 my($hostname);
6 my($machtype);
7
8 # first figure out what type of Stanford machine this script is running on
9 $hostname = hostname();
10
11 if ($hostname =~ /j1/)
12 {
13 $machtype = "j1";
14 }
15 elsif ($hostname =~ /d02/)
16 {
17 $machtype = "d02";
18 }
19 elsif ($hostname =~ /hmidb/)
20 {
21 $machtype = "dbserver";
22 arta 1.1 }
23 elsif ($hostname =~ /cl1n0/)
24 {
25 $machtype = "cluster";
26 }
27 elsif ($hostname =~ /dcs/)
28 {
29 $machtype = "dcs";
30 }
31
32 if (defined($machtype))
33 {
34 print STDOUT $machtype;
35 }
|