CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
getRunAppsInfo Namespace Reference

Functions

def getAppLogFileName
 
def getAppPID
 
def getRunningAppsInfo
 

Variables

 fullinfo = False
 Script operation #. More...
 
tuple grid = getRunningAppsInfo(filename[0])
 
 headers = False
 
int i = 0
 
list newrecord = [record[0],record[3],record[4]]
 

Function Documentation

def getRunAppsInfo.getAppLogFileName (   srv,
  pid 
)

Definition at line 33 of file getRunAppsInfo.py.

Referenced by getRunningAppsInfo().

33 
34 def getAppLogFileName(srv,pid):
35 # try:
36  #pid=getAppPID(srv,port)
37  if pid=="App Not Running":
38  return "No active log file"
39  else:
40  print "Connecting to server: "+srv+" and fetching LogFile for application with PID: "+pid
41  cf=os.popen('ssh '+srv+' ls -l /tmp | grep '+pid)
42  l=cf.readline();
43  if l=="":
44  cf.close()
45  return "App Not Running???"
46  else:
47  logfilev=l.split()
48  cf.close();
49  return logfilev[-1]
50 # except Exception,e:
51 # sys.stderr.write( "Something went really bad\n" + e[0])
# return -1
def getRunAppsInfo.getAppPID (   srv,
  port 
)

Definition at line 17 of file getRunAppsInfo.py.

Referenced by getRunningAppsInfo().

17 
18 def getAppPID(srv,port):
19  try:
20  print "Connecting to server: "+srv+" and fetching PID for application running on port: "+port
21  cf=os.popen('ssh '+srv+' ps -eo pid,cmd | grep '+port)
22  l=cf.readline();
23  if l=="":
24  cf.close()
25  return "App Not Running"
26  else:
27  pidv=l.split()
28  cf.close();
29  return pidv[0]
30  except:
31  sys.stderr.write( "Something went really bad\n" )
return -1
def getRunAppsInfo.getRunningAppsInfo (   filename)

Definition at line 53 of file getRunAppsInfo.py.

References getAppLogFileName(), and getAppPID().

53 
54 def getRunningAppsInfo(filename):
55  (table,grid)=appinf.getAppInfo(filename,2,1,3,4)
56  for apps in grid:
57  apps.insert(3,getAppPID(apps[1],apps[2]))
58  apps.insert(4,getAppLogFileName(apps[1],apps[3]))
return grid

Variable Documentation

getRunAppsInfo.fullinfo = False

Script operation #.

Definition at line 63 of file getRunAppsInfo.py.

tuple getRunAppsInfo.grid = getRunningAppsInfo(filename[0])

Definition at line 91 of file getRunAppsInfo.py.

Referenced by MagGeoBuilderFromDDD.buildInterpolator(), fftjetcms.fftjet_PileupCalculator_parser(), grid1d_t(), grid3d_t(), and MFGrid3D.setGrid().

getRunAppsInfo.headers = False

Definition at line 64 of file getRunAppsInfo.py.

Referenced by lhef::LHEReader::XMLHandler.comment(), lhef::LHEReader::XMLHandler.endElement(), LHERunInfoProduct.mergeProduct(), amc13::Packet.parse(), and Herwig6Hadronizer.upInit().

int getRunAppsInfo.i = 0

Definition at line 97 of file getRunAppsInfo.py.

list getRunAppsInfo.newrecord = [record[0],record[3],record[4]]

Definition at line 99 of file getRunAppsInfo.py.