xpra icon
Bug tracker and wiki

Ticket #1680: proxy-ping-debug.patch

File proxy-ping-debug.patch, 3.6 KB (added by Antoine Martin, 3 years ago)

debugging tweaks for ping timing

  • etc/sysconfig/xpra

     
    11TCP_AUTH=sys
    22AUTH=peercred
    3 #DEBUG=auth,proxy
     3#DEBUG=auth,proxy,protocol
     4DEBUG=proxy
     5XPRA_PROXY_START_ENV=XPRA_PROTOCOL_DEBUG=1
    46DEBUG=
    57#skip datetime prefix since the log goes to a system logger:
    68XPRA_LOG_FORMAT=%(message)s
  • etc/xpra/nvfbc.keys

     
    44# 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10
    55# or just:
    66# 0102030405060708090A0B0C0D0E0F10
     7E4CB1608656EC145A548192CF1D7B809
  • xpra/client/ui_client_base.py

     
    16721672            self._server_ok = self.last_ping_echoed_time>=ping_sent_time
    16731673        log("check_server_echo(%s) last=%s, server_ok=%s (last_ping_echoed_time=%s)", ping_sent_time, last, self._server_ok, self.last_ping_echoed_time)
    16741674        if last!=self._server_ok and not self._server_ok:
     1675            log.info("check_server_echo(%s) last=%s, server_ok=%s (last_ping_echoed_time=%s)", ping_sent_time, last, self._server_ok, self.last_ping_echoed_time)
    16751676            log.info("server is not responding, drawing spinners over the windows")
    16761677            def timer_redraw():
    16771678                if self._protocol is None:
     
    17111712            avg = sum(l) / len(l)
    17121713            wait = min(5, 1.0+avg*2.0)
    17131714            netlog("send_ping() timestamp=%s, average server latency=%.1f, using max wait %.2fs", now_ms, 1000.0*avg, wait)
     1715        netlog.info("send ping: time=%i", now_ms)
    17141716        self.timeout_add(int(1000.0*wait), self.check_server_echo, now_ms)
    17151717        return True
    17161718
    17171719    def _process_ping_echo(self, packet):
    17181720        echoedtime, l1, l2, l3, cl = packet[1:6]
     1721        netlog.info("got ping echo time=%i", echoedtime)
    17191722        self.last_ping_echoed_time = echoedtime
    17201723        self.check_server_echo(0)
    17211724        server_ping_latency = monotonic_time()-echoedtime/1000.0
  • xpra/server/proxy/proxy_instance_process.py

     
    595595        elif packet_type=="hello":
    596596            log.warn("Warning: invalid hello packet received after initial authentication (dropped)")
    597597            return
     598        elif packet_type=="ping":
     599            log.warn("client sent: %s", packet)
    598600        self.queue_server_packet(packet)
    599601
    600602
     
    735737            log.info("sending %s challenge response", digest)
    736738            self.send_hello(challenge_response, client_salt)
    737739            return
     740        elif packet_type=="ping_echo":
     741            log.warn("server sent: %s", packet)
    738742        self.queue_client_packet(packet)
    739743
    740744
  • xpra/server/source.py

     
    20942094            if len(self.statistics.client_ping_latency)>0:
    20952095                _, cl = self.statistics.client_ping_latency[-1]
    20962096                cl = int(1000.0*cl)
     2097        log.info("got ping: %s", time_to_echo)
    20972098        self.send_async("ping_echo", time_to_echo, l1, l2, l3, cl)
    20982099        #if the client is pinging us, ping it too:
    20992100        self.timeout_add(500, self.ping)