BIND 10 master, updated. 89fbc1a1f41da33150176d8d0ba83ae8e88a03da [master] allow sysinfo to provide some generic output on unknown system

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Feb 6 15:57:09 UTC 2013


The branch, master has been updated
       via  89fbc1a1f41da33150176d8d0ba83ae8e88a03da (commit)
      from  564f4b8990e4759f57033f4fc9de2359e3baf829 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 89fbc1a1f41da33150176d8d0ba83ae8e88a03da
Author: Jeremy C. Reed <jreed at isc.org>
Date:   Wed Feb 6 09:52:50 2013 -0600

    [master] allow sysinfo to provide some generic output on unknown system
    
    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.)

-----------------------------------------------------------------------

Summary of changes:
 src/lib/python/isc/sysinfo/sysinfo.py |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-----------------------------------------------------------------------
diff --git a/src/lib/python/isc/sysinfo/sysinfo.py b/src/lib/python/isc/sysinfo/sysinfo.py
index 771400a..3a59801 100644
--- a/src/lib/python/isc/sysinfo/sysinfo.py
+++ b/src/lib/python/isc/sysinfo/sysinfo.py
@@ -162,9 +162,12 @@ class SysInfoPOSIX(SysInfo):
 
         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.
@@ -508,4 +511,4 @@ def SysInfoFromFactory():
     elif osname == 'BIND10Testcase':
         return SysInfoTestcase()
     else:
-        return SysInfo()
+        return SysInfoPOSIX()



More information about the bind10-changes mailing list