Ignore:
Timestamp:
05/01/12 14:53:13 (12 years ago)
Author:
bas
Message:

renamed some file and added documentation

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/examples/pbs_jobmonitor

    r281 r282  
    88#   $URL$
    99#
    10 # topjob, gojob jobnr [nodenr]
    11 #               jobnr: the number of the job
    12 #               nodenr: the rank of the node in the job
     10# pbs_jobmonitor, pbs_joblogin <jobnr> [nodenr]
     11#    jobnr: the number of the job
     12#    nodenr: the rank of the node in the job
     13#
    1314# depending on the name with this script is called it performs the
    1415# following:
    1516
    16 # called as topjob:
     17# called as pbs_jobmonitor:
    1718#       shows the output of top -u user on the node
    1819#       - one cycle of top
    1920#       - user: the user the job belongs to
    2021#
    21 # called as gojob:
     22# called as pbs_joblogin:
    2223#       logs in to the node as the user who invokes this script
    2324#            (os.getenv('USER'))
     
    4041
    4142def usage(a):
    42   if a == 'gojob':
     43  if a == 'pbs_jobmonitor':
     44    print a,'shows the system usage of a node where a job is running'
     45  if a == 'pbs_joblogin':
    4346    print a,'logs you in to a node where a job is running'
    44   if a == 'topjob':
    45     print a,'shows the system usage of a node where a job is running'
    4647   
    4748  print 'Usage:'
    48   print a,'jobnumber [nodenumber]'
    49   print 'where jobnumber is the number of the job'
     49  print a,'<jobnumber> [nodenumber]'
     50  print 'where <jobnumber> is the number of the job'
    5051  print '      nodenumber is the rank number of the node allocated to the job'
    5152  print '      (default 0)'
     
    106107  sys.exit(1)
    107108
    108 if me == 'topjob':
     109if me == 'pbs_jobmonitor':
    109110  user=job['Job_Owner'][0].split('@')[0]
    110111  print 'top for node #',num,':',nodes[num],'user:',user
     
    112113  os.system('ssh '+nodes[num]+' top -n1 -b -u ' + user)
    113114
    114 if me == 'gojob':
     115if me == 'pbs_joblogin':
    115116  user = os.getenv('USER')
    116117  print 'logging in to node #',num,':',nodes[num],'user:',user
Note: See TracChangeset for help on using the changeset viewer.