Main Page
Namespaces
Classes
Package Documentation
Namespace List
Namespace Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
Functions
cmsCpuInfo Namespace Reference
Functions
def
get_NumOfCores
Function Documentation
def
cmsCpuInfo.get_NumOfCores
(
)
Definition at line
6
of file
cmsCpuInfo.py
.
6
7
def
get_NumOfCores
():
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)
cmsCpuInfo.get_NumOfCores
def get_NumOfCores
Definition:
cmsCpuInfo.py:6
Generated for CMSSW Reference Manual by
1.8.5