docs: def getGeneralInfo(rh):
      """
      Obtain general information about the host.
  
      Input:
         Request Handle with the following properties:
            function    - 'GETHOST'
            subfunction - 'GENERAL'
  
      Output:
         Request Handle updated with the results.
         Return code - 0: ok
         Return code - 4: problem getting some info
      """
  
      rh.printSysLog("Enter getHost.getGeneralInfo")
  
      # Get host using VMCP
      rh.results['overallRC'] = 0
      cmd = ["sudo", "/sbin/vmcp", "query userid"]
      strCmd = ' '.join(cmd)
      rh.printSysLog("Invoking: " + strCmd)
      try:
          host = subprocess.check_output(
              cmd,
              close_fds=True,
              stderr=subprocess.STDOUT)
          host = bytes.decode(host)
          userid = host.split()[0]
          host = host.split()[2]
      except subprocess.CalledProcessError as e:
          msg = msgs.msg['0405'][1] % (modId, "Hypervisor Name",
                                       strCmd, e.output)
          rh.printLn("ES", msg)
          rh.updateResults(msgs.msg['0405'][0])
          host = "no info"
      except Exception as e:
          # All other exceptions.
          rh.printLn("ES", msgs.msg['0421'][1] % (modId, strCmd,
              type(e).__name__, str(e)))
          rh.updateResults(msgs.msg['0421'][0])
          host = "no info"
  
      # Get a bunch of info from /proc/sysinfo
      lparCpuTotal = "no info"
      lparCpuUsed = "no info"
      cecModel = "no info"
      cecVendor = "no info"
      hvInfo = "no info"
      with open('/proc/sysinfo', 'r') as myFile:
          for num, line in enumerate(myFile, 1):
              # Get total physical CPU in this LPAR
              if "LPAR CPUs Total" in line:
                  lparCpuTotal = line.split()[3]
              # Get used physical CPU in this LPAR
              if "LPAR CPUs Configured" in line:
                  lparCpuUsed = line.split()[3]
              # Get CEC model
              if "Type:" in line:
                  cecModel = line.split()[1]
              # Get vendor of CEC
              if "Manufacturer:" in line:
                  cecVendor = line.split()[1]
              # Get hypervisor type and version
              if "VM00 Control Program" in line:
                  hvInfo = line.split()[3] + " " + line.split()[4]
      if lparCpuTotal == "no info":
          msg = msgs.msg['0405'][1] % (modId, "LPAR CPUs Total",
                                       "cat /proc/sysinfo", "not found")
          rh.printLn("ES", msg)
          rh.updateResults(msgs.msg['0405'][0])
      if lparCpuUsed == "no info":
          msg = msgs.msg['0405'][1] % (modId, "LPAR CPUs Configured",
                                       "cat /proc/sysinfo", "not found")
          rh.printLn("ES", msg)
          rh.updateResults(msgs.msg['0405'][0])
      if cecModel == "no info":
          msg = msgs.msg['0405'][1] % (modId, "Type:",
                                       "cat /proc/sysinfo", "not found")
          rh.printLn("ES", msg)
          rh.updateResults(msgs.msg['0405'][0])
      if cecVendor == "no info":
          msg = msgs.msg['0405'][1] % (modId, "Manufacturer:",
                                       "cat /proc/sysinfo", "not found")
          rh.printLn("ES", msg)
          rh.updateResults(msgs.msg['0405'][0])
      if hvInfo == "no info":
          msg = msgs.msg['0405'][1] % (modId, "VM00 Control Program",
                                       "cat /proc/sysinfo", "not found")
          rh.printLn("ES", msg)
          rh.updateResults(msgs.msg['0405'][0])
  
      # Get processor architecture
      arch = str(os.uname()[4])
  
      # Get LPAR memory total & offline
      parm = ["-T", "dummy", "-k", "STORAGE="]
  
      lparMemTotal = "no info"
      lparMemStandby = "no info"
      results = invokeSMCLI(rh, "System_Information_Query", parm)
      if results['overallRC'] == 0:
          for line in results['response'].splitlines():
              if "STORAGE=" in line:
                  lparMemOnline = line.split()[0]
                  lparMemStandby = line.split()[4]
                  lparMemTotal = lparMemOnline.split("=")[2]
                  lparMemStandby = lparMemStandby.split("=")[1]
      else:
          # SMAPI API failed, so we put out messages
          # 300 and 405 for consistency
          rh.printLn("ES", results['response'])
          rh.updateResults(results)    # Use results from invokeSMCLI
          msg = msgs.msg['0405'][1] % (modId, "LPAR memory",
              "(see message 300)", results['response'])
          rh.printLn("ES", msg)
  
      # Get LPAR memory in use
      parm = ["-T", "dummy", "-k", "detailed_cpu=show=no"]
  
      lparMemUsed = "no info"
      results = invokeSMCLI(rh, "System_Performance_Information_Query",
                            parm)
      if results['overallRC'] == 0:
          for line in results['response'].splitlines():
              if "MEMORY_IN_USE=" in line:
                  lparMemUsed = line.split("=")[1]
                  lparMemUsed = generalUtils.getSizeFromPage(rh, lparMemUsed)
      else:
          # SMAPI API failed, so we put out messages
          # 300 and 405 for consistency
          rh.printLn("ES", results['response'])
          rh.updateResults(results)    # Use results from invokeSMCLI
          msg = msgs.msg['0405'][1] % (modId, "LPAR memory in use",
              "(see message 300)", results['response'])
          rh.printLn("ES", msg)
  
      # Get IPL Time
      ipl = ""
      cmd = ["sudo", "/sbin/vmcp", "query cplevel"]
      strCmd = ' '.join(cmd)
      rh.printSysLog("Invoking: " + strCmd)
      try:
          ipl = subprocess.check_output(
              cmd,
              close_fds=True,
              stderr=subprocess.STDOUT)
          ipl = bytes.decode(ipl).split("\n")[2]
      except subprocess.CalledProcessError as e:
          msg = msgs.msg['0405'][1] % (modId, "IPL Time",
                                       strCmd, e.output)
          rh.printLn("ES", msg)
          rh.updateResults(msgs.msg['0405'][0])
      except Exception as e:
          # All other exceptions.
          rh.printLn("ES", msgs.msg['0421'][1] % (modId, strCmd,
              type(e).__name__, str(e)))
          rh.updateResults(msgs.msg['0421'][0])
  
      # Create output string
      outstr = "ZCC USERID: " + userid
      outstr += "\nz/VM Host: " + host
      outstr += "\nArchitecture: " + arch
      outstr += "\nCEC Vendor: " + cecVendor
      outstr += "\nCEC Model: " + cecModel
      outstr += "\nHypervisor OS: " + hvInfo
      outstr += "\nHypervisor Name: " + host
      outstr += "\nLPAR CPU Total: " + lparCpuTotal
      outstr += "\nLPAR CPU Used: " + lparCpuUsed
      outstr += "\nLPAR Memory Total: " + lparMemTotal
      outstr += "\nLPAR Memory Offline: " + lparMemStandby
      outstr += "\nLPAR Memory Used: " + lparMemUsed
      outstr += "\nIPL Time: " + ipl
  
      rh.printLn("N", outstr)
      rh.printSysLog("Exit getHost.getGeneralInfo, rc: " +
                     str(rh.results['overallRC']))
      return rh.results['overallRC']