This is for ticket #2128. It was reviewed and discussed on jabber.
This extends SysInfoPOSIX to get the hostname and the load average.
Then as a fallback for unknown systems it uses the SysInfoPOSIX.
(By the way, some information is looked up twice, but this
happened before this patch, but now happens for a couple more things.)
u = os.uname()
self._platform_name = u[0]
+ self._hostname = u[1]
self._platform_version = u[2]
self._platform_machine = u[4]
+ self._loadavg = os.getloadavg()
+
class SysInfoLinux(SysInfoPOSIX):
"""Linux implementation of the SysInfo class.
See the SysInfo class documentation for more information.
elif osname == 'BIND10Testcase':
return SysInfoTestcase()
else:
- return SysInfo()
+ return SysInfoPOSIX()