Determine computer processor information.
1
2
16
17import msparser
18
19
20checkLinuxHT = False
21numLicensed = 1
22cpus = msparser.ms_processors(checkLinuxHT, numLicensed)
23
24if not cpus.isValid() :
25 print("There are errors. Cannot continue. The last error description:")
26 print(cpus.getLastErrorString())
27 sys.exit(1)
28
29print("Number of CPUS available on the system: %d" % cpus.getNumOnSystem())
30
31
32"""
33
34Running the program, for example with
35
36python config_procs.pl
37
38will give the following output (depending on the number of processors on your
39system):
40
41
42Number of CPUS available on the system: 4
43
44
45"""
46