GetTopChannels returns empty resposne

26 views
Skip to first unread message

ambigu...@gmail.com

unread,
Jun 3, 2020, 8:36:27 AM6/3/20
to grpc.io

Hello,

I used the channelz to debug my gRpc Service. But I find that it returns empty channels, even if I send many requests.

Platform:

Linux 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2 (2020-04-29) x86_64 GNU/Linux
gRpc 1.27.2


The minimal code to reproduce:

# server.py
import grpc
from concurrent import futures
from grpc_channelz.v1 import channelz


def serve():
    server
= grpc.server(futures.ThreadPoolExecutor(max_workers=10))
    server
.add_insecure_port('127.0.0.1:5000')
    channelz
.add_channelz_servicer(server)
    server
.start()
    server
.wait_for_termination()


if __name__ == '__main__':
    serve
()


And I see that the channelz is enabled default. How can I get the gRpc channel information?


Thanks.

Lidi Zheng

unread,
Jun 10, 2020, 1:00:49 PM6/10/20
to grpc.io
Sorry the concepts are a bit confusing. The Channel concept in Channelz actually refers to "client". So, in a server application, you won't get statistics about any gRPC client. GetServers method should give what you need.
Reply all
Reply to author
Forward
0 new messages