docs: def agent(server="http://localhost:8000"):
      """Run in agent mode.
  
      This gathers data, and sends it to a server given by the server argument.
  
      """
      import xmlrpc.client
      sp = xmlrpc.client.ServerProxy(server)
      hw = getallhwinfo()
      fields = header_fields()
      for f in fields:
          if not f in hw:
              hw[f] = ''
      try:
          sp.puthwinfo(xmlrpc.client.dumps((hw,)))
      except xmlrpc.client.Error as v:
          print("ERROR occured: ", v)