(file) Return to getmachtype.pl CVS log (file) (dir) Up to [Development] / JSOC

File: [Development] / JSOC / Attic / getmachtype.pl (download)
Revision: 1.2, Fri Nov 15 17:05:49 2013 UTC (9 years, 6 months ago) by arta
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Changes to add new DRMS configuration parameter for the SUMS DB HOST, and localization clean-up.

#!/usr/bin/perl -w 

use Sys::Hostname;

my($hostname);
my($machtype);

 # first figure out what type of Stanford machine this script is running on
$hostname = hostname();

if ($hostname =~ /j1/)
{
   $machtype = "j1";
}
elsif ($hostname =~ /d02/)
{
   $machtype = "d02";
}
elsif ($hostname =~ /hmidb/)
{
   $machtype = "dbserver";
}
elsif ($hostname =~ /cl1n0/)
{
   $machtype = "cluster";
}
elsif ($hostname =~ /dcs/)
{
   $machtype = "dcs";
}

if (defined($machtype))
{
   print STDOUT $machtype;
}

Karen Tian
Powered by
ViewCVS 0.9.4