Report on the machine where we ran.
More...
Report on the machine where we ran.
Definition at line 580 of file trfReports.py.
◆ python()
def python.trfReports.machineReport.python |
( |
|
self, |
|
|
|
fast = False |
|
) |
| |
Definition at line 582 of file trfReports.py.
582 def python(self, fast = False):
585 attrs = [
'node',
'platform']
588 machine[attr] = getattr(platform, attr).__call__()
589 except AttributeError
as e:
590 msg.warning(
'Failed to get "{0}" attribute from platform module: {1}'.
format(attr, e))
592 attrs = [
'linux_distribution']
595 machine[attr] = getattr(distro, attr).__call__()
596 except (AttributeError,NameError)
as e:
597 msg.warning(
'Failed to get "{0}" attribute from platform module: {1}'.
format(attr, e))
601 with open(
'/proc/cpuinfo')
as cpuinfo:
604 k, v = [ l.strip()
for l
in line.split(
':') ]
605 if k ==
'cpu family' and 'cpu_family' not in machine:
606 machine[
'cpu_family'] = v
607 elif k ==
'model' and 'model' not in machine:
609 elif k ==
'model name' and 'model_name' not in machine:
610 machine[
'model_name'] = v
613 except Exception
as e:
614 msg.warning(
'Unexpected error while parsing /proc/cpuinfo: {0}'.
format(e))
616 with open(
'/etc/machinefeatures/hs06')
as hs:
617 machine[
'hepspec'] = hs.readlines()[0].strip()
The documentation for this class was generated from the following file: