forked from NOAA-EMC/GSI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Roll back oznmon changes which were in master before aborting a PR.
- Loading branch information
1 parent
1179a8d
commit 1f631ca
Showing
14 changed files
with
107 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#! /usr/bin/perl | ||
|
||
#------------------------------------------------------------------- | ||
# get_hostname.pl | ||
# | ||
# This script determines the hostname of the current machine. The | ||
# possiblities are wcoss_c, wcoss_d, hera, or "" if the host is not | ||
# one of those three. | ||
#------------------------------------------------------------------- | ||
|
||
|
||
my $machine = ""; | ||
|
||
# | ||
# hera login nodes are hfe1-hfeN, and hostname command only returns the node name, | ||
# while wcoss_c and wcoss_d return [hostname].ncep.noaa.gov. Keep only the | ||
# actual hostname and see if it matches the node names for hera, wcoss_d, or wcoss_c. | ||
# | ||
my $host = ""; | ||
$host = ` hostname `; | ||
chomp( $host ); | ||
|
||
if( $host =~ /\./ ) { | ||
my @hostnames = split( '\.', $host ); | ||
$host = $hostnames[0]; | ||
} | ||
|
||
if( $host =~ /hfe/ ) { | ||
$machine = "hera"; | ||
} | ||
elsif( $host =~ /login/ ) { | ||
$machine = "wcoss_c"; | ||
} | ||
elsif( $host =~ /v/ || $host =~ /m/ ){ # wcoss_d nodes are vXXaY and mXXaY | ||
$machine = "wcoss_d"; | ||
} | ||
|
||
print "$machine"; | ||
|
||
exit 0; | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.