def sendSysInfosMessage(self):
        """
        | Send sys infos to the dispatcher, the request content holds the RN status and free memory only, it has to be kept
        | very small to avoid nerwork flood.
        | req: PUT /rendernodes/<currentRN>/sysinfos

        :raise : Exception
        """

        # we don't need to send the whole dict of sysinfos
        infos = {}

        if self.updateSys:
            # If necessary (i.e. specified by user via WS)
            infos = self.fetchSysInfos()
            self.updateSys = False

        infos['status'] = self.status
        infos['systemFreeRam'] = self.getFreeMem()
        infos['systemSwapPercentage'] = self.getSwapUsage()

        dct = json.dumps(infos)
        headers = {}
        headers['content-length'] = len(dct)

        try:
            self.requestManager.put("/rendernodes/%s/sysinfos" % self.computerName, dct, headers)
        except RequestManager.RequestError, err:
            if err.status == 404:
                # the dispatcher doesn't know the worker
                # it may have been launched before the dispatcher itself
                # and not be mentioned in the tree.description file
                self.registerWorker()
            else:
                raise
        except httplib.BadStatusLine:
            LOGGER.exception('Sending sys infos has failed with a BadStatusLine error')

        LOGGER.debug('Sys infos transmitted to the server: %r' % dct)
dataset/ETHPy150Open mikrosimage/OpenRenderManagement/src/octopus/worker/worker.py/Worker.sendSysInfosMessage/original