CMS 3D CMS Logo

Functions
cmsCpuInfo Namespace Reference

Functions

def get_NumOfCores ()
 

Function Documentation

def cmsCpuInfo.get_NumOfCores ( )

Definition at line 7 of file cmsCpuInfo.py.

References edm.print().

Referenced by cmsPerfSuite.PerfSuite.optionParse(), and cmsPerfServer.request_benchmark().

8  cores=0
9  cpuinfo=open("/proc/cpuinfo","r")
10  if cpuinfo:
11  for line in cpuinfo.readlines():
12  for token in line.split():
13  if token == 'processor':
14  cores=cores+1;
15  return cores
16  else:
17  print("Could not open file /proc/cpuinfo!\n")
18  return NULL
19  #Further functions to parse other information will come (RAM, Cache etc)
20 
def get_NumOfCores()
Definition: cmsCpuInfo.py:7
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65