CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 34 of file getRunAppsInfo.py.

Referenced by getRunningAppsInfo().

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

Definition at line 18 of file getRunAppsInfo.py.

References print().

Referenced by getRunningAppsInfo().

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

Definition at line 54 of file getRunAppsInfo.py.

References getAppLogFileName(), and getAppPID().

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

Variable Documentation

getRunAppsInfo.fullinfo = False

Script operation #.

Definition at line 64 of file getRunAppsInfo.py.

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

Definition at line 92 of file getRunAppsInfo.py.

Referenced by algorithm(), magneticfield::MagGeoBuilder.buildInterpolator(), MagGeoBuilderFromDDD.buildInterpolator(), DeepTauId.checkInputs(), trklet::PurgeDuplicate.execute(), fftjetcms.fftjet_PileupCalculator_parser(), DeepTauId.fillGrids(), grid1d_t(), grid3d_t(), DeepTauId.saveInputs(), and MFGrid3D.setGrid().

getRunAppsInfo.headers = False

Definition at line 65 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 98 of file getRunAppsInfo.py.

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

Definition at line 100 of file getRunAppsInfo.py.