IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35984


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
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippm/FilesMonitoring/NodeRelated/update_table_undefined.py

    r35945 r35984  
    1010    from ipp.lifetime_templates import Template
    1111except ImportError:
    12     sys.path.append('/home/panstarrs/schastel/local/share/python/')
     12    sys.path.append('%s/%s/share/python/' % os.environ['PSCONFDIR'], os.environ['PSCONFIG'])
    1313    sys.stderr.write('ImportError')
    1414    for folder in sys.path:
  • 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:
  • trunk/ippm/FilesMonitoring/generate_tables.py

    r35945 r35984  
    22
    33letters = '0123456789abcdef'
     4share_directory = "%s/%s/share/filemon/" % (os.environ['PSCONFDIR'], os.environ['PSCONFIG'])
    45
    56nodes = []
    6 nodesFile = open('/home/panstarrs/schastel/local/share/ippMhpccStorageNodes')
     7nodesFile = open('%s/ippMhpccStorageNodes' % share_directory)
    78for line in nodesFile:
    89    nodes.append(line[:-1])
     
    1011
    1112template = ""
    12 templateFile = open('sql/CreateTablesTemplate.sql')
     13templateFile = open('%s/sql/CreateTablesTemplate.sql' % share_directory)
    1314for line in templateFile:
    1415    template = "%s%s" % (template, line)
  • trunk/ippm/FilesMonitoring/populate_table.py

    r35945 r35984  
    55import os
    66
     7bin_directory = "%s/%s/bin" % (os.environ['PSCONFDIR'], os.environ['PSCONFIG'])
     8share_directory = "%s/%s/share/filemon/" % (os.environ['PSCONFDIR'], os.environ['PSCONFIG'])
     9node_directory = '/export/%s.0/ipp_filemon/'
     10
    711def populate(node, directory):
     12    root_dir = "%s/populate" % node_directory
    813    try:
    9         os.makedirs('/export/%s.0/schastel/populate/sql' % node)
     14        os.makedirs(('%s/sql' % root_dir) % node)
    1015    except OSError:
    1116        pass
    12     output = open('/export/%s.0/schastel/populate/sql/populate_%s_%s.sql' % (node, node, directory),
     17    output = open(('%s/%s' % (root_dir, 'sql/populate_%s_%s.sql')) % (node, node, directory),
    1318                  'w')
    14     ignored = open('/export/%s.0/schastel/populate/ignored_%s_%s' % (node, node, directory),
     19    ignored = open(('%s/%s' % (root_dir, 'log/ignored_%s_%s')) % (node, node, directory),
    1520                   'w')
    16     stdout = open('/export/%s.0/schastel/populate/stdout_%s_%s' % (node, node, directory),
     21    stdout = open(('%s/%s' % (root_dir, 'log/stdout_%s_%s')) % (node, node, directory),
    1722                  'w')
    18     index_filename = '/export/%s.0/schastel/mlocate/%s.%s.mlocate_db' % (node, node, directory)
    19     p = subprocess.Popen(('/home/panstarrs/schastel/local/bin/locate -d %s .'
    20                           % index_filename).split(' '),
     23    index_filename = ('%s/%s' % (node_directory,'/mlocate/%s.%s.mlocate_db')) % (node, node, directory)
     24    p = subprocess.Popen(('%s/locate -d %s .'
     25                          % bin_directory,index_filename).split(' '),
    2126                         stdout = subprocess.PIPE)
    2227    p.poll()
     
    4146letters = '0123456789abcdef'
    4247insertTemplate=""
    43 sqlFile = open('/home/panstarrs/schastel/dev/FilesMonitoring/sql/insert_template.sql')
     48sqlFile = open('%s/sql/insert_template.sql' % share_directory)
    4449for line in sqlFile:
    4550    insertTemplate = "%s%s" % (insertTemplate, line)
  • trunk/ippm/FilesMonitoring/tools/deneb-locate.py

    r35945 r35984  
    7272              ("stsci08", "0"), ("stsci08", "1"), ("stsci08", "2"),
    7373              ("stsci09", "0"), ("stsci09", "1"), ("stsci09", "2"),
     74              ("stsci10", "0"), ("stsci10", "1"), ("stsci10", "2"),
     75              ("stsci11", "0"), ("stsci11", "1"), ("stsci11", "2"),
     76              ("stsci12", "0"), ("stsci12", "1"), ("stsci12", "2"),
     77              ("stsci13", "0"), ("stsci13", "1"), ("stsci13", "2"),
     78              ("stsci14", "0"), ("stsci14", "1"), ("stsci14", "2"),
     79              ("stsci15", "0"), ("stsci15", "1"), ("stsci15", "2"),
     80              ("stsci16", "0"), ("stsci16", "1"), ("stsci16", "2"),
     81              ("stsci17", "0"), ("stsci17", "1"), ("stsci17", "2"),
     82              ("stsci18", "0"), ("stsci18", "1"), ("stsci18", "2"),
     83              ("stsci19", "0"), ("stsci19", "1"), ("stsci19", "2"),
    7484              ]
    7585
Note: See TracChangeset for help on using the changeset viewer.