IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 20, 2013, 6:17:32 PM (13 years ago)
Author:
watersc1
Message:

I'm going to commit before I start moving everything around so that they're sane.

Location:
trunk/ippm/FilesMonitoring/Supervision
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippm/FilesMonitoring/Supervision/cluster_status.py

    r35945 r35984  
    99toGigs = 1024.**3
    1010toGigsFromK = 1024.**2
     11
     12bin_directory = "%s/%s/bin" % (os.environ['PSCONFDIR'], os.environ['PSCONFIG'])
     13share_directory = "%s/%s/share/filemon/" % (os.environ['PSCONFDIR'], os.environ['PSCONFIG'])
    1114
    1215def usage():
     
    4750        sql_check = True
    4851    elif argv[1] == 'mhpcc':
    49         nodesFilename = '/home/panstarrs/schastel/local/share/ippMhpccStorageNodes'
     52        nodesFilename = '%s/ippMhpccStorageNodes' % share_directory
    5053        nodesFile = open(nodesFilename)
    5154        nodes = []
     
    8689                  "stsci07.0", "stsci07.1", "stsci07.2",
    8790                  "stsci08.0", "stsci08.1", "stsci08.2",
    88                   "stsci09.0", "stsci09.1", "stsci09.2", ]
     91                  "stsci09.0", "stsci09.1", "stsci09.2",
     92                  "stsci10.0", "stsci10.1", "stsci10.2",
     93                  "stsci11.0", "stsci11.1", "stsci11.2",
     94                  "stsci12.0", "stsci12.1", "stsci12.2",
     95                  "stsci13.0", "stsci13.1", "stsci13.2",
     96                  "stsci14.0", "stsci14.1", "stsci14.2",
     97                  "stsci15.0", "stsci15.1", "stsci15.2",
     98                  "stsci16.0", "stsci16.1", "stsci16.2",
     99                  "stsci17.0", "stsci17.1", "stsci17.2",
     100                  "stsci18.0", "stsci18.1", "stsci18.2",
     101                  "stsci19.0", "stsci19.1", "stsci19.2", ]
    89102    elif argv[1] == 'all':
    90         nodesFilename = '/home/panstarrs/schastel/local/share/ippMhpccStorageNodes'
     103        nodesFilename = '%s/ippMhpccStorageNodes' % share_directory
    91104        nodesFile = open(nodesFilename)
    92105        nodes = []
     
    106119                        "stsci07.0", "stsci07.1", "stsci07.2",
    107120                        "stsci08.0", "stsci08.1", "stsci08.2",
    108                         "stsci09.0", "stsci09.1", "stsci09.2", ])
     121                        "stsci09.0", "stsci09.1", "stsci09.2",
     122                        "stsci10.0", "stsci10.1", "stsci10.2",
     123                        "stsci11.0", "stsci11.1", "stsci11.2",
     124                        "stsci12.0", "stsci12.1", "stsci12.2",
     125                        "stsci13.0", "stsci13.1", "stsci13.2",
     126                        "stsci14.0", "stsci14.1", "stsci14.2",
     127                        "stsci15.0", "stsci15.1", "stsci15.2",
     128                        "stsci16.0", "stsci16.1", "stsci16.2",
     129                        "stsci17.0", "stsci17.1", "stsci17.2",
     130                        "stsci18.0", "stsci18.1", "stsci18.2",
     131                        "stsci19.0", "stsci19.1", "stsci19.2", ]
    109132    else:
    110133        nodes = [ ]
     
    138161
    139162def is_update_running(node):
    140     p = subprocess.Popen( ['/home/panstarrs/schastel/dev/FilesMonitoring/Supervision/node_status.py', node],
     163    p = subprocess.Popen( ['%s/node_status.py' % bin_directory, node],
    141164                          stderr = subprocess.PIPE,
    142165                          stdout = subprocess.PIPE)
  • trunk/ippm/FilesMonitoring/Supervision/node_status.py

    r35945 r35984  
    1010import datetime
    1111
     12bin_directory = "%s/%s/bin" % (os.environ['PSCONFDIR'], os.environ['PSCONFIG'])
     13share_directory = "%s/%s/share/filemon/" % (os.environ['PSCONFDIR'], os.environ['PSCONFIG'])
     14node_directory = '/export/%s/ipp_filemon/'
     15
    1216def process_arguments(argv):
    1317    if len(argv) == 1:
     
    1519        sys.exit(1)
    1620    elif argv[1] == 'all':
    17         nodesFilename = '/home/panstarrs/schastel/local/share/ippMhpccStorageNodes'
     21        nodesFilename = '%s/ippMhpccStorageNodes' % share_directory
    1822        nodesFile = open(nodesFilename)
    1923        nodes = []
     
    4549
    4650def get_seconds_since_last_message(ssh, node):
    47     logfilename = '/export/%s/schastel/logs/%s_refresh.log' % (node, node)
     51    logfilename = ('%s/%s' % (node_directory, '/logs/%s_refresh.log') % (node, node))
    4852    stdin, stdout, stderr = ssh.exec_command('tail -n 1 %s' % (logfilename))
    4953    for line in stdout:
Note: See TracChangeset for help on using the changeset viewer.